...
If you're having problems when upgrading from an older version of Surefire to a newer version, try setting useSystemClassLoader=false to see if that helps. You can do that with the POM snippet below, or by setting "-Dsurefire.useSystemClassLoader=false".
| Code Block |
|---|
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
</plugins>
</build>
[...]
</project>
|
Debugging Classpath Problems
...
- Run mvn with --debug (aka -X) to get more detailed output
- Check your forkMode. If forkMode=never, it's impossible to use the system classloader; we have to use an isolated classloader.
- If useSystemClassLoader=true, look at the surefire booter jar. Open it up (it's just a zip) and read its manifest.
- Run mvn with -Dmaven.surefire.debug, and attach to the running process with a debugger.
