Author: brett
Date: Mon Sep 26 07:07:09 2005
New Revision: 291627
URL: http://svn.apache.org/viewcvs?rev=291627&view=rev
Log:
PR: MNG-1007
confirm this is fixed
Modified:
maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java
Modified:
maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java
URL:
http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java?rev=291627&r1=291626&r2=291627&view=diff
==============================================================================
---
maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java
(original)
+++
maven/components/trunk/maven-artifact/src/test/java/org/apache/maven/artifact/resolver/DefaultArtifactCollectorTest.java
Mon Sep 26 07:07:09 2005
@@ -239,6 +239,19 @@
assertEquals( "Check version", "2.0", getArtifact( "b",
res.getArtifacts() ).getVersion() );
}
+ public void testResolveLocalWithNewerVersionButLesserScope()
+ throws ArtifactResolutionException,
InvalidVersionSpecificationException
+ {
+ ArtifactSpec a = createArtifact( "commons-logging", "1.0" );
+ a.addDependency( "junit", "3.7" );
+ ArtifactSpec b = createArtifact( "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() );
+ assertEquals( "Check version", "3.8.1", getArtifact( "junit",
res.getArtifacts() ).getVersion() );
+ assertEquals( "Check scope", Artifact.SCOPE_COMPILE, getArtifact(
"junit", res.getArtifacts() ).getScope() );
+ }
+
public void testResolveNearestWithRanges()
throws ArtifactResolutionException,
InvalidVersionSpecificationException
{
@@ -590,7 +603,7 @@
public ArtifactSpec addDependency( String id, String version )
throws InvalidVersionSpecificationException
{
- return addDependency( id, version, null );
+ return addDependency( id, version, Artifact.SCOPE_COMPILE );
}
public ArtifactSpec addDependency( String id, String version, String
scope )
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]