FIX: Ivy cannot handle Maven pom with parents depending back on theirselfs (IVY-1225)

git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@997931 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maarten Coene 2010-09-16 22:03:26 +00:00
parent 71a4f58075
commit b852c5bca6
2 changed files with 10 additions and 1 deletions

View File

@ -127,6 +127,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
- IMPROVEMENT: ivy:makepom now accepts a list of configurations to include (IVY-1005) (thanks to Jesper Pedersen)
- IMPROVEMENT: ivy:makepom can generate a <description> element in the pom (IVY-1215) (thanks to Jesper Pedersen)
- FIX: Ivy cannot handle Maven pom with parents depending back on theirselfs (IVY-1225)
- FIX: OutOfMemoryError when uploading large files using commons-httpclient (IVY-1197) (thanks to Torkild U. Resheim)
- FIX: artifactreport ant task doesn't honor log attribute (IVY-1212)
- FIX: XmlModuleDescriptorWriter does not write the transitive attribute (IVY-1207) (thanks to Abel Muino)

View File

@ -351,8 +351,16 @@ public class PomModuleDescriptorBuilder {
ivyModuleDescriptor.addDependency(dd);
}
public void addDependency(DependencyDescriptor descriptor) {
// Some POMs depend on theirselfves through their parent pom, don't add this dependency
// since Ivy doesn't allow this!
// Example: http://repo2.maven.org/maven2/com/atomikos/atomikos-util/3.6.4/atomikos-util-3.6.4.pom
ModuleId dependencyId = descriptor.getDependencyId();
ModuleRevisionId mRevId = ivyModuleDescriptor.getModuleRevisionId();
if ((mRevId != null) && mRevId.getModuleId().equals(dependencyId)) {
return;
}
ivyModuleDescriptor.addDependency(descriptor);
}