ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r675227 - in /ant/ivy/core/trunk: ./ src/java/org/apache/ivy/core/report/ src/java/org/apache/ivy/core/resolve/ test/java/org/apache/ivy/ant/ test/java/org/apache/ivy/core/resolve/ test/repositories/1/org6/mod6.2/ivys/
Date Wed, 09 Jul 2008 15:30:04 GMT
Author: xavier
Date: Wed Jul  9 08:30:03 2008
New Revision: 675227

URL: http://svn.apache.org/viewvc?rev=675227&view=rev
Log:
FIX: Reports showing double dependencies in certain cases (IVY-578)

Added:
    ant/ivy/core/trunk/test/repositories/1/org6/mod6.2/ivys/ivy-0.7.xml   (with props)
Modified:
    ant/ivy/core/trunk/CHANGES.txt
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveData.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyReportTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=675227&r1=675226&r2=675227&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Wed Jul  9 08:30:03 2008
@@ -95,7 +95,8 @@
 - IMPROVEMENT: Change allownomd and skipbuildwithoutivy into a more semantically correct
name (IVY-297)
 - IMPROVEMENT: Smarter determination if an expression is exact or not for RegexpPatternMatcher
and GlobPatternMatcher
 
-- FIX: dynamic revision resolve does not throw error when configuration is missing (IVY-861)
+- FIX: Reports showing double dependencies in certain cases (IVY-578)
+- FIX: Dynamic revision resolve does not throw error when configuration is missing (IVY-861)
 - FIX: Referenced resolver not found in macro (IVY-860)
 - FIX: Ivy files are not retrieved when using useOrigin=true (IVY-713)
 - FIX: NPE in Ivy:install task if the repository cache dir has been cleared (IVY-843)

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java?rev=675227&r1=675226&r2=675227&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/report/ConfigurationResolveReport.java
Wed Jul  9 08:30:03 2008
@@ -122,6 +122,10 @@
         dependencyReports.put(node, Collections.EMPTY_LIST);
     }
 
+    public void updateDependency(ModuleRevisionId mrid, IvyNode node) {
+        dependencies.put(mrid, node);
+    }
+
     public void addDependency(IvyNode node, DownloadReport report) {
         dependencies.put(node.getId(), node);
         dependencies.put(node.getResolvedId(), node);

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveData.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveData.java?rev=675227&r1=675226&r2=675227&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveData.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/resolve/ResolveData.java Wed Jul  9 08:30:03
2008
@@ -156,6 +156,8 @@
         this.visitData.put(mrid, keptVisitData);
         // update visit data with discarde visit nodes
         keptVisitData.addVisitNodes(rootModuleConf, visitData.getVisitNodes(rootModuleConf));
+        
+        report.updateDependency(mrid, node);
     }
 
     public void setReport(ConfigurationResolveReport report) {

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyReportTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyReportTest.java?rev=675227&r1=675226&r2=675227&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyReportTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyReportTest.java Wed Jul  9 08:30:03
2008
@@ -22,6 +22,7 @@
 
 import junit.framework.TestCase;
 
+import org.apache.ivy.util.FileUtil;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.taskdefs.Delete;
 
@@ -82,6 +83,35 @@
         }
     }
     
+    public void testWithLatest() throws Exception {
+        Locale oldLocale = Locale.getDefault();
+        
+        try {
+            // set the locale to UK as workaround for SUN bug 6240963
+            Locale.setDefault(Locale.UK);
+
+            IvyResolve res = new IvyResolve();
+            res.setProject(project);
+            res.setFile(new File("test/repositories/1/org6/mod6.2/ivys/ivy-0.7.xml"));
+            res.execute();
+    
+            report.setTodir(new File(cache, "report"));
+            report.setXml(true);
+            report.execute();
+            
+            File xmlReport = new File(cache, "report/org6-mod6.2-default.xml");
+            assertTrue(xmlReport.exists());
+            // check that revision 2.2 of mod1.2 is only present once
+            String reportContent = FileUtil.readEntirely(xmlReport);
+            int index = reportContent.indexOf("<revision name=\"2.2\"");
+            assertTrue(index != -1);
+            index = reportContent.indexOf("<revision name=\"2.2\"", index + 1);
+            assertTrue(index == -1);
+        } finally {
+            Locale.setDefault(oldLocale);
+        }
+    }
+    
     public void testCopyCssIfTodirNotSet() {
         Locale oldLocale = Locale.getDefault();
         

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java?rev=675227&r1=675226&r2=675227&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/resolve/ResolveEngineTest.java Wed Jul
 9 08:30:03 2008
@@ -57,7 +57,6 @@
         
         assertNotNull("The ResolveReport may never be null", report);
         assertTrue(report.hasError());
-        assertTrue(report.getModuleIds().isEmpty());
     }
 
     private void createCache() {

Added: ant/ivy/core/trunk/test/repositories/1/org6/mod6.2/ivys/ivy-0.7.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/repositories/1/org6/mod6.2/ivys/ivy-0.7.xml?rev=675227&view=auto
==============================================================================
--- ant/ivy/core/trunk/test/repositories/1/org6/mod6.2/ivys/ivy-0.7.xml (added)
+++ ant/ivy/core/trunk/test/repositories/1/org6/mod6.2/ivys/ivy-0.7.xml Wed Jul  9 08:30:03
2008
@@ -0,0 +1,31 @@
+<!--
+   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="org6"
+	       module="mod6.2"
+	       revision="0.7"
+	       status="integration"
+	       publication="20080312110000"
+	/>
+	<publications />
+	<dependencies>
+		<dependency org="org6" name="mod6.1" rev="0.6" conf="default"/>
+		<dependency org="org1" name="mod1.2" rev="latest.integration" conf="default"/>
+	</dependencies>
+</ivy-module>

Propchange: ant/ivy/core/trunk/test/repositories/1/org6/mod6.2/ivys/ivy-0.7.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ant/ivy/core/trunk/test/repositories/1/org6/mod6.2/ivys/ivy-0.7.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message