ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r825674 - in /ant/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
Date Thu, 15 Oct 2009 21:53:06 GMT
Author: maartenc
Date: Thu Oct 15 21:53:05 2009
New Revision: 825674

URL: http://svn.apache.org/viewvc?rev=825674&view=rev
Log:
FIX: Ivy couldn't handle maven POMs that depend on theirselves

Modified:
    ant/ivy/core/trunk/CHANGES.txt
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=825674&r1=825673&r2=825674&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Thu Oct 15 21:53:05 2009
@@ -94,6 +94,7 @@
 	
    trunk
 =====================================
+- FIX: Ivy couldn't handle maven POMs that depend on theirselves
 - FIX: SearchEngine.listModules returns MRID without extra attributes (IVY-1128) (thanks
to Michael Scheetz)
 - FIX: IvyBuildNumber non-deterministic behaviour (IVY-1120)
 - FIX: Change spelling of 'occured' to 'occurred' (IVY-1123)

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java?rev=825674&r1=825673&r2=825674&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
Thu Oct 15 21:53:05 2009
@@ -281,6 +281,14 @@
         version = (version == null || version.length() == 0) ? getDefaultVersion(dep) : version;
         ModuleRevisionId moduleRevId = ModuleRevisionId.newInstance(dep.getGroupId(), dep
                 .getArtifactId(), version);
+
+        // Some POMs depend on theirselfves, don't add this dependency: Ivy doesn't allow
this!
+        // Example: http://repo2.maven.org/maven2/net/jini/jsk-platform/2.1/jsk-platform-2.1.pom
+        ModuleRevisionId mRevId = ivyModuleDescriptor.getModuleRevisionId();
+        if ((mRevId != null) && mRevId.getModuleId().equals(moduleRevId.getModuleId()))
{
+            return;
+        }
+
         DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(ivyModuleDescriptor,
                 moduleRevId, true, false, true);
         scope = (scope == null || scope.length() == 0) ? getDefaultScope(dep) : scope;



Mime
View raw message