maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1402786 - in /maven/maven-3/trunk/maven-aether-provider/src/test: java/org/apache/maven/repository/internal/ resources/repo/ut/simple/artifact/1.0/ resources/repo/ut/simple/dependency/1.0/
Date Sat, 27 Oct 2012 12:20:38 GMT
Author: hboutemy
Date: Sat Oct 27 12:20:37 2012
New Revision: 1402786

URL: http://svn.apache.org/viewvc?rev=1402786&view=rev
Log:
added dependency with classifier test

Added:
    maven/maven-3/trunk/maven-aether-provider/src/test/resources/repo/ut/simple/dependency/1.0/dependency-1.0-sources.jar
  (with props)
Modified:
    maven/maven-3/trunk/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/RepositorySystemTest.java
    maven/maven-3/trunk/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/1.0/artifact-1.0.pom

Modified: maven/maven-3/trunk/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/RepositorySystemTest.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/RepositorySystemTest.java?rev=1402786&r1=1402785&r2=1402786&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/RepositorySystemTest.java
(original)
+++ maven/maven-3/trunk/maven-aether-provider/src/test/java/org/apache/maven/repository/internal/RepositorySystemTest.java
Sat Oct 27 12:20:37 2012
@@ -65,12 +65,12 @@ public class RepositorySystemTest
         Artifact artifact = new DefaultArtifact( artifactCoords );
 
         CollectRequest collectRequest = new CollectRequest();
-        collectRequest.setRoot( new Dependency( artifact, "" ) );
+        collectRequest.setRoot( new Dependency( artifact, null ) );
         collectRequest.addRepository( newTestRepository() );
 
         CollectResult collectResult = system.collectDependencies( session, collectRequest
);
 
-        assertEquals( 1, collectResult.getRoot().getChildren().size() );
+        assertEquals( 2, collectResult.getRoot().getChildren().size() );
         Dependency dep = collectResult.getRoot().getChildren().get( 0 ).getDependency();
         assertEquals( "compile", dep.getScope() );
         assertFalse( dep.isOptional() );
@@ -89,6 +89,25 @@ public class RepositorySystemTest
         assertEquals( "true", depArtifact.getProperty( "constitutesBuildPath", null ) );
         assertEquals( "false", depArtifact.getProperty( "includesDependencies", null ) );
         assertEquals( 4, depArtifact.getProperties().size() );
+
+        dep = collectResult.getRoot().getChildren().get( 1 ).getDependency();
+        assertEquals( "compile", dep.getScope() );
+        assertFalse( dep.isOptional() );
+        assertEquals( 0, dep.getExclusions().size() );
+        depArtifact = dep.getArtifact();
+        assertEquals( "ut.simple", depArtifact.getGroupId() );
+        assertEquals( "dependency", depArtifact.getArtifactId() );
+        assertEquals( "1.0", depArtifact.getVersion() );
+        assertEquals( "1.0", depArtifact.getBaseVersion() );
+        assertNull( depArtifact.getFile() );
+        assertFalse( depArtifact.isSnapshot() );
+        assertEquals( "sources", depArtifact.getClassifier() );
+        assertEquals( "jar", depArtifact.getExtension() );
+        assertEquals( "java", depArtifact.getProperty( "language", null ) );
+        assertEquals( "jar", depArtifact.getProperty( "type", null ) ); // shouldn't it be
java-sources given the classifier?
+        assertEquals( "true", depArtifact.getProperty( "constitutesBuildPath", null ) );
// shouldn't it be false given the classifier?
+        assertEquals( "false", depArtifact.getProperty( "includesDependencies", null ) );
+        assertEquals( 4, depArtifact.getProperties().size() );
     }
 
     public static RepositorySystemSession newMavenRepositorySystemSession( RepositorySystem
system )

Modified: maven/maven-3/trunk/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/1.0/artifact-1.0.pom
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/1.0/artifact-1.0.pom?rev=1402786&r1=1402785&r2=1402786&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/1.0/artifact-1.0.pom
(original)
+++ maven/maven-3/trunk/maven-aether-provider/src/test/resources/repo/ut/simple/artifact/1.0/artifact-1.0.pom
Sat Oct 27 12:20:37 2012
@@ -38,5 +38,11 @@
       <groupId>ut.simple</groupId>
       <artifactId>dependency</artifactId>
     </dependency>
+    <dependency>
+      <groupId>ut.simple</groupId>
+      <artifactId>dependency</artifactId>
+      <version>1.0</version>
+      <classifier>sources</classifier>
+    </dependency>
   </dependencies>
 </project>
\ No newline at end of file

Added: maven/maven-3/trunk/maven-aether-provider/src/test/resources/repo/ut/simple/dependency/1.0/dependency-1.0-sources.jar
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-aether-provider/src/test/resources/repo/ut/simple/dependency/1.0/dependency-1.0-sources.jar?rev=1402786&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/maven-3/trunk/maven-aether-provider/src/test/resources/repo/ut/simple/dependency/1.0/dependency-1.0-sources.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message