You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christofer Dutz <ch...@c-ware.de> on 2022/01/27 21:57:28 UTC
Problems loading resources in maven-failsafe-plugin 3.0.0-M5 integration tests
Hi,
in the Apache PLC4X project we've got some tests that use @TestFactory and we've seen failsafe 2.22.2 and surefire 2.22.2 sometimes skip finding these.
So we recently updated to 3.0.0-M5 and noticed that now all tests are correctly found.
However we now have a different problem:
In these tests we load xml resources which we import from another module via such a dependency:
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-modbus</artifactId>
<version>0.10.0-SNAPSHOT</version>
<classifier>tests</classifier>
<type>test-jar</type>
<scope>test</scope>
</dependency>
However, the classloader seems unable to find the resource when running in failsafe 3.0.0-M5 ... it works in 2.22.2 and it also works in surefire 3.0.0-M5.
Now to track down the problem I debugged into the test and could see that the classloader generally has the right jars in it's Classpath.
The main difference however is that failsafe 3.0.0-M5 is the only version where the classloader treats the module as "named module" and goes a completely different path inside.
Do you have an idea how I can get my integration-tests to work with failsafe 3.0.0-M5?
Help greatly appreciated,
Chris