Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 8.1.3
-
Fix Version/s: None
-
Component/s: Maven
-
Labels:None
-
Number of attachments :
Description
As an improvement on extraClasspath, the jetty-maven-plugin could resolve submodule artifacts from reactor builds, like the tomcat7-maven-plugin does [1].
In many cases, that would allow removing extraClasspath (which has to be updated each time you add/remove/rename a sibling submodule) and simply calling mvn jetty:run -pl :my-webapp -am instead.
AFAICT, that was the original use-case for adding extraClasspath (see JETTY-1206), and Maven 3 now gives us the tools to do that more easily.
For that to work, the jetty-maven-plugin would also need to automatically ignore non-war modules.
[1] See http://tomcat.apache.org/maven-plugin-2.0-beta-1/run-mojo-features.html and http://svn.apache.org/repos/asf/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java (the API seems to be getProjectReferences)
Thomas,
I had a look at the code you provided links for, and I can't see how the submodules' classes are being put onto the webapp classloader's classpath. Do you have any further links to code or doco that can clarify that?
Also, if one executes a commandline like in your example (mvn jetty:run -pl my-webapp -am), won't that work right now, without any modifications? In other words, won't jetty:run be invoked in the my-webapp module, with its dependent projects rebuilt?
thanks Jan