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
This commit is contained in:
John Dennis Casey 2005-11-03 21:09:08 +00:00
parent 726e0fda4d
commit c63c860065
1 changed files with 6 additions and 5 deletions

View File

@ -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,