maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r553210 - /maven/components/branches/maven-2.0.x/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java
Date Wed, 04 Jul 2007 13:50:47 GMT
Author: markh
Date: Wed Jul  4 06:50:46 2007
New Revision: 553210

URL: http://svn.apache.org/viewvc?view=rev&rev=553210
Log:
Refactored createArtifact methods to createArtifactSpec to make way for some real createArtifact
methods.

Modified:
    maven/components/branches/maven-2.0.x/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java

Modified: maven/components/branches/maven-2.0.x/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java
URL: http://svn.apache.org/viewvc/maven/components/branches/maven-2.0.x/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java?view=diff&rev=553210&r1=553209&r2=553210
==============================================================================
--- maven/components/branches/maven-2.0.x/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java
(original)
+++ maven/components/branches/maven-2.0.x/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java
Wed Jul  4 06:50:46 2007
@@ -72,14 +72,14 @@
         this.artifactFactory = (ArtifactFactory) lookup( ArtifactFactory.ROLE );
         this.artifactCollector = new DefaultArtifactCollector();
 
-        this.projectArtifact = createArtifact( "project", "1.0", null );
+        this.projectArtifact = createArtifactSpec( "project", "1.0", null );
     }
 
     // works, but we don't fail on cycles presently
     public void disabledtestCircularDependencyNotIncludingCurrentProject()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         ArtifactSpec b = a.addDependency( "b", "1.0" );
         b.addDependency( "a", "1.0" );
         try
@@ -97,7 +97,7 @@
     public void disabledtestCircularDependencyIncludingCurrentProject()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         ArtifactSpec b = a.addDependency( "b", "1.0" );
         b.addDependency( "project", "1.0" );
         try
@@ -114,7 +114,7 @@
     public void testResolveWithFilter()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         ArtifactSpec b = a.addDependency( "b", "1.0" );
         ArtifactSpec c = a.addDependency( "c", "3.0" );
 
@@ -133,12 +133,12 @@
     public void testResolveCorrectDependenciesWhenDifferentDependenciesOnNearest()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         ArtifactSpec b = a.addDependency( "b", "1.0" );
         ArtifactSpec c2 = b.addDependency( "c", "2.0" );
         c2.addDependency( "d", "1.0" );
 
-        ArtifactSpec e = createArtifact( "e", "1.0" );
+        ArtifactSpec e = createArtifactSpec( "e", "1.0" );
         ArtifactSpec c1 = e.addDependency( "c", "1.0" );
         ArtifactSpec f = c1.addDependency( "f", "1.0" );
 
@@ -153,12 +153,12 @@
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
         // TODO: use newest conflict resolver
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         ArtifactSpec b = a.addDependency( "b", "1.0" );
         ArtifactSpec c2 = b.addDependency( "c", "2.0" );
         ArtifactSpec d = c2.addDependency( "d", "1.0" );
 
-        ArtifactSpec e = createArtifact( "e", "1.0" );
+        ArtifactSpec e = createArtifactSpec( "e", "1.0" );
         ArtifactSpec c1 = e.addDependency( "c", "1.0" );
         c1.addDependency( "f", "1.0" );
 
@@ -173,7 +173,7 @@
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
         // TODO: use newest conflict resolver
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         ArtifactSpec b1 = a.addDependency( "b", "1.0" );
         ArtifactSpec c = a.addDependency( "c", "1.0" );
         ArtifactSpec d2 = b1.addDependency( "d", "2.0" );
@@ -193,7 +193,7 @@
     public void testResolveNearestNewestIsNearest()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         ArtifactSpec b = a.addDependency( "b", "1.0" );
         ArtifactSpec c = a.addDependency( "c", "3.0" );
 
@@ -208,7 +208,7 @@
     public void testResolveNearestOldestIsNearest()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         ArtifactSpec b = a.addDependency( "b", "1.0" );
         ArtifactSpec c = a.addDependency( "c", "2.0" );
 
@@ -223,9 +223,9 @@
     public void testResolveLocalNewestIsLocal()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         a.addDependency( "b", "2.0" );
-        ArtifactSpec b = createArtifact( "b", "3.0" );
+        ArtifactSpec b = createArtifactSpec( "b", "3.0" );
 
         ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, b.artifact}
) );
         assertEquals( "Check artifact list", createSet( new Object[]{a.artifact, b.artifact}
), res.getArtifacts() );
@@ -235,9 +235,9 @@
     public void testResolveLocalOldestIsLocal()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         a.addDependency( "b", "3.0" );
-        ArtifactSpec b = createArtifact( "b", "2.0" );
+        ArtifactSpec b = createArtifactSpec( "b", "2.0" );
 
         ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, b.artifact}
) );
         assertEquals( "Check artifact list", createSet( new Object[]{a.artifact, b.artifact}
), res.getArtifacts() );
@@ -247,9 +247,9 @@
     public void testResolveLocalWithNewerVersionButLesserScope()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "commons-logging", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "commons-logging", "1.0" );
         a.addDependency( "junit", "3.7" );
-        ArtifactSpec b = createArtifact( "junit", "3.8.1", Artifact.SCOPE_TEST );
+        ArtifactSpec b = createArtifactSpec( "junit", "3.8.1", Artifact.SCOPE_TEST );
 
         ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, b.artifact}
) );
         assertEquals( "Check artifact list", createSet( new Object[]{a.artifact, b.artifact}
), res.getArtifacts() );
@@ -260,8 +260,8 @@
     public void testResolveLocalWithNewerVersionButLesserScopeResolvedFirst()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec b = createArtifact( "junit", "3.8.1", Artifact.SCOPE_TEST );
-        ArtifactSpec a = createArtifact( "commons-logging", "1.0" );
+        ArtifactSpec b = createArtifactSpec( "junit", "3.8.1", Artifact.SCOPE_TEST );
+        ArtifactSpec a = createArtifactSpec( "commons-logging", "1.0" );
         a.addDependency( "junit", "3.7" );
 
         ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, b.artifact}
) );
@@ -273,7 +273,7 @@
     public void testResolveNearestWithRanges()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         ArtifactSpec b = a.addDependency( "b", "1.0" );
         ArtifactSpec c = a.addDependency( "c", "2.0" );
 
@@ -288,11 +288,11 @@
     public void testCompatibleRanges()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         ArtifactSpec b = a.addDependency( "b", "1.0" );
         a.addDependency( "c", "[2.0,2.5]" );
         b.addDependency( "c", "[1.0,3.0]" );
-        ArtifactSpec c = createArtifact( "c", "2.5" );
+        ArtifactSpec c = createArtifactSpec( "c", "2.5" );
 
         ArtifactResolutionResult res = collect( a );
 
@@ -304,7 +304,7 @@
     public void testIncompatibleRanges()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         ArtifactSpec b = a.addDependency( "b", "1.0" );
         a.addDependency( "c", "[2.4,3.0]" );
 
@@ -323,7 +323,7 @@
     public void testUnboundedRangeWhenVersionUnavailable()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         ArtifactSpec b = a.addDependency( "b", "1.0" );
         a.addDependency( "c", "[2.0,]" );
         b.addDependency( "c", "[1.0,]" );
@@ -342,10 +342,10 @@
     public void testUnboundedRangeBelowLastRelease()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
-        createArtifact( "c", "1.5" );
-        ArtifactSpec c = createArtifact( "c", "2.0" );
-        createArtifact( "c", "1.1" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
+        createArtifactSpec( "c", "1.5" );
+        ArtifactSpec c = createArtifactSpec( "c", "2.0" );
+        createArtifactSpec( "c", "1.1" );
         a.addDependency( "c", "[1.0,)" );
 
         ArtifactResolutionResult res = collect( a );
@@ -357,8 +357,8 @@
     public void testUnboundedRangeAboveLastRelease()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
-        createArtifact( "c", "2.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
+        createArtifactSpec( "c", "2.0" );
         a.addDependency( "c", "[10.0,)" );
 
         try
@@ -375,11 +375,11 @@
     public void testResolveManagedVersion()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
         a.addDependency( "b", "3.0", Artifact.SCOPE_RUNTIME );
 
-        Artifact managedVersion = createArtifact( "b", "5.0" ).artifact;
-        Artifact modifiedB = createArtifact( "b", "5.0", Artifact.SCOPE_RUNTIME ).artifact;
+        Artifact managedVersion = createArtifactSpec( "b", "5.0" ).artifact;
+        Artifact modifiedB = createArtifactSpec( "b", "5.0", Artifact.SCOPE_RUNTIME ).artifact;
 
         ArtifactResolutionResult res = collect( a, managedVersion );
         assertEquals( "Check artifact list", createSet( new Object[]{a.artifact, modifiedB}
), res.getArtifacts() );
@@ -388,10 +388,10 @@
     public void testCollectChangesVersionOfOriginatingArtifactIfInDependencyManagementHasDifferentVersion()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
 
         Artifact artifact = projectArtifact.artifact;
-        Artifact managedVersion = createArtifact( artifact.getArtifactId(), "2.0" ).artifact;
+        Artifact managedVersion = createArtifactSpec( artifact.getArtifactId(), "2.0" ).artifact;
 
         ArtifactResolutionResult result = collect( a, managedVersion );
 
@@ -405,12 +405,12 @@
     public void testResolveCompileScopeOverTestScope()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
-        ArtifactSpec c = createArtifact( "c", "3.0", Artifact.SCOPE_TEST );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
+        ArtifactSpec c = createArtifactSpec( "c", "3.0", Artifact.SCOPE_TEST );
 
         a.addDependency( "c", "2.0", Artifact.SCOPE_COMPILE );
 
-        Artifact modifiedC = createArtifact( "c", "3.0", Artifact.SCOPE_COMPILE ).artifact;
+        Artifact modifiedC = createArtifactSpec( "c", "3.0", Artifact.SCOPE_COMPILE ).artifact;
 
         ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, c.artifact}
) );
         assertEquals( "Check artifact list", createSet( new Object[]{a.artifact, modifiedC}
), res.getArtifacts() );
@@ -423,12 +423,12 @@
     public void testResolveRuntimeScopeOverTestScope()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
-        ArtifactSpec c = createArtifact( "c", "3.0", Artifact.SCOPE_TEST );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
+        ArtifactSpec c = createArtifactSpec( "c", "3.0", Artifact.SCOPE_TEST );
 
         a.addDependency( "c", "2.0", Artifact.SCOPE_RUNTIME );
 
-        Artifact modifiedC = createArtifact( "c", "3.0", Artifact.SCOPE_RUNTIME ).artifact;
+        Artifact modifiedC = createArtifactSpec( "c", "3.0", Artifact.SCOPE_RUNTIME ).artifact;
 
         ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, c.artifact}
) );
         assertEquals( "Check artifact list", createSet( new Object[]{a.artifact, modifiedC}
), res.getArtifacts() );
@@ -441,13 +441,13 @@
     public void testResolveCompileScopeOverRuntimeScope()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec root = createArtifact( "root", "1.0" );
+        ArtifactSpec root = createArtifactSpec( "root", "1.0" );
         ArtifactSpec a = root.addDependency( "a", "1.0" );
         root.addDependency( "c", "3.0", Artifact.SCOPE_RUNTIME );
 
         a.addDependency( "c", "2.0", Artifact.SCOPE_COMPILE );
 
-        Artifact modifiedC = createArtifact( "c", "3.0", Artifact.SCOPE_COMPILE ).artifact;
+        Artifact modifiedC = createArtifactSpec( "c", "3.0", Artifact.SCOPE_COMPILE ).artifact;
 
         ArtifactResolutionResult res = collect( createSet( new Object[]{root.artifact} )
);
         assertEquals( "Check artifact list", createSet( new Object[]{a.artifact, root.artifact,
modifiedC} ),
@@ -459,12 +459,12 @@
     public void testResolveCompileScopeOverProvidedScope()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
-        ArtifactSpec c = createArtifact( "c", "3.0", Artifact.SCOPE_PROVIDED );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
+        ArtifactSpec c = createArtifactSpec( "c", "3.0", Artifact.SCOPE_PROVIDED );
 
         a.addDependency( "c", "2.0", Artifact.SCOPE_COMPILE );
 
-        Artifact modifiedC = createArtifact( "c", "3.0", Artifact.SCOPE_COMPILE ).artifact;
+        Artifact modifiedC = createArtifactSpec( "c", "3.0", Artifact.SCOPE_COMPILE ).artifact;
 
         ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, c.artifact}
) );
         assertEquals( "Check artifact list", createSet( new Object[]{a.artifact, modifiedC}
), res.getArtifacts() );
@@ -477,12 +477,12 @@
     public void testResolveRuntimeScopeOverProvidedScope()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
-        ArtifactSpec c = createArtifact( "c", "3.0", Artifact.SCOPE_PROVIDED );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
+        ArtifactSpec c = createArtifactSpec( "c", "3.0", Artifact.SCOPE_PROVIDED );
 
         a.addDependency( "c", "2.0", Artifact.SCOPE_RUNTIME );
 
-        Artifact modifiedC = createArtifact( "c", "3.0", Artifact.SCOPE_RUNTIME ).artifact;
+        Artifact modifiedC = createArtifactSpec( "c", "3.0", Artifact.SCOPE_RUNTIME ).artifact;
 
         ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, c.artifact}
) );
         assertEquals( "Check artifact list", createSet( new Object[]{a.artifact, modifiedC}
), res.getArtifacts() );
@@ -495,8 +495,8 @@
     public void testProvidedScopeNotTransitive()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0", Artifact.SCOPE_PROVIDED );
-        ArtifactSpec b = createArtifact( "b", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0", Artifact.SCOPE_PROVIDED );
+        ArtifactSpec b = createArtifactSpec( "b", "1.0" );
         b.addDependency( "c", "3.0", Artifact.SCOPE_PROVIDED );
 
         ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, b.artifact}
) );
@@ -506,8 +506,8 @@
     public void testOptionalNotTransitive()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
-        ArtifactSpec b = createArtifact( "b", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
+        ArtifactSpec b = createArtifactSpec( "b", "1.0" );
         b.addDependency( "c", "3.0", true );
 
         ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, b.artifact}
) );
@@ -517,9 +517,9 @@
     public void testOptionalIncludedAtRoot()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
 
-        ArtifactSpec b = createArtifact( "b", "1.0", true );
+        ArtifactSpec b = createArtifactSpec( "b", "1.0", true );
 
         ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, b.artifact}
) );
         assertEquals( "Check artifact list", createSet( new Object[]{a.artifact, b.artifact}
), res.getArtifacts() );
@@ -574,13 +574,13 @@
     private void checkScopeUpdateTransitively( String farthestScope, String nearestScope,
String expectedScope )
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
-        ArtifactSpec b = createArtifact( "b", "1.0", nearestScope );
-        ArtifactSpec c = createArtifact( "c", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
+        ArtifactSpec b = createArtifactSpec( "b", "1.0", nearestScope );
+        ArtifactSpec c = createArtifactSpec( "c", "1.0" );
         a.addDependency( c );
-        ArtifactSpec dNearest = createArtifact( "d", "2.0" );
+        ArtifactSpec dNearest = createArtifactSpec( "d", "2.0" );
         b.addDependency( dNearest );
-        ArtifactSpec dFarthest = createArtifact( "d", "3.0", farthestScope );
+        ArtifactSpec dFarthest = createArtifactSpec( "d", "3.0", farthestScope );
         c.addDependency( dFarthest );
 
         /* system and provided dependencies are not transitive */
@@ -593,13 +593,13 @@
     private void checkScopeUpdateDirect( String farthestScope, String nearestScope, String
expectedScope )
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
-        ArtifactSpec b = createArtifact( "b", "1.0" );
-        ArtifactSpec c = createArtifact( "c", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
+        ArtifactSpec b = createArtifactSpec( "b", "1.0" );
+        ArtifactSpec c = createArtifactSpec( "c", "1.0" );
         a.addDependency( c );
-        ArtifactSpec dNearest = createArtifact( "d", "2.0", nearestScope );
+        ArtifactSpec dNearest = createArtifactSpec( "d", "2.0", nearestScope );
         b.addDependency( dNearest );
-        ArtifactSpec dFarthest = createArtifact( "d", "3.0", farthestScope );
+        ArtifactSpec dFarthest = createArtifactSpec( "d", "3.0", farthestScope );
         c.addDependency( dFarthest );
 
         checkScopeUpdate( a, b, expectedScope, "2.0" );
@@ -628,7 +628,7 @@
         assertEquals( "Check scope", expectedScope, artifact.getScope() );
         assertEquals( "Check version", expectedVersion, artifact.getVersion() );
 
-        ArtifactSpec d = createArtifact( "d", "1.0" );
+        ArtifactSpec d = createArtifactSpec( "d", "1.0" );
         res = collect( createSet( new Object[]{a.artifact, b.artifact, d.artifact} ), filter
);
         artifact = getArtifact( "d", res.getArtifacts() );
         assertNotNull( "MNG-1895 Dependency was not added to resolution", artifact );
@@ -639,14 +639,14 @@
     public void disabledtestOptionalNotTransitiveButVersionIsInfluential()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0" );
-        ArtifactSpec b = createArtifact( "b", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0" );
+        ArtifactSpec b = createArtifactSpec( "b", "1.0" );
         b.addDependency( "c", "3.0", true );
         ArtifactSpec d = a.addDependency( "d", "1.0" );
         ArtifactSpec e = d.addDependency( "e", "1.0" );
         e.addDependency( "c", "2.0" );
 
-        ArtifactSpec c = createArtifact( "c", "3.0" );
+        ArtifactSpec c = createArtifactSpec( "c", "3.0" );
 
         ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, b.artifact}
) );
         assertEquals( "Check artifact list",
@@ -659,8 +659,8 @@
     public void testTestScopeNotTransitive()
         throws ArtifactResolutionException, InvalidVersionSpecificationException
     {
-        ArtifactSpec a = createArtifact( "a", "1.0", Artifact.SCOPE_TEST );
-        ArtifactSpec b = createArtifact( "b", "1.0" );
+        ArtifactSpec a = createArtifactSpec( "a", "1.0", Artifact.SCOPE_TEST );
+        ArtifactSpec b = createArtifactSpec( "b", "1.0" );
         b.addDependency( "c", "3.0", Artifact.SCOPE_TEST );
 
         ArtifactResolutionResult res = collect( createSet( new Object[]{a.artifact, b.artifact}
) );
@@ -715,25 +715,25 @@
                                           managedVersions, null, null, source, null, Collections.EMPTY_LIST
);
     }
 
-    private ArtifactSpec createArtifact( String id, String version )
+    private ArtifactSpec createArtifactSpec( String id, String version )
         throws InvalidVersionSpecificationException
     {
-        return createArtifact( id, version, Artifact.SCOPE_COMPILE );
+        return createArtifactSpec( id, version, Artifact.SCOPE_COMPILE );
     }
 
-    private ArtifactSpec createArtifact( String id, String version, boolean optional )
+    private ArtifactSpec createArtifactSpec( String id, String version, boolean optional
)
         throws InvalidVersionSpecificationException
     {
-        return createArtifact( id, version, Artifact.SCOPE_COMPILE, null, optional );
+        return createArtifactSpec( id, version, Artifact.SCOPE_COMPILE, null, optional );
     }
 
-    private ArtifactSpec createArtifact( String id, String version, String scope )
+    private ArtifactSpec createArtifactSpec( String id, String version, String scope )
         throws InvalidVersionSpecificationException
     {
-        return createArtifact( id, version, scope, null, false );
+        return createArtifactSpec( id, version, scope, null, false );
     }
 
-    private ArtifactSpec createArtifact( String id, String version, String scope, String
inheritedScope,
+    private ArtifactSpec createArtifactSpec( String id, String version, String scope, String
inheritedScope,
                                          boolean optional )
         throws InvalidVersionSpecificationException
     {
@@ -786,7 +786,7 @@
         private ArtifactSpec addDependency( String id, String version, String scope, boolean
optional )
             throws InvalidVersionSpecificationException
         {
-            ArtifactSpec dep = createArtifact( id, version, scope, this.artifact.getScope(),
optional );
+            ArtifactSpec dep = createArtifactSpec( id, version, scope, this.artifact.getScope(),
optional );
             return addDependency( dep );
         }
 



Mime
View raw message