Reputation: 5180
We are working with Maven and Hudson for unit testing and war building. Copying sources (java and resources) to WEB-INF/src is required by our customer.
There is a simple way to do this with maven?
Thank you in advance.
Upvotes: 1
Views: 211
Reputation: 570285
This should be possible by declaring the src/main/java
and src/main/resources
as additional Web Resource directories in the Maven War Plugin configuration. Inspired by the Adding and Filtering External Web Resources example:
...
<configuration>
<webResources>
<resource>
...
</resource>
<resource>
<directory>src/main/java</directory>
<!-- override the destination directory for this resource -->
<targetPath>WEB-INF/src</targetPath>
</resource>
<resource>
<directory>src/main/resources</directory>
<!-- override the destination directory for this resource -->
<targetPath>WEB-INF/src</targetPath>
</resource>
</webResources>
</configuration>
...
Upvotes: 3