maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Kanters (Jira)" <>
Subject [jira] [Commented] (MNG-6118) Add option to execute goals on a specific module while building a multimodule project
Date Wed, 09 Sep 2020 13:17:00 GMT


Martin Kanters commented on MNG-6118:

After a long discussion with [~rfscholte] and [~mthmulders] we decided that solving this
issue in one Maven invocation is quite difficult without adding a flag like --also-make-phase. 

Ideally you would like to run `mvn jetty:run -f webapp/pom.xml` and then Maven would figure
out and compile the needed submodules (but not run jetty:run on the submodules). It's pretty
hard currently to figure out the requirements on the submodules (which is not always compile).


We decided that as a first step it would already improve this use-case if the build could
resolve inter-module dependencies when using -f <subproject> or when navigating into
a <subproject>. This ensures that we do not first have to install the whole multi module
project root first, before running jetty:run on the webapp submodule.

[The proposed fix|] allows us to run: mvn compile
&& mvn jetty:run -f webapp.


> Add option to execute goals on a specific module while building a multimodule project
> -------------------------------------------------------------------------------------
>                 Key: MNG-6118
>                 URL:
>             Project: Maven
>          Issue Type: Improvement
>          Components: Command Line, Plugins and Lifecycle
>            Reporter: Robert Scholte
>            Priority: Major
> Suppose we have a multimodule which results in a war. In the end we want to run this
war in a container like jetty. Up until now the {{jetty:run}} is executed on every module,
which doesn't make sense for the other modules.
> This is just one of several examples where you want to control on which module to execute
a specific goal. In case of wars, the plugin could check for the packaging type, but in case
of jars this won't work.
> There should be a generic solution to mark goals for a specific module.

This message was sent by Atlassian Jira

View raw message