mirror of https://github.com/apache/maven.git
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:
parent
e8540568ae
commit
608c1ebb93
|
@ -164,8 +164,8 @@ public class ModelReader
|
||||||
}
|
}
|
||||||
else if ( rawName.equals( "dependency" ) )
|
else if ( rawName.equals( "dependency" ) )
|
||||||
{
|
{
|
||||||
List chain = Collections.singletonList(
|
List chain =
|
||||||
new Dependency( groupId, artifactId, version, packaging, this.chain ) );
|
Collections.singletonList( new Dependency( groupId, artifactId, version, packaging, this.chain ) );
|
||||||
currentDependency = new Dependency( chain );
|
currentDependency = new Dependency( chain );
|
||||||
|
|
||||||
insideDependency = true;
|
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
|
// actually, these should be transtive (see MNG-77) - but some projects have circular deps that way
|
||||||
ModelReader p = retrievePom( parentGroupId, parentArtifactId, parentVersion, "pom", false,
|
ModelReader p = retrievePom( parentGroupId, parentArtifactId, parentVersion, "pom", false, excluded,
|
||||||
excluded, Collections.EMPTY_LIST );
|
Collections.EMPTY_LIST );
|
||||||
|
|
||||||
addDependencies( p.getDependencies(), parentDependencies, null, excluded );
|
addDependencies( p.getDependencies(), parentDependencies, null, excluded );
|
||||||
|
|
||||||
|
@ -473,6 +473,9 @@ public class ModelReader
|
||||||
{
|
{
|
||||||
Dependency d = (Dependency) i.next();
|
Dependency d = (Dependency) i.next();
|
||||||
|
|
||||||
|
// skip test deps
|
||||||
|
if ( !Dependency.SCOPE_TEST.equals( d.getScope() ) )
|
||||||
|
{
|
||||||
// Do we care about runtime here?
|
// Do we care about runtime here?
|
||||||
if ( Dependency.SCOPE_TEST.equals( inheritedScope ) )
|
if ( Dependency.SCOPE_TEST.equals( inheritedScope ) )
|
||||||
{
|
{
|
||||||
|
@ -490,6 +493,7 @@ public class ModelReader
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private boolean hasDependency( Dependency d, Map dependencies )
|
private boolean hasDependency( Dependency d, Map dependencies )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue