• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

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>.
 
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic