Author: mbenson
Date: Fri Feb 12 22:12:33 2010
New Revision: 909635

URL: http://svn.apache.org/viewvc?rev=909635&view=rev
Log:
[IVY-1171] test

Added:
    ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-publish-public.xml
Modified:
    ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPublishTest.java

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPublishTest.java
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPublishTest.java?rev=909635&r1=909634&r2=909635&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPublishTest.java 
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyPublishTest.java Fri Feb 
12 22:12:33 2010
@@ -251,6 +251,28 @@
         assertTrue(new 
File("test/repositories/1/apache/multi/jars/multi2-1.2.jar").exists());
     }
 
+    public void testPublishPublicConfigsByWildcard() throws Exception {
+        project.setProperty("ivy.dep.file", 
"test/java/org/apache/ivy/ant/ivy-publish-public.xml");
+        IvyResolve res = new IvyResolve();
+        res.setProject(project);
+        res.execute();
+
+        publish.setPubrevision("1.2");
+        publish.setResolver("1");
+        publish.setConf("*(public)");
+        File art = new File("build/test/publish/publish-public-1.2.jar");
+        FileUtil.copy(new 
File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"), art, null);
+        
publish.addArtifactspattern("build/test/publish/[artifact]-[revision].[ext]");
+        publish.execute();
+
+        // should have do the ivy delivering
+        assertTrue(new File("build/test/publish/ivy-1.2.xml").exists());
+        
+        // should have published the files with "1" resolver
+        assertTrue(new 
File("test/repositories/1/apache/publish-public/ivys/ivy-1.2.xml").exists());
+        assertTrue(new 
File("test/repositories/1/apache/publish-public/jars/publish-public-1.2.jar").exists());
+    }
+
     public void testCustom() throws Exception {
         project.setProperty("ivy.dep.file", 
"test/java/org/apache/ivy/ant/ivy-custom.xml");
         IvyResolve res = new IvyResolve();

Added: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-publish-public.xml
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-publish-public.xml?rev=909635&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-publish-public.xml 
(added)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/ivy-publish-public.xml Fri 
Feb 12 22:12:33 2010
@@ -0,0 +1,29 @@
+<!--
+   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="1.0">
+       <info organisation="apache"
+              module="publish-public"
+              revision="1.0"
+              status="release"
+       />
+       <configurations>
+               <conf name="default" description="The default dependencies" />
+               <conf name="private" visibility="private"/>
+       </configurations>
+</ivy-module>


Reply via email to