ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gscok...@apache.org
Subject svn commit: r600876 - in /ant/ivy/core/trunk: src/java/org/apache/ivy/core/resolve/ test/java/org/apache/ivy/core/resolve/ test/repositories/1/orgConflictAndPrivateConf/ test/repositories/1/orgConflictAndPrivateConf/modA/ test/repositories/1/orgConflic...
Date Tue, 04 Dec 2007 11:02:05 GMT
Author: gscokart
Date: Tue Dec  4 03:02:01 2007
New Revision: 600876

URL: http://svn.apache.org/viewvc?rev=600876&view=rev
Log:
fix regression found when configuration extends private confuration and is transfered to an
other version because of a conflict detected

Added:
    ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/
    ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modA/
    ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modA/ivys/
    ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modA/ivys/ivy-1.0.xml
  (with props)
    ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modB/
    ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modB/ivys/
    ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modB/ivys/ivy-1.0.xml
    ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modC/
    ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modC/ivys/
    ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modC/ivys/ivy-1.0.xml
  (with props)
    ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modC/ivys/ivy-1.1.xml
  (with props)
    ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/root/
    ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/root/ivys/
    ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/root/ivys/ivy-1.0.xml
Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveTest.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java?rev=600876&r1=600875&r2=600876&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveEngine.java Tue Dec  4
03:02:01 2007
@@ -667,7 +667,12 @@
                 // been updated when evicting another module), we fetch them now
                 confs = dep.getConfsToFetch();
                 for (int i = 0; i < confs.length; i++) {
-                    fetchDependencies(dep, confs[i], true);
+                    //shouldBeFixed=false to because some of those dependencies might
+                    //be private when they were actually extending public conf.
+                    //Should we keep two list of confs to fetch (private&public)?
+                    //I don't think, visibility is already checked, and a change in the 
+                    //configuration between version might anyway have worse problems.
+                    fetchDependencies(dep, confs[i], false);
                 }
             }
         }

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=600876&r1=600875&r2=600876&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 Tue Dec  4 03:02:01
2007
@@ -3565,6 +3565,15 @@
         assertEquals("1.1", dependency.getResolvedId().getRevision());
     }
 
+    
+    public void testPrivateConfigurationTransferWhenConflict() throws Exception {       

+        ResolveReport report = ivy.resolve(
+            new File("test/repositories/1/orgConflictAndPrivateConf/root/ivys/ivy-1.0.xml").toURL(),
+            getResolveOptions(new String[] {"assembly"}));
+        assertFalse(report.hasError());        
+    }
+
+    
     // //////////////////////////////////////////////////////////
     // helper methods to ease the tests
     // //////////////////////////////////////////////////////////

Added: ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modA/ivys/ivy-1.0.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modA/ivys/ivy-1.0.xml?rev=600876&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modA/ivys/ivy-1.0.xml
(added)
+++ ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modA/ivys/ivy-1.0.xml
Tue Dec  4 03:02:01 2007
@@ -0,0 +1,37 @@
+<!--
+   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="orgConflictAndPrivateConf"
+	       module="modA"
+	       revision="1.0"
+	       status="integration"
+	       publication="20041201120000"
+	/>
+	<configurations>
+		<conf name="runtime" extends="compile"/>
+		<conf name="compile" extends="interface" visibility="private"/>
+		<conf name="interface"/>
+		<conf name="assembly"/>
+	</configurations>
+	<publications/>
+	<dependencies defaultconfmapping="runtime->runtime;compile->interface;interface->interface"
+	 			confmappingoverride="true">
+		<dependency name="modC" rev="1.0" conf="compile"/>
+	</dependencies>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modA/ivys/ivy-1.0.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modB/ivys/ivy-1.0.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modB/ivys/ivy-1.0.xml?rev=600876&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modB/ivys/ivy-1.0.xml
(added)
+++ ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modB/ivys/ivy-1.0.xml
Tue Dec  4 03:02:01 2007
@@ -0,0 +1,37 @@
+<!--
+   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="orgConflictAndPrivateConf"
+	       module="modB"
+	       revision="1.0"
+	       status="integration"
+	       publication="20041201120000"
+	/>
+	<configurations>
+		<conf name="runtime" extends="compile"/>
+		<conf name="compile" extends="interface" visibility="private"/>
+		<conf name="interface"/>
+		<conf name="assembly"/>
+	</configurations>
+	<publications/>
+	<dependencies defaultconfmapping="runtime->runtime;compile->interface;interface->interface"
+	 			confmappingoverride="true">
+		<dependency name="modC" rev="1.1" conf="compile"/>
+	</dependencies>
+</ivy-module>

Added: ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modC/ivys/ivy-1.0.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modC/ivys/ivy-1.0.xml?rev=600876&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modC/ivys/ivy-1.0.xml
(added)
+++ ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modC/ivys/ivy-1.0.xml
Tue Dec  4 03:02:01 2007
@@ -0,0 +1,35 @@
+<!--
+   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="orgConflictAndPrivateConf"
+	       module="modC"
+	       revision="1.0"
+	       status="integration"
+	       publication="20041201120000"
+	/>
+	<configurations>
+		<conf name="runtime" extends="compile"/>
+		<conf name="compile" extends="interface" visibility="private"/>
+		<conf name="interface"/>
+		<conf name="assembly"/>
+	</configurations>
+	<publications/>
+	<dependencies>
+	</dependencies>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modC/ivys/ivy-1.0.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modC/ivys/ivy-1.1.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modC/ivys/ivy-1.1.xml?rev=600876&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modC/ivys/ivy-1.1.xml
(added)
+++ ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modC/ivys/ivy-1.1.xml
Tue Dec  4 03:02:01 2007
@@ -0,0 +1,35 @@
+<!--
+   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="orgConflictAndPrivateConf"
+	       module="modC"
+	       revision="1.1"
+	       status="integration"
+	       publication="20041201120000"
+	/>
+	<configurations>
+		<conf name="runtime" extends="compile"/>
+		<conf name="compile" extends="interface" visibility="private"/>
+		<conf name="interface"/>
+		<conf name="assembly"/>
+	</configurations>
+	<publications/>
+	<dependencies>
+	</dependencies>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/modC/ivys/ivy-1.1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/root/ivys/ivy-1.0.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/root/ivys/ivy-1.0.xml?rev=600876&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/root/ivys/ivy-1.0.xml
(added)
+++ ant/ivy/core/trunk/test/repositories/1/orgConflictAndPrivateConf/root/ivys/ivy-1.0.xml
Tue Dec  4 03:02:01 2007
@@ -0,0 +1,34 @@
+<!--
+   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="orgConflictAndPrivateConf"
+	       module="root"
+	       revision="1.0"
+	       status="integration"
+	       publication="20041201120000"
+	/>
+	<configurations>
+		<conf name="assembly"/>
+	</configurations>
+	<publications/>
+	<dependencies defaultconfmapping="assembly->assembly,runtime" confmappingoverride="true">
+		<dependency name="modA" rev="1.0" conf="assembly"/>
+		<dependency name="modB" rev="1.0" conf="assembly"/>
+	</dependencies>
+</ivy-module>



Mime
View raw message