ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r663866 - in /ant/ivy/core/trunk/test: java/org/apache/ivy/core/resolve/ repositories/m2/org/apache/test-sources/ repositories/m2/org/apache/test-sources/1.0/
Date Fri, 06 Jun 2008 08:58:57 GMT
Author: xavier
Date: Fri Jun  6 01:58:56 2008
New Revision: 663866

URL: http://svn.apache.org/viewvc?rev=663866&view=rev
Log:
add unit test for getting sources from m2 repository

Added:
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ivy-m2-with-sources.xml   (with
props)
    ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/
    ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/
    ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/test-sources-1.0-sources.jar
  (with props)
    ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/test-sources-1.0.jar
  (with props)
    ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/test-sources-1.0.pom
  (with props)
Modified:
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java?rev=663866&r1=663865&r2=663866&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java Fri Jun  6 01:58:56
2008
@@ -3543,6 +3543,26 @@
             "1.0", "test-classified", "jar", "jar").exists());
     }
 
+    public void testResolveMaven2GetSources() throws Exception {
+        Ivy ivy = new Ivy();
+        ivy.configure(new File("test/repositories/m2/ivysettings.xml").toURL());
+        ResolveReport report = ivy.resolve(
+            ResolveTest.class.getResource("ivy-m2-with-sources.xml"), 
+            getResolveOptions(new String[] {"*"}));
+        assertNotNull(report);
+        assertFalse(report.hasError());
+
+        assertTrue(getIvyFileInCache(
+            ModuleRevisionId.newInstance("org.apache", "test-sources", "1.0")).exists());
+        File jarFileInCache = getArchiveFileInCache(ivy, "org.apache", "test-sources",
+            "1.0", "test-sources", "jar", "jar");
+        assertTrue(jarFileInCache.exists());
+        File sourceFileInCache = getArchiveFileInCache(ivy, "org.apache", "test-sources",
+            "1.0", "test-sources", "source", "jar");
+        assertTrue(sourceFileInCache.exists());
+        assertTrue(jarFileInCache.length() != sourceFileInCache.length());
+    }
+
     public void testResolveMaven2WithVersionProperty() throws Exception {
         Ivy ivy = new Ivy();
         ivy.configure(new File("test/repositories/m2/ivysettings.xml").toURL());

Added: ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ivy-m2-with-sources.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ivy-m2-with-sources.xml?rev=663866&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ivy-m2-with-sources.xml (added)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ivy-m2-with-sources.xml Fri Jun
 6 01:58:56 2008
@@ -0,0 +1,27 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
+    <info organisation="apache" module="test-m2-with-sources" revision="1.0" />
+    <dependencies>
+ 		   <dependency org="org.apache" name="test-sources" rev="1.0" >
+        	   <artifact name="test-sources" type="jar" ext="jar"/>
+        	   <artifact name="test-sources" type="source" ext="jar" m:classifier="sources"/>
		   
+ 		   </dependency>
+    </dependencies>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ivy-m2-with-sources.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ivy-m2-with-sources.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/test-sources-1.0-sources.jar
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/test-sources-1.0-sources.jar?rev=663866&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/test-sources-1.0-sources.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/test-sources-1.0.jar
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/test-sources-1.0.jar?rev=663866&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/test-sources-1.0.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/test-sources-1.0.pom
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/test-sources-1.0.pom?rev=663866&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/test-sources-1.0.pom
(added)
+++ ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/test-sources-1.0.pom
Fri Jun  6 01:58:56 2008
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache</groupId>
+  <artifactId>test-sources</artifactId>
+  <name>Test Module for Ivy M2 parsing</name>
+  <version>1.0</version>
+  <url>http://ivy.jayasoft.org/</url>
+  <organization>
+    <name>Jayasoft</name>
+    <url>http://www.jayasoft.org/</url>
+  </organization>
+</project>

Propchange: ant/ivy/core/trunk/test/repositories/m2/org/apache/test-sources/1.0/test-sources-1.0.pom
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message