You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2020/06/20 09:33:20 UTC
[maven] 07/31: Removed dead code,
as the `getResumeFrom` method has been moved to the
BuildResumptionManager.
This is an automated email from the ASF dual-hosted git repository.
rfscholte pushed a commit to branch MNG-5760
in repository https://gitbox.apache.org/repos/asf/maven.git
commit 2d7de183ecdd15b7268992f0be1482a81331d1dd
Author: Martin Kanters <Ma...@infosupport.com>
AuthorDate: Fri May 22 15:17:46 2020 +0200
Removed dead code, as the `getResumeFrom` method has been moved to the BuildResumptionManager.
---
.../main/java/org/apache/maven/cli/MavenCli.java | 29 ----------------------
1 file changed, 29 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 4ecd095..4877ddd 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
@@ -1063,35 +1063,6 @@ public class MavenCli
}
}
- /**
- * A helper method to determine the value to resume the build with {@code -rf} taking into account the
- * edge case where multiple modules in the reactor have the same artifactId.
- * <p>
- * {@code -rf :artifactId} will pick up the first module which matches, but when multiple modules in the
- * reactor have the same artifactId, effective failed module might be later in build reactor.
- * This means that developer will either have to type groupId or wait for build execution of all modules
- * which were fine, but they are still before one which reported errors.
- * <p>Then the returned value is {@code groupId:artifactId} when there is a name clash and
- * {@code :artifactId} 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 resume build exactly from place where it failed ({@code :artifactId} in
- * general and {@code groupId:artifactId} when there is a name clash).
- */
- private String getResumeFrom( List<MavenProject> mavenProjects, MavenProject failedProject )
- {
- for ( MavenProject buildProject : mavenProjects )
- {
- if ( failedProject.getArtifactId().equals( buildProject.getArtifactId() ) && !failedProject.equals(
- buildProject ) )
- {
- return failedProject.getGroupId() + ":" + failedProject.getArtifactId();
- }
- }
- return ":" + failedProject.getArtifactId();
- }
-
private void logSummary( ExceptionSummary summary, Map<String, String> references, String indent,
boolean showErrors )
{