I’m executing an ant task inside my maven pom files to code generation purposes. (the code-generation tool is wsdl2java). during the process I fork new java process and pass the class path along with wsdl.
this works fine in the unix environment. but windows gives error saying ;
CreateProcess error=87, The parameter is incorrect.
this is because I’m passing the parameter maven.dependency.classpath as the classpath of the codegen tool. I have figured out that if there is a way to construct my custom classpath, using maven, that would solve my problem. (instead of giving a classpath includes all the jars in the maven repo).
maven-dependency-pluing:build-path goal seems to be promising, but i can specify the exact jars i want to include in my new classpath.
- i have to include the class path variable in a root, pom so that other modules can use it.(lots of them)
- I could find a way with maven-dependency-plugin:copy goal. but that it is a performance hit.
appreciate any help.
thanks in advance.
I could not find a way to build a classPath using dependency or any other maven plugin. The only option was to create a custom classPath and use it while java execution.
And you refer the constructed classpath later in the java process execution.
Hope this helps.