[ https://issues.apache.org/jira/browse/MNG-6118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17192864#comment-17192864
]
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|https://github.com/apache/maven/pull/373] 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: https://issues.apache.org/jira/browse/MNG-6118
> 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
(v8.3.4#803005)
|