You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by an...@apache.org on 2014/04/27 20:19:51 UTC
svn commit: r1590442 - in /ant/ivy/core/trunk: ./
src/java/org/apache/ivy/plugins/conflict/
test/java/org/apache/ivy/plugins/conflict/ test/repositories/IVY-1399/
test/repositories/IVY-1399/MyCompany/
test/repositories/IVY-1399/MyCompany/A/ test/reposi...
Author: antoine
Date: Sun Apr 27 18:19:50 2014
New Revision: 1590442
URL: http://svn.apache.org/r1590442
Log:
FIX: impossible to get artifacts when data has not been loaded (IVY-1399) (thanks to David Turner)
Added:
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/ivysettings-evicted.xml (with props)
ant/ivy/core/trunk/test/repositories/IVY-1399/
ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/
ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/A/
ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/A/ivy-1.xml (with props)
ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/B/
ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/B/ivy-1.xml (with props)
ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/C/
ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/C/ivy-1.xml (with props)
ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/target/
ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/target/ivy-1.xml (with props)
ant/ivy/core/trunk/test/repositories/IVY-1399/OtherCompany/
ant/ivy/core/trunk/test/repositories/IVY-1399/OtherCompany/prefers-later/
ant/ivy/core/trunk/test/repositories/IVY-1399/OtherCompany/prefers-later/ivy-1.xml (with props)
ant/ivy/core/trunk/test/repositories/IVY-1399/conflicting-dependency/
ant/ivy/core/trunk/test/repositories/IVY-1399/conflicting-dependency/dep/
ant/ivy/core/trunk/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-1.xml (with props)
ant/ivy/core/trunk/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-2.xml (with props)
Modified:
ant/ivy/core/trunk/CHANGES.txt
ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java
Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=1590442&r1=1590441&r2=1590442&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Sun Apr 27 18:19:50 2014
@@ -126,6 +126,7 @@ for detailed view of each issue, please
John Tinetti
Erwin Tratar
Jason Trump
+ David Turner
Tjeerd Verhagen
Richard Vowles
Sven Walter
@@ -142,6 +143,8 @@ for detailed view of each issue, please
=====================================
- IMPROVEMENT: Add support for packed jar within an OSGi bundle
+- FIX: impossible to get artifacts when data has not been loaded. (IVY-1399) (Thanks to David Turner)
+
2.4.0-rc1
=====================================
- DOCUMENTATION: Broken link in <dependency> documentation (IVY-1405)
Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java?rev=1590442&r1=1590441&r2=1590442&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java Sun Apr 27 18:19:50 2014
@@ -103,6 +103,16 @@ public class LatestConflictManager exten
}
}
+ ArrayList unevicted = new ArrayList();
+ for (Iterator iter = conflicts.iterator(); iter.hasNext();) {
+ IvyNode node = (IvyNode) iter.next();
+ if (!node.isCompletelyEvicted())
+ unevicted.add(node);
+ }
+ if (unevicted.size() > 0) {
+ conflicts = unevicted;
+ }
+
try {
IvyNodeArtifactInfo latest = (IvyNodeArtifactInfo) getStrategy().findLatest(
toArtifactInfo(conflicts), null);
Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java?rev=1590442&r1=1590441&r2=1590442&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java Sun Apr 27 18:19:50 2014
@@ -187,6 +187,37 @@ public class LatestConflictManagerTest e
}
}
+ /*
+ * Test case for issue IVY-1399:
+ * Dependency tree:
+ * Mycompany#target;1
+ * MyCompany#A;1
+ * conflicting-dependency#dep;1
+ * OtherCompany#prefers-later;1
+ * conflicting-dependency#dep;2
+ * MyCompany#B;1
+ * MyCompany#A;1
+ * ...
+ * OtherCompany#prefers-later;1
+ * ...
+ * MyCompany#C;1
+ * conflicting-dependency#dep;1
+ */
+ public void testEvictedModules() throws Exception {
+ ivy.configure(LatestConflictManagerTest.class
+ .getResource("ivysettings-evicted.xml"));
+
+ ivy.getSettings().setVariable("ivy.log.conflict.resolution", "true", true);
+ try {
+ ResolveReport report = ivy.resolve(
+ new File("test/repositories/IVY-1399/MyCompany/target/ivy-1.xml"),
+ getResolveOptions());
+ report.getConfigurationReport("all");
+ } catch (IllegalStateException e) {
+ fail("Resolving target should not throw an exception");
+ }
+ }
+
private ResolveOptions getResolveOptions() {
return new ResolveOptions().setValidate(false);
}
Added: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/ivysettings-evicted.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/ivysettings-evicted.xml?rev=1590442&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/ivysettings-evicted.xml (added)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/ivysettings-evicted.xml Sun Apr 27 18:19:50 2014
@@ -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.
+-->
+<ivysettings>
+ <settings defaultCache="${ivy.basedir}/build/cache" defaultResolver="test" defaultConflictManager="latest-revision" />
+
+ <resolvers>
+ <filesystem name="test" latest="latest-revision" checkmodified="true">
+ <artifact pattern="${ivy.basedir}/test/repositories/IVY-1399/[organisation]/[module]/[type]/[artifact]-[revision].[ext]" />
+ <ivy pattern="${ivy.basedir}/test/repositories/IVY-1399/[organisation]/[module]/ivy-[revision].xml" />
+ </filesystem>
+ </resolvers>
+
+</ivysettings>
Propchange: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/conflict/ivysettings-evicted.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/A/ivy-1.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/A/ivy-1.xml?rev=1590442&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/A/ivy-1.xml (added)
+++ ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/A/ivy-1.xml Sun Apr 27 18:19:50 2014
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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="MyCompany" module="A" revision="1" status="integration" publication="20140426010101"/>
+ <configurations>
+ <conf name="all"/>
+ </configurations>
+ <publications>
+ <artifact name="A" ext="jar" type="lib" conf="all"/>
+ </publications>
+ <dependencies>
+ <dependency org="conflicting-dependency" name="dep" rev="1" force="true"/>
+ <dependency org="OtherCompany" name="prefers-later" rev="1" force="true"/>
+ </dependencies>
+</ivy-module>
Propchange: ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/A/ivy-1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/B/ivy-1.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/B/ivy-1.xml?rev=1590442&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/B/ivy-1.xml (added)
+++ ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/B/ivy-1.xml Sun Apr 27 18:19:50 2014
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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="MyCompany" module="B" revision="1" status="integration" publication="20140426010101"/>
+ <configurations>
+ <conf name="all"/>
+ </configurations>
+ <publications>
+ <artifact name="B" ext="jar" type="lib" conf="all"/>
+ </publications>
+ <dependencies>
+ <dependency org="MyCompany" name="A" rev="1" force="true"/>
+ <dependency org="OtherCompany" name="prefers-later" rev="1" force="true"/>
+ <dependency org="MyCompany" name="C" rev="1" force="true"/>
+ </dependencies>
+</ivy-module>
Propchange: ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/B/ivy-1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/C/ivy-1.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/C/ivy-1.xml?rev=1590442&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/C/ivy-1.xml (added)
+++ ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/C/ivy-1.xml Sun Apr 27 18:19:50 2014
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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="MyCompany" module="C" revision="1" status="integration" publication="20140426010101"/>
+ <configurations>
+ <conf name="all"/>
+ </configurations>
+ <publications>
+ <artifact name="C" ext="jar" type="lib" conf="all"/>
+ </publications>
+ <dependencies>
+ <dependency org="conflicting-dependency" name="dep" rev="1" force="true"/>
+ </dependencies>
+</ivy-module>
Propchange: ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/C/ivy-1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/target/ivy-1.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/target/ivy-1.xml?rev=1590442&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/target/ivy-1.xml (added)
+++ ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/target/ivy-1.xml Sun Apr 27 18:19:50 2014
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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="MyCompany" module="target" revision="1" status="integration" publication="20140426010101"/>
+ <configurations>
+ <conf name="all"/>
+ </configurations>
+ <publications>
+ <artifact name="target" ext="jar" type="lib" conf="all"/>
+ </publications>
+ <dependencies>
+ <dependency org="MyCompany" name="A" rev="1" force="true"/>
+ <dependency org="MyCompany" name="B" rev="1" force="true"/>
+ </dependencies>
+</ivy-module>
Propchange: ant/ivy/core/trunk/test/repositories/IVY-1399/MyCompany/target/ivy-1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: ant/ivy/core/trunk/test/repositories/IVY-1399/OtherCompany/prefers-later/ivy-1.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/IVY-1399/OtherCompany/prefers-later/ivy-1.xml?rev=1590442&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/IVY-1399/OtherCompany/prefers-later/ivy-1.xml (added)
+++ ant/ivy/core/trunk/test/repositories/IVY-1399/OtherCompany/prefers-later/ivy-1.xml Sun Apr 27 18:19:50 2014
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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="OtherCompany" module="prefers-later" revision="1" status="integration" publication="20140426010101"/>
+ <configurations>
+ <conf name="all"/>
+ </configurations>
+ <publications>
+ <artifact name="prefers-later" ext="jar" type="lib" conf="all"/>
+ </publications>
+ <dependencies>
+ <dependency org="conflicting-dependency" name="dep" rev="2" force="true" conf="all"/>
+ </dependencies>
+</ivy-module>
Propchange: ant/ivy/core/trunk/test/repositories/IVY-1399/OtherCompany/prefers-later/ivy-1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: ant/ivy/core/trunk/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-1.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-1.xml?rev=1590442&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-1.xml (added)
+++ ant/ivy/core/trunk/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-1.xml Sun Apr 27 18:19:50 2014
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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="conflicting-dependency" module="dep" revision="1" status="integration" publication="20140423010101"/>
+ <configurations>
+ <conf name="all"/>
+ </configurations>
+ <publications>
+ <artifact name="dep" ext="jar" type="lib" conf="all"/>
+ </publications>
+</ivy-module>
Propchange: ant/ivy/core/trunk/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-1.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: ant/ivy/core/trunk/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-2.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-2.xml?rev=1590442&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-2.xml (added)
+++ ant/ivy/core/trunk/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-2.xml Sun Apr 27 18:19:50 2014
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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="conflicting-dependency" module="dep" revision="2" status="integration" publication="20140426010101"/>
+ <configurations>
+ <conf name="all"/>
+ </configurations>
+ <publications>
+ <artifact name="dep" ext="jar" type="lib" conf="all"/>
+ </publications>
+</ivy-module>
Propchange: ant/ivy/core/trunk/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-2.xml
------------------------------------------------------------------------------
svn:eol-style = native