You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by gs...@apache.org on 2009/09/05 17:25:45 UTC

svn commit: r811665 - in /ant/ivy/core/trunk: doc/use/install.html test/java/org/apache/ivy/ant/IvyInstallTest.java

Author: gscokart
Date: Sat Sep  5 15:25:42 2009
New Revision: 811665

URL: http://svn.apache.org/viewvc?rev=811665&view=rev
Log:
Add documentation and unit test for (IVY-1021)

Modified:
    ant/ivy/core/trunk/doc/use/install.html
    ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java

Modified: ant/ivy/core/trunk/doc/use/install.html
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/use/install.html?rev=811665&r1=811664&r2=811665&view=diff
==============================================================================
--- ant/ivy/core/trunk/doc/use/install.html (original)
+++ ant/ivy/core/trunk/doc/use/install.html Sat Sep  5 15:25:42 2009
@@ -50,6 +50,8 @@
         <td>No, defaults to default branch with exact matcher, '*' with any other matcher</td></tr>
     <tr><td>revision</td><td>the revision of the module to install</td>
         <td>Yes</td></tr>
+    <tr><td>type</td><td>the type(s) of artefact(s) to install.  You can give multiple values separated by commas</td>
+        <td>No, defaults to '*' meaning all types</td></tr>
     <tr><td>validate</td><td>true to force ivy files validation against ivy.xsd, false to force no validation</td>
         <td>No. Defaults to default ivy value (as configured in configuration file)</td></tr>
     <tr><td>overwrite</td><td>true to override modules already present in the destination resolver, false otherwise</td>

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java?rev=811665&r1=811664&r2=811665&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyInstallTest.java Sat Sep  5 15:25:42 2009
@@ -84,6 +84,48 @@
         assertTrue(new File("build/test/install/org1/mod1.2/mod1.2-2.2.jar").exists());
     }
 
+    public void testInstallWithAnyType() {
+        project.setProperty("ivy.settings.file", "test/repositories/ivysettings-dummydefaultresolver.xml");
+        install.setOrganisation("org8");
+        install.setModule("mod8.1");
+        install.setRevision("1.1");
+        install.setFrom("2");
+        install.setTo("install");
+        install.setType("*");
+
+        install.execute();
+
+        assertTrue(new File("build/test/install/org8/mod8.1/a-1.1.txt").exists());        
+    }
+    
+    public void testInstallWithMultipleType() {
+        project.setProperty("ivy.settings.file", "test/repositories/ivysettings-dummydefaultresolver.xml");
+        install.setOrganisation("org8");
+        install.setModule("mod8.1");
+        install.setRevision("1.1");
+        install.setFrom("2");
+        install.setTo("install");
+        install.setType("unused,txt,other");
+
+        install.execute();
+
+        assertTrue(new File("build/test/install/org8/mod8.1/a-1.1.txt").exists());        
+    }
+
+    public void testInstallWithUnusedType() {
+        project.setProperty("ivy.settings.file", "test/repositories/ivysettings-dummydefaultresolver.xml");
+        install.setOrganisation("org8");
+        install.setModule("mod8.1");
+        install.setRevision("1.1");
+        install.setFrom("2");
+        install.setTo("install");
+        install.setType("unused");
+
+        install.execute();
+
+        assertFalse(new File("build/test/install/org8/mod8.1/a-1.1.txt").exists());        
+    }
+    
     public void testIVY843() {
         project.setProperty("ivy.settings.file", "test/repositories/ivysettings-IVY843.xml");
         install.setOrganisation("org1");