mojohaus / jaxws-maven-plugin

https://www.mojohaus.org/jaxws-maven-plugin/
Apache License 2.0
25 stars 37 forks source link

JDK 9+ probing is incorrect when toolchains are used. #94

Open pdudits opened 2 years ago

pdudits commented 2 years ago

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: https://github.com/mojohaus/jaxws-maven-plugin/blob/eeca039f6b1979eac9bfc1ff20c94b5ad6caaa23/src/main/java/org/codehaus/mojo/jaxws/AbstractJaxwsMojo.java#L509-L519

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.