You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "August Shi (JIRA)" <ji...@apache.org> on 2017/07/28 03:19:00 UTC

[jira] [Updated] (MNG-6265) Controlling reactor order of modules

     [ https://issues.apache.org/jira/browse/MNG-6265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

August Shi updated MNG-6265:
----------------------------
    Description: 
We have a use case for controlling the reactor order in Maven, specifically for running tests on Travis. The common pattern is to run "mvn install -DskipTests; mvn test". After modules are installed (in the default order), the modules can be run in any order during testing, e.g., running the failed modules first, as in -Dsurefire.runOrder=failedfirst for Surefire.

Would this feature be useful for others? I am attaching a *draft* patch that implements this feature by modifying DefaultMaven.java. I see no clean way of implementing this feature through an extension, unless some new callback, e.g., afterProjectsOrdered, is implemented first. Would it be worthwhile to improve this draft?

One can test the feature by applying the patch, building Maven, and running tests with the modules in a random order like this:
{{$ mvn -DdistributionTargetDir=$(pwd)/apache-maven-3.5.x-SNAPSHOT clean install -DskipTests
$ apache-maven-3.5.x-SNAPSHOT/bin/mvn test -Dmaven.project.order.file=<(ls -d maven-* | shuf)}}

  was:
We have a use case for controlling the reactor order in Maven, specifically for running tests on Travis. The common pattern is to run "mvn install -DskipTests; mvn test". After modules are installed (in the default order), the modules can be run in any order during testing, e.g., running the failed modules first, as in -Dsurefire.runOrder=failedfirst for Surefire.

Would this feature be useful for others? I am attaching a *draft* patch that implements this feature by modifying DefaultMaven.java. I see no clean way of implementing this feature through an extension, unless some new callback, e.g., afterProjectsOrdered, is implemented first. Would it be worthwhile to improve this draft?

One can test the feature by applying the patch, building Maven, and running tests with the modules in a random order like this:
$ mvn -DdistributionTargetDir=$(pwd)/apache-maven-3.5.x-SNAPSHOT clean install -DskipTests
$ apache-maven-3.5.x-SNAPSHOT/bin/mvn test -Dmaven.project.order.file=<(ls -d maven-* | shuf)


> Controlling reactor order of modules
> ------------------------------------
>
>                 Key: MNG-6265
>                 URL: https://issues.apache.org/jira/browse/MNG-6265
>             Project: Maven
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 3.5.0
>            Reporter: August Shi
>         Attachments: p.patch
>
>
> We have a use case for controlling the reactor order in Maven, specifically for running tests on Travis. The common pattern is to run "mvn install -DskipTests; mvn test". After modules are installed (in the default order), the modules can be run in any order during testing, e.g., running the failed modules first, as in -Dsurefire.runOrder=failedfirst for Surefire.
> Would this feature be useful for others? I am attaching a *draft* patch that implements this feature by modifying DefaultMaven.java. I see no clean way of implementing this feature through an extension, unless some new callback, e.g., afterProjectsOrdered, is implemented first. Would it be worthwhile to improve this draft?
> One can test the feature by applying the patch, building Maven, and running tests with the modules in a random order like this:
> {{$ mvn -DdistributionTargetDir=$(pwd)/apache-maven-3.5.x-SNAPSHOT clean install -DskipTests
> $ apache-maven-3.5.x-SNAPSHOT/bin/mvn test -Dmaven.project.order.file=<(ls -d maven-* | shuf)}}



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