I have compiled some class files and a jar file. Now i want to include some wsdl into the jar file .
Can you please tell me how can amend pom.xml in maven for achieving the same.
Regards Gnash--85
Where do those WSDL files come from? Are they part of your source?
assuming you have
project
+ src
+ main
+ java
+ wsdl
+ resources
Please add in POM,
<project>
...
<build>
<resources>
...
<resource>
<directory>${basedir}/src/main/wsdl</directory>
<resource>
</resources>
</build>
</project>
Then it should add your wsdl as extra resource
Edit:
There is an alternative way for which we don't need to update project.build.resources to include all resource directories.
This is by making use of Build Helper Plugin
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>add-wsdl-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${basedir}/src/main/wsdl</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With