You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Daniel Cruver (JIRA)" <ji...@apache.org> on 2017/12/08 15:36:01 UTC

[jira] [Commented] (MNG-5885) Optimize execution when phases of same lifecycle are called

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

Daniel Cruver commented on MNG-5885:
------------------------------------

A potential solution to this is to detect when phases of the same lifecyle are adjacent to each other on the command line an report a run-time error.

For example:
mvn clean install deploy

ERROR: the phases install and deploy both belong to the 'default' Lifecycle, please build with the command 'mvn clean deploy'. 

> Optimize execution when phases of same lifecycle are called
> -----------------------------------------------------------
>
>                 Key: MNG-5885
>                 URL: https://issues.apache.org/jira/browse/MNG-5885
>             Project: Maven
>          Issue Type: Sub-task
>          Components: Plugins and Lifecycle
>    Affects Versions: 3.3.3
>            Reporter: Robert Scholte
>             Fix For: 3.x / Backlog
>
>
> In case someone calls {{compile package}} there's no need for the separate {{compile}} call. Now the lifecycle is executed twice: once until {{compile}} and once again until {{package}}.
> Note: {{package compile}} is weird due to its order, but should not be optimized. {{compile resources:copy-resources package}} is a bit complicated. Ideally this should call all phases up until {{compile}}, followed by {{resources:copy-resources}}, followed by the {{process-classes}} to {{package}} phases.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)