I am using Maven overlays and include a dependent war in pom as follows
<dependency>
<groupId>com.test.dependent</groupId>
<artifactId>dependent</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
<scope>runtime</scope>
</dependency>
The generated war files looks fine, it contains the resources out of both projects and if I deploy it to my tomcat server everything works as expected.
However I am used to use to jetty plugin in maven and run my builds with goal jetty:run
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.10</version>
</plugin>
</plugins>
<finalName>myproject</finalName>
</build>
Unfortunately it looks like jetty would not include the files from the dependent project. How can I configure the plugin to take the dependent projects into account?
I wasn't aware that the
maven-war-plugin
packages overlays automatically (I always add an explicit<overlays>
section to the config), but if that's true, simply runningmvn package jetty:run
should work, sincejetty:run
also checks the target directory.