mirror of https://github.com/apache/maven.git
avoid circular dependency in test cases
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191833 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
37007c1891
commit
5c1fb112b9
|
@ -60,10 +60,19 @@ public class ProjectClasspathArtifactResolver
|
|||
try
|
||||
{
|
||||
String scope = artifact.getArtifactId().substring( "scope-".length() );
|
||||
String name = "/projects/scope/transitive-" + scope + "-dep.xml";
|
||||
r = new InputStreamReader( getClass().getResourceAsStream( name ) );
|
||||
MavenXpp3Reader reader = new MavenXpp3Reader();
|
||||
model = reader.read( r );
|
||||
if ( artifact.getGroupId().equals( "maven-test" ) )
|
||||
{
|
||||
String name = "/projects/scope/transitive-" + scope + "-dep.xml";
|
||||
r = new InputStreamReader( getClass().getResourceAsStream( name ) );
|
||||
MavenXpp3Reader reader = new MavenXpp3Reader();
|
||||
model = reader.read( r );
|
||||
}
|
||||
else
|
||||
{
|
||||
model = new Model();
|
||||
}
|
||||
model.setGroupId( artifact.getGroupId() );
|
||||
model.setArtifactId( artifact.getArtifactId() );
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue