Posted in Maven

Maven submodule plugin delegation

Changing directories when executing a plugin against a specific submodule is a waste of time. Execute the following to target a specific module and its lifecycle:

mvn -pl 'submodule' 'lifecycle'

For example, from a directory
~/myapp/root-module where pom.xml is a parent pom to simple-app in that location:

mvn -pl simple-app jetty:run