1

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

1
  • I have the same problem with jdk 10 Commented Jun 28, 2018 at 11:08

2 Answers 2

0

Looks like the only workaround is to modify your program according to this article.

You can use Windows PowerShell to execute your build. It doesn't have this limitation.

Sign up to request clarification or add additional context in comments.

3 Comments

Sadly same happens on powershell as well (at least on my computer)
Yep, same here. As far as I know, the limit is still around 8191 chars
I think that is the way the maven-surefire-plugin has taken (see here: stackoverflow.com/questions/22528099/…) Sadly, the cxf-java2ws-plugin does not offer such option, at least I could not find any.
0

This issue has been patched in cxf-java2ws v3.3.0 . So if you can upgrade your plugin , this issue can be resolved.

(Know, its an old thread., but this may help someone)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.