You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2018/05/19 01:21:07 UTC
[maven] branch MNG-6410 updated: improved javadoc and method name
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch MNG-6410
in repository https://gitbox.apache.org/repos/asf/maven.git
The following commit(s) were added to refs/heads/MNG-6410 by this push:
new f208497 improved javadoc and method name
f208497 is described below
commit f2084970a30af8c823b98702aa431eac6ae1581a
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sat May 19 03:21:06 2018 +0200
improved javadoc and method name
---
.../main/java/org/apache/maven/cli/MavenCli.java | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 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 da2a594..31a6515 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
@@ -1007,7 +1007,7 @@ public class MavenCli
slf4jLogger.error( "" );
slf4jLogger.error( "After correcting the problems, you can resume the build with the command" );
slf4jLogger.error( buffer().a( " " ).strong( "mvn <goals> -rf "
- + getFailedProject( result.getTopologicallySortedProjects(), project ) ).toString() );
+ + getRestartFrom( result.getTopologicallySortedProjects(), project ) ).toString() );
}
if ( MavenExecutionRequest.REACTOR_FAIL_NEVER.equals( cliRequest.request.getReactorFailureBehavior() ) )
@@ -1028,19 +1028,22 @@ public class MavenCli
}
/**
- * A helper method to determine the value returned for re-execution of the build.
- *
- * By default -rf :artifactId will pick up first module which matches, but quite often failed project might be later
- * in build queue. This means that developer will either have to type group id or wait for build execution of all
+ * A helper method to determine the value to restart the build with <code>-rf</code> taking into account edge case
+ * where multiple modules in reactor have the same artifactId.
+ * <p>
+ * <code>-rf :artifactId</code> will pick up first module which matches, but when multiple modules in reactor
+ * have the same artifactId, effective failed module might be later in build reactor.
+ * This means that developer will either have to type group id or wait for build execution of all
* modules which were fine, but they are still before one which reported errors.
- * Since build reactor might contain multiple projects with same artifact id for developer convenience we print
- * out groupId:artifactId when there is a name clash and :artifactId if there is no conflict.
+ * <p>Then the returned value is <code>groupId:artifactId</code> when there is a name clash and
+ * <code>:artifactId</code> if there is no conflict.
*
* @param mavenProjects Maven projects which are part of build execution.
* @param failedProject Project which has failed.
- * @return Value for -rf flag to restart build exactly from place where it failed.
+ * @return Value for -rf flag to restart build exactly from place where it failed (<code>:artifactId</code> in
+ * general and <code>groupId:artifactId</code> when there is a name clash).
*/
- private String getFailedProject( List<MavenProject> mavenProjects, MavenProject failedProject )
+ private String getRestartFrom( List<MavenProject> mavenProjects, MavenProject failedProject )
{
for ( MavenProject buildProject : mavenProjects )
{
--
To stop receiving notification emails like this one, please contact
hboutemy@apache.org.