][Thread Next][Date Index
Re: [all] maven surefire plugin crashes after JDK updated - solution
This has been discussed in a Debian bug report here:
The bug is not in Debian but is due to the latest release of OpenJDK 8
which improved validation of the class-path in JAR files:
| Improved Validation of Class-Path Attribute in JAR File Manifest
| The JAR file specification states that URLs in the Class-Path manifest
attribute must be relative,
| though this has not been enforced. To better conform to the JAR
specification, absolute URLs
| (those that include a scheme) are now ignored. For JAR files not
loaded from the file system,
| Class-Path entries navigating to a parent directory (using "../") are
| Applications depending on a JAR file loaded from an absolute URL
element specified in
| Class-Path attribute may encounter a ClassNotFoundException. The
historical behavior can be
| restored by setting a new system property,
| to true. Debugging info for Class-Path entries that are ignored can be
printed to stderr by
| setting -Djdk.net.URLClassPath.disableClassPathURLCheck=debug.
Any Jar file that uses non-relative URLs in the manifest will suffer
This affects the maven-surefire-plugin and under the latest OpenJDK 8 no
tests can be run. This is at least true for JUnit 5 tests.
One solution as posted is to ignore the system class loader:
Note however that later in the thread this is stated that it breaks some
Spring Boot integration tests. So there may not be a one size fits
solution. Either try modifying the configuration to disable the system
class loader, or downgrade Open JDK 8 until the surefire plugin is fixed.
On 02/11/2018 12:34, Bernd Eckenfels wrote:
Do you mean 8u191 introduced a problem? What error do you get in which project?
Von: Aleksander Ściborek <aleksandersciborek@xxxxxxxxx>
Gesendet: Freitag, November 2, 2018 12:35 PM
An: Commons Developers List
Betreff: [all] maven surefire plugin crashes after JDK updated - solution
after I had installed the update of JDK8 i found that the maven surefire
plugin doesn't work correctly.
The resolution is to add following lines in plugins section:
To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxxxx