• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to copy generated wsdl file to WAR file?

 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Can anyone help please?

Thanks
Sam
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>.
reply
    Bookmark Topic Watch Topic
  • New Topic