I am developing a Java web application using the maven multi-module project. The project setup is as follows:
pom.xml The main maven project, which includes the following modules:persistence: Entity Classes and DAObusiness: Service definition and implementationwebapp: Apick wicket web application
The hierarchy of dependencies is as follows: webappdepends on business, which depends on persistence.
I also use Jetty Maven Plugin to run the web application locally using the mvn -pl webapp jetty:runmain directory inside. pom.xmlWhen developing the application, when making changes to the code, I want the berth server to reboot and reload the changed code files automatically. This works fine when I modify files inside a module webapp, but does not work when I modify a file inside another module, for example persistenceor business.
The Maven Jetty plugin is configured internally webapp/pom.xmlas follows:
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.2.2.v20140723</version>
<configuration>
<reload>automatic</reload>
<scanIntervalSeconds>1</scanIntervalSeconds>
<webApp>
<extraClasspath>../business/target/classes/;../persistence/target/classes/</extraClasspath>
</webApp>
<scanTargets>
<scanTarget>../business/target/classes</scanTarget>
<scanTarget>../persistence/target/classes</scanTarget>
</scanTargets>
</plugin>
. <scanTarget> , jetty business persistence. <extraClasspath> , . <webAppConfig>. , <webApp>, ( <webAppConfig>, ).
: Jetty Maven , ?