From 82005766ac9965e060507b7be8df08bf0be9fb56 Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Fri, 31 Jul 2009 18:45:18 +0000 Subject: [PATCH] o Removed authorative flag from artifact, we can just use the resolved flag to stop the resolution process git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@799692 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/maven/artifact/Artifact.java | 7 ++----- .../apache/maven/artifact/DefaultArtifact.java | 15 +-------------- .../resolver/DefaultArtifactResolver.java | 2 +- .../apache/maven/ReactorArtifactRepository.java | 6 ------ .../ideworkspace/TestIdeWorkspaceRepository.java | 1 - 5 files changed, 4 insertions(+), 27 deletions(-) diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/Artifact.java b/maven-compat/src/main/java/org/apache/maven/artifact/Artifact.java index 54cb6be483..55a54397db 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/Artifact.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/Artifact.java @@ -150,8 +150,5 @@ public interface Artifact boolean isSelectedVersionKnown() throws OverConstrainedVersionException; - - void setFromAuthoritativeRepository( boolean fromAuthoritativeRepository ); - - boolean isFromAuthoritativeRepository(); -} \ No newline at end of file + +} diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/DefaultArtifact.java b/maven-compat/src/main/java/org/apache/maven/artifact/DefaultArtifact.java index d424d5308b..ff2184f57b 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/DefaultArtifact.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/DefaultArtifact.java @@ -593,18 +593,5 @@ public class DefaultArtifact { this.optional = optional; } - - // - - private boolean fromAuthoritativeRepository; - - public void setFromAuthoritativeRepository( boolean fromAuthoritativeRepository ) - { - this.fromAuthoritativeRepository = fromAuthoritativeRepository; - } - - public boolean isFromAuthoritativeRepository() - { - return fromAuthoritativeRepository; - } + } diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java index eb79149eb1..fae03b880d 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java @@ -136,7 +136,7 @@ public class DefaultArtifactResolver artifact = localRepository.find( artifact ); - if ( artifact.isFromAuthoritativeRepository() ) + if ( artifact.isResolved() ) { return; } diff --git a/maven-core/src/main/java/org/apache/maven/ReactorArtifactRepository.java b/maven-core/src/main/java/org/apache/maven/ReactorArtifactRepository.java index d425864528..3250ef4ac7 100644 --- a/maven-core/src/main/java/org/apache/maven/ReactorArtifactRepository.java +++ b/maven-core/src/main/java/org/apache/maven/ReactorArtifactRepository.java @@ -42,8 +42,6 @@ public class ReactorArtifactRepository { artifact.setFile( project.getFile() ); - artifact.setFromAuthoritativeRepository( true ); - artifact.setResolved( true ); } else @@ -60,8 +58,6 @@ public class ReactorArtifactRepository artifact.setFile( projectArtifact.getFile() ); - artifact.setFromAuthoritativeRepository( true ); - artifact.setResolved( true ); } // TODO: The code below supports MNG-3043 & MNG-2871 but in its current form causes MNG-4269. @@ -83,8 +79,6 @@ public class ReactorArtifactRepository // { // artifact.setFile( classesDir ); // -// artifact.setFromAuthoritativeRepository( true ); -// // artifact.setResolved( true ); // } // } diff --git a/maven-core/src/test/java/org/apache/maven/repository/ideworkspace/TestIdeWorkspaceRepository.java b/maven-core/src/test/java/org/apache/maven/repository/ideworkspace/TestIdeWorkspaceRepository.java index 9913a00fb7..20796d2960 100644 --- a/maven-core/src/test/java/org/apache/maven/repository/ideworkspace/TestIdeWorkspaceRepository.java +++ b/maven-core/src/test/java/org/apache/maven/repository/ideworkspace/TestIdeWorkspaceRepository.java @@ -27,7 +27,6 @@ public class TestIdeWorkspaceRepository { artifact.setFile( ARTIFACT_FILE ); artifact.setResolved( true ); - artifact.setFromAuthoritativeRepository( true ); } return artifact; }