I'm new to Maven. I have a multi-module maven 2 project that has the following structure (somewhat simplified):
Project (POM packaging)
|
+-- Module1 (JAR)
| |
| +-- src
| |
| +-- main
| |
| +-- java
| +-- resources
|
+-- Module2 (JAR)
| |
| ...
|
+-- Web Module (WAR)
|
...
I've configured the Web Module to include the Maven Jetty plugin.
This works great for building the production artifacts. For development, I discovered that I need to call mvn install
on any module that I change, followed by stoping jetty and calling jetty:run again.
It would be much more productive if there was a way for the plugin to pick changes directly from each module's target directories. According to the jetty plugin documentation there seems to be such a feature, but it appears this only applies to the WAR module.
Even more important to me is to be able to make changes to resource files, without the need to restart jetty. That's because most of the resources are HTML template files, and it's enormously more productive to design and update the templates during development without needing to restart to see the changes.
So, is there a way to set the classpath of the jetty plugin to include the target/classes and resources directories of each JAR module, instead of the actual JARs in the local repository?
Thanks!
Yaniv