The (legacy) project I'm working in, is big and has lots of dependencies, now I'm trying to update it to java 9
Build tools is maven and one of the targets uses org.apache.cxf:cxf-java2ws-plugin:3.2.5 to generate wsdl from java sources. Now java2ws fails (on windows 10) because "The command line is too long". On closer introspection I can see
Command line was: "C:\Program Files\java\jdk-9.0.1\bin\java.exe" --add-modules java.activation,java.xml.bind,java.xml.ws --add-exports=java.xml.bind/com.sun.xml.internal.bind.v2.runtime=ALL-UNNAMED --add-exports=jdk.xml.dom/org.w3c.dom.html=ALL-UNNAMED --add-exports=java.xml/com.sun.org.apache.xerces.internal.impl.xs=ALL-UNNAMED --add-exports=java.xml.bind/com.sun.xml.internal.bind.marshaller=ALL-UNNAMED --add-opens java.xml.ws/javax.xml.ws.wsaddressing=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.util.concurrent=ALL-UNNAMED -DexitOnFinish=true -cp c:\y\org\apache\cxf\cxf-java2ws-plugin\3.2.5\cxf-java2ws-plugin-3.2.5.jar;LOTS-OF-JARS;
In fact the LOTS-OF-JARS above contains 220 jar-files thus exceeding maximum command line length. I've tried shortening it by giving explicit -Dmaven.repo.local=c:\y parameter without help. Also I've attempted to override the classpath by giving undocumented configuration to the cxf-java2ws-plugin, but that seems only to append to the classpath
Anyone has idea how to proceed? Thanks in advance