When toolchains are used in the build, then java version the plugin is running in and java version it would actually execute may differ.
However, the probe for JDK 9+ is done in-process:
|
private boolean isModular() { |
|
try |
|
{ |
|
Class<?> moduleClass = Class.forName( "java.lang.Module" ); |
|
return moduleClass != null; |
|
} |
|
catch ( ClassNotFoundException e ) |
|
{ |
|
return false; |
|
} |
|
} |
Therefore when maven runs JDK 8 and toolchains JDK is JDK 11, plugin will fail with
-Xbootclasspath/p is no longer a supported option.
Because decision to include the argument was made inside JDK 8 VM and then JDK 11 was launched.
When toolchains are used in the build, then java version the plugin is running in and java version it would actually execute may differ.
However, the probe for JDK 9+ is done in-process:
jaxws-maven-plugin/src/main/java/org/codehaus/mojo/jaxws/AbstractJaxwsMojo.java
Lines 509 to 519 in eeca039
Therefore when maven runs JDK 8 and toolchains JDK is JDK 11, plugin will fail with
Because decision to include the argument was made inside JDK 8 VM and then JDK 11 was launched.