The following is an example of how to use the Maven Overlay plugin to overlay a Java web app project with a web app project hosted in Maven Central:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<warName>cas</warName>
<overlays>
<overlay>
<groupId>org.jasig.cas</groupId>
<artifactId>cas-server-webapp</artifactId>
<excludes>
<exclude>WEB-INF/cas.properties</exclude>
<exclude>WEB-INF/classes/log4j.xml</exclude>
</excludes>
</overlay>
</overlays>
</configuration>
<plugin>
As you can see, the example configures Maven to overlay the project with the cas-server-webapp
WAR stored on Maven Central. But what if I have my own cas-server-webapp
project stored locally in my m2
Maven cache? What if I want to use that (local) WAR instead of the ones hosted on Maven Central? I've read the Maven Overlay docs twice now, and don't see how I can configure this.
How do I configure the Maven Overlay plugin to pull the overlay WAR from my local Maven cache (m2
) rather than Maven Central?