You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jaroslav Tulach (JIRA)" <ji...@apache.org> on 2018/09/13 05:11:00 UTC

[jira] [Commented] (MNG-5059) --also-make-phase

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

Jaroslav Tulach commented on MNG-5059:
--------------------------------------

Btw. *Gradle* does this quite nicely. From a top level project you can invoke any goal/task of a subproject and the build system resolves all the task dependencies, run necessary build steps, etc. Simple command line usage. No enormously large commands to remember. Moreover the IDE using such system doesn't have to feel like [IDE for DevOps|http://wiki.apidesign.org/wiki/DevOps] where everyone has to understand the structure of the project, dependencies, phases and goals/tasks. _Everything works_ just by specifying _single goal_.

> --also-make-phase
> -----------------
>
>                 Key: MNG-5059
>                 URL: https://issues.apache.org/jira/browse/MNG-5059
>             Project: Maven
>          Issue Type: Improvement
>          Components: Command Line
>    Affects Versions: 3.0.3
>            Reporter: Jesse Glick
>            Assignee: Jason van Zyl
>            Priority: Major
>
> Background: http://mail-archives.apache.org/mod_mbox/maven-dev/201104.mbox/%3Cincnbn$4kl$1@dough.gmane.org%3E
> {{--also-make}} (with {{--projects}}) is useful, but suffers from the problem that dependent projects are always built to the same goal/phase as the selected project(s). That is fine for e.g. {{compile}} or {{install}}, but not for e.g. {{test}} where you would only want to build {{compile}} (or {{test-compile}}) for dependencies, not actually test them.
> Suggest a variant form of this parameter (say {{--also-make-phase}} / {{-amp}}) which would accept a goal or phase to run on dependencies in place of the regular arguments. For example, to run a unit test after making sure all its dependencies have been (re-)compiled:
> {noformat}
> mvn -amp test-compile -pl testedmod test -Dtest=OneTest
> {noformat}
> or to run an (unpacked) web application after (re-)compiling libraries it uses:
> {noformat}
> mvn -amp compile -pl webapp jetty:run
> {noformat}
> You might want to pass a goal rather than a phase, so the name could be misleading, but I think that would be a rarer use case. Ditto passing multiple goals/phases for the upstream projects.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)