maven-issues mailing list archives

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

    [ https://issues.apache.org/jira/browse/MNG-6118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17192864#comment-17192864
] 

Martin Kanters edited comment on MNG-6118 at 9/9/20, 1:18 PM:
--------------------------------------------------------------

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> and then running {{mvn jetty:run}}. 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}}.

 


was (Author: martinkanters):
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)

Mime
View raw message