-
Task
-
Resolution: Done
-
Blocker
-
jbossws-jaxws-tools-maven-plugin-1.2.0.Beta1
-
None
When running on JDK9 plugin fails with CNFE classes from jaxb impl
Maybe fix would be as simple as using jaxb-ri 2.3 dependency explicitly.
Caused by: java.lang.NoClassDefFoundError: com/sun/istack/FinalArrayList at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:246) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:137) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:108) at javax.xml.bind.ContextFinder.find(ContextFinder.java:286) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:412) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:375) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:279) at org.apache.cxf.tools.wsdlto.core.PluginLoader.init(PluginLoader.java:78) at org.apache.cxf.tools.wsdlto.core.PluginLoader.<init>(PluginLoader.java:73) at org.apache.cxf.tools.wsdlto.core.PluginLoader.newInstance(PluginLoader.java:106) at org.apache.cxf.tools.wsdlto.WSDLToJava.<init>(WSDLToJava.java:48) at org.jboss.wsf.stack.cxf.tools.CXFConsumerImpl.consume(CXFConsumerImpl.java:308) at org.jboss.ws.api.tools.WSContractConsumer.consume(WSContractConsumer.java:225) ... 29 more
I suggest overriding user's choice of fork option with 'true' when jdk9 is used, basically because in that case we need to explicitly add the java.compiler module.
As for the gnu getopt dependency having to be explicitly declared when on fork mode, I believe this is a bug I erroneously introduced back in 2011 when working on
JBWS-3400; the plugin has to get the dependency from its own dep tree, without having to rely on the project it's included in.I have preliminary fix in a branch of mine, see https://github.com/jbossws/jaxws-tools-maven-plugin/compare/master...asoldano:JBWS-4075 . Rebecca is taking over from here (a couple of tests are still failing).