I have maven project that creates the war file. It includes the all the jars from dependencies.
In my case, some jar we received as a product patch. These jar should be overwrite the existing jars those added from the dependencies.
I have added the below plugin
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<webResources>
<resource>
<directory>../../../product-patch/RT_V1/RT/webapps/cct-swift/WEB-INF/lib</directory>
<targetPath>/WEB-INF/lib</targetPath>
</resource>
<resource>
<directory>../../../product-patch/Patch-4277</directory>
<targetPath>/WEB-INF/lib</targetPath>
</resource>
<resource>
<directory>../../../product-patch/Patch-4291</directory>
<targetPath>/WEB-INF/lib</targetPath>
</resource>
</webResources>
</configuration>
</plugin>
Finally I can see the war generated but it contains the old jar only. I would like to achieve this task by making minimum changes in existing maven pom.xml