Reputation: 2369
i generate a WAR file which has a jar named xyz.jar inside its WEB-INF/lib folder . This jar is generated during build as a dependency. Now i need to copy this jar into a folder say abc inside the war . How can i achieve this? I tried using copy-resources of maven-resources-plugin but it doesn't seem to work as the copying will be done before war is built . but this jar is generated only during build process. Thanks.
Upvotes: 0
Views: 377
Reputation: 8865
You might also be able to change when the plugin executes by binding the plugin execution to a different lifecycle phase. Here is a snippet to give you the idea.
<plugin>
<artifactId>maven-resource-plugin</artifactId>
...
<executions>
<execution>
<id>copy</id>
<phase>phaseName</phase>
</execution>
</executions>
</plugin>
Upvotes: 0
Reputation: 100003
Use the maven-dependency-plugin to independently put it where you want it.
Upvotes: 1