don't inherit test deps

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@314948 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-10-12 15:27:52 +00:00
parent e8540568ae
commit 608c1ebb93
1 changed files with 19 additions and 15 deletions

View File

@ -164,8 +164,8 @@ public class ModelReader
}
else if ( rawName.equals( "dependency" ) )
{
List chain = Collections.singletonList(
new Dependency( groupId, artifactId, version, packaging, this.chain ) );
List chain =
Collections.singletonList( new Dependency( groupId, artifactId, version, packaging, this.chain ) );
currentDependency = new Dependency( chain );
insideDependency = true;
@ -245,8 +245,8 @@ public class ModelReader
}
// actually, these should be transtive (see MNG-77) - but some projects have circular deps that way
ModelReader p = retrievePom( parentGroupId, parentArtifactId, parentVersion, "pom", false,
excluded, Collections.EMPTY_LIST );
ModelReader p = retrievePom( parentGroupId, parentArtifactId, parentVersion, "pom", false, excluded,
Collections.EMPTY_LIST );
addDependencies( p.getDependencies(), parentDependencies, null, excluded );
@ -473,6 +473,9 @@ public class ModelReader
{
Dependency d = (Dependency) i.next();
// skip test deps
if ( !Dependency.SCOPE_TEST.equals( d.getScope() ) )
{
// Do we care about runtime here?
if ( Dependency.SCOPE_TEST.equals( inheritedScope ) )
{
@ -490,6 +493,7 @@ public class ModelReader
}
}
}
}
private boolean hasDependency( Dependency d, Map dependencies )
{