From 5c1fb112b9ba667f66007aace42d11957d2b71a3 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Wed, 22 Jun 2005 13:25:06 +0000 Subject: [PATCH] avoid circular dependency in test cases git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191833 13f79535-47bb-0310-9956-ffa450edef68 --- .../ProjectClasspathArtifactResolver.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/maven-project/src/test/java/org/apache/maven/project/ProjectClasspathArtifactResolver.java b/maven-project/src/test/java/org/apache/maven/project/ProjectClasspathArtifactResolver.java index b406dfcfbf..1b3a4b9e03 100644 --- a/maven-project/src/test/java/org/apache/maven/project/ProjectClasspathArtifactResolver.java +++ b/maven-project/src/test/java/org/apache/maven/project/ProjectClasspathArtifactResolver.java @@ -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 ) {