[maven] branch MNG-6268 created (now 2b4790f)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[maven] branch MNG-6268 created (now 2b4790f)

michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch MNG-6268
in repository https://gitbox.apache.org/repos/asf/maven.git.


      at 2b4790f  [MNG-6268] When a reactor build fails Maven should include -f (if used) in command line suggestion

This branch includes the following new commits:

     new 2b4790f  [MNG-6268] When a reactor build fails Maven should include -f (if used) in command line suggestion

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Reply | Threaded
Open this post in threaded view
|

[maven] 01/01: [MNG-6268] When a reactor build fails Maven should include -f (if used) in command line suggestion

michaelo
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MNG-6268
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 2b4790f86bc60820fe6877611a3c2c13f855bf78
Author: Michael Osipov <[hidden email]>
AuthorDate: Sun Nov 22 11:56:05 2020 +0100

    [MNG-6268] When a reactor build fails Maven should include -f (if used) in command line suggestion
---
 .../src/main/java/org/apache/maven/cli/MavenCli.java           | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index fd650f0..0617fdb 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -1030,9 +1030,15 @@ public class MavenCli
                 }
             }
 
+            String altPomFileArg = "";
+            if ( cliRequest.commandLine.hasOption( CLIManager.ALTERNATE_POM_FILE ) )
+            {
+                String alternatePomFile = cliRequest.commandLine.getOptionValue( CLIManager.ALTERNATE_POM_FILE );
+                altPomFileArg = "-f " + alternatePomFile + " ";
+            }
             if ( result.canResume() )
             {
-                logBuildResumeHint( "mvn <args> -r" );
+                logBuildResumeHint( "mvn " + altPomFileArg + "<args> -r" );
             }
             else if ( !failedProjects.isEmpty() )
             {
@@ -1045,7 +1051,7 @@ public class MavenCli
                 if ( !firstFailedProject.equals( sortedProjects.get( 0 ) ) )
                 {
                     String resumeFromSelector = getResumeFromSelector( sortedProjects, firstFailedProject );
-                    logBuildResumeHint( "mvn <args> -rf " + resumeFromSelector );
+                    logBuildResumeHint( "mvn " + altPomFileArg + "<args> -rf " + resumeFromSelector );
                 }
             }