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:
Brett Leslie Porter 2005-06-22 13:25:06 +00:00
parent 37007c1891
commit 5c1fb112b9
1 changed files with 13 additions and 4 deletions

View File

@ -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 )
{