I have a wsdl file automatically generated when executing maven build.
The location of the wsdl file is in the following path:
target/generated/wsdl/OrderProcess.wsdl
How to add a "copy" lines in my pom.xml file so that the generated wsdl file get packaged into a war file?
I tried to following code in pom.xml, no luck:
Very appreciate for any suggestion.
Thanks
Sam
sam White
Ranch Hand
Joined: Feb 18, 2011
Posts: 204
posted
0
Hello,
With the following pom.xml file:
Build project generated the following output:
I don't understand why the OrderProcess.wsdl file is copied to 0.0.1-SNAPSHOT\order-ws-0.0.1-SNAPSHOT.wsdl.
And secondly it is not packaged into the war file.
Which plugin is it that you are using to generate the wsdl? (Oh, I see which plugin it is: cxf-java2ws-plugin) In the future, please post the full plugin description, not just the executions section.
Based on the behavior exhibited, I suspect that cxf-java2ws-plugin registered the wsdl as an artifact of the build and thus the install plugin copied it to the local repository. (Personally, I think that cxf-java2ws-plugin did this incorrectly and that it should have registered the wsdl with a classifier, but that is beside the point.)
You might have to look at the documentation for the plugin to see if you can specify a target directory and change that to place the wsdl into target/classes (in which case it will end up in WEB-INF/classes in the WAR) ) or target/${project.artifactId} to place it any where else in the WAR.
http://cxf.apache.org/docs/maven-java2ws-plugin.html Looks luke you need to set <outputFile>.