From c63c86006519f01b786178be05e4996dfd6d2cae Mon Sep 17 00:00:00 2001 From: John Dennis Casey Date: Thu, 3 Nov 2005 21:09:08 +0000 Subject: [PATCH] Fixing problem with system scope being overridden by transitive parent's scope. System scope is always preserved now. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@330634 13f79535-47bb-0310-9956-ffa450edef68 --- .../artifact/factory/DefaultArtifactFactory.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java b/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java index 8c3fddc016..74f5a740e9 100644 --- a/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java +++ b/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java @@ -127,11 +127,6 @@ public class DefaultArtifactFactory // added to retain compile scope. Remove if you want compile inherited as runtime desiredScope = Artifact.SCOPE_COMPILE; } - else if ( Artifact.SCOPE_SYSTEM.equals( scope ) ) - { - // system scopes come through unchanged... - desiredScope = Artifact.SCOPE_SYSTEM; - } if ( Artifact.SCOPE_TEST.equals( inheritedScope ) ) { @@ -143,6 +138,12 @@ public class DefaultArtifactFactory desiredScope = Artifact.SCOPE_PROVIDED; } + if ( Artifact.SCOPE_SYSTEM.equals( scope ) ) + { + // system scopes come through unchanged... + desiredScope = Artifact.SCOPE_SYSTEM; + } + ArtifactHandler handler = artifactHandlerManager.getArtifactHandler( type ); return new DefaultArtifact( groupId, artifactId, versionRange, desiredScope, type, classifier, handler,