maven 2 - Include additional resources in a jar -
I have compiled some class files and a jar file. Now I want to add some wsdl to jar file.
Can you please tell me how to get it, pom.xml can be modified in the mim.
Regards Gnash - 85
Where do those WSDL files come from? Are you part of your source?
Assume that you have
project + src + main + java + wsdl + resources
please add to POM, < / P>
& lt; Project & gt; ... & lt; Build & gt; & Lt; Resources & gt; ... & lt; Resources & gt; & Lt; Directory & gt; $ {Basedir} / src / home / wsdl & lt; / Directory & gt; & Lt; Resources & gt; & Lt; / Resources & gt; & Lt; / Create & gt; & Lt; / Project & gt;
Then it should add your wsdl as additional resource
Edit:
An alternative way for which we do not Need to update project.build.resources to include all resource directories.
This
& lt; Project & gt; ... & lt; Build & gt; & Lt; Plugins & gt; & Lt; Plugin & gt; & Lt; Group & gt; Org.codehaus.mojo & lt; / Group & gt; & Lt; ArtifactId & gt; Build-Helper-Maven-plugin & lt; / ArtifactId> & Lt; Version & gt; 1.8 & lt; / Edition & gt; & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; ID & gt; Ad-wsdl-resource & lt; / Id & gt; & Lt; Step & gt; Generated resources & lt; / Step & gt; & Lt; Goals & gt; & Lt; Goal & gt; Add-source & lt; / Target & gt; & Lt; / Targets & gt; & Lt; Configuration & gt; & Lt; Resources & gt; & Lt; Resources & gt; & Lt; Directory & gt; $ {Basedir} / src / home / wsdl & lt; / Directory & gt; & Lt; / Resources & gt; & Lt; / Resources & gt; & Lt; / Configuration & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; / Plugin & gt; & Lt; / Plugins & gt; & Lt; / Create & gt; & Lt; / Project & gt;
Comments
Post a Comment