You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by ma...@apache.org on 2007/09/21 11:14:49 UTC

svn commit: r578065 - in /incubator/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/ant/IvyAntVariableContainer.java test/java/org/apache/ivy/ant/IvyAntSettingsTest.java test/java/org/apache/ivy/ant/ivysettings-include-twice.xml

Author: maartenc
Date: Fri Sep 21 04:14:48 2007
New Revision: 578065

URL: http://svn.apache.org/viewvc?rev=578065&view=rev
Log:
FIX: Ivy settings include -tag url attribute does not work correctly (IVY-601)

Added:
    incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/ivysettings-include-twice.xml
Modified:
    incubator/ivy/core/trunk/CHANGES.txt
    incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java
    incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyAntSettingsTest.java

Modified: incubator/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/CHANGES.txt?rev=578065&r1=578064&r2=578065&view=diff
==============================================================================
--- incubator/ivy/core/trunk/CHANGES.txt (original)
+++ incubator/ivy/core/trunk/CHANGES.txt Fri Sep 21 04:14:48 2007
@@ -51,6 +51,7 @@
 
    version in SVN
 =====================================
+- FIX: Ivy settings include -tag url attribute does not work correctly (IVY-601)
 - FIX: Static revision replacement is not working when a dynamic revision is evicted by a transitive dependency (IVY-603) (with contribution from Matthias Kilian)
 - FIX: NullPointerException whilst resolving transitive dependencies (IVY-590)
 - FIX: cachepath based on a resolve done in a previous build broken (IVY-583)

Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java?rev=578065&r1=578064&r2=578065&view=diff
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/ant/IvyAntVariableContainer.java Fri Sep 21 04:14:48 2007
@@ -96,4 +96,10 @@
             project.setProperty(property, value);
         }
     }
+    
+    public Object clone() {
+        IvyAntVariableContainer result = (IvyAntVariableContainer) super.clone();
+        result.overwrittenProperties = (HashMap) ((HashMap) this.overwrittenProperties).clone();
+        return result;
+    }
 }

Modified: incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyAntSettingsTest.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyAntSettingsTest.java?rev=578065&r1=578064&r2=578065&view=diff
==============================================================================
--- incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyAntSettingsTest.java (original)
+++ incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyAntSettingsTest.java Fri Sep 21 04:14:48 2007
@@ -17,6 +17,8 @@
  */
 package org.apache.ivy.ant;
 
+import java.io.File;
+
 import org.apache.tools.ant.Project;
 
 import junit.framework.TestCase;
@@ -44,6 +46,14 @@
             antSettings.getProject().getProperty("ivy.test.variable"));
         assertEquals("value", 
             antSettings.getProject().getProperty("ivy.test.variable.this.id"));
+    }
+
+    public void testIncludeTwice() throws Exception {
+        // IVY-601
+        antSettings.setFile(new File("test/java/org/apache/ivy/ant/ivysettings-include-twice.xml"));
+        antSettings.setId("this.id");
+
+        assertNotNull(antSettings.getConfiguredIvyInstance());
     }
 
 

Added: incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/ivysettings-include-twice.xml
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/ivysettings-include-twice.xml?rev=578065&view=auto
==============================================================================
--- incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/ivysettings-include-twice.xml (added)
+++ incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/ivysettings-include-twice.xml Fri Sep 21 04:14:48 2007
@@ -0,0 +1,22 @@
+<!--
+   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.    
+-->
+<ivysettings>
+	<include url="file:${ivy.settings.dir}/ivysettings-props.xml"/>
+	<include url="file:${ivy.settings.dir}/ivysettings-test.xml"/>
+</ivysettings>