ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r891459 - in /ant/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
Date Wed, 16 Dec 2009 22:29:05 GMT
Author: maartenc
Date: Wed Dec 16 22:29:05 2009
New Revision: 891459

URL: http://svn.apache.org/viewvc?rev=891459&view=rev
Log:
FIX: optional dependencies, sources and javadocs aren't resolved when a maven module is relocated

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

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=891459&r1=891458&r2=891459&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Wed Dec 16 22:29:05 2009
@@ -101,6 +101,7 @@
 - IMPROVEMENT: Trace a message when a property file referenced from the settings doesn't
exixts (IVY-1074)
 - IMPROVEMENT: use defaultconf in combination with defaultconfmapping (IVY-1135) (thanks
to Jon Schneider)
 
+- FIX: optional dependencies, sources and javadocs aren't resolved when a maven module is
relocated
 - FIX: Encountered 'multiple artifacts retrieved to same file' error when module does not
have multiple artifacts (IVY-1148)
 - FIX: Use of a shared DocumentBuilder causes SAXException during parallel resolutions (IVY-1147)
 - FIX: metadata lock files not always deleted from cache (IVY-1145) (thanks to Jason Trump)

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java?rev=891459&r1=891458&r2=891459&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
(original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
Wed Dec 16 22:29:05 2009
@@ -30,10 +30,12 @@
 import org.apache.ivy.core.IvyContext;
 import org.apache.ivy.core.cache.ArtifactOrigin;
 import org.apache.ivy.core.module.descriptor.Artifact;
+import org.apache.ivy.core.module.descriptor.Configuration;
 import org.apache.ivy.core.module.descriptor.DefaultArtifact;
 import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
 import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
+import org.apache.ivy.core.module.descriptor.Configuration.Visibility;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
 import org.apache.ivy.core.resolve.ResolveData;
 import org.apache.ivy.core.resolve.ResolveEngine;
@@ -189,12 +191,12 @@
                     DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(mdBuilder
                             .getModuleDescriptor(), relocation, true, false, true);
                     /* Map all public dependencies */
-                    dd.addDependencyConfiguration("compile", "compile");
-                    dd.addDependencyConfiguration("runtime", "runtime");
-                    dd.addDependencyConfiguration("default", "default");
-                    dd.addDependencyConfiguration("master", "master");
-                    dd.addDependencyConfiguration("provided", "provided");
-                    dd.addDependencyConfiguration("system", "system");
+                    Configuration[] m2Confs = PomModuleDescriptorBuilder.MAVEN2_CONFIGURATIONS;
+                    for (int i = 0; i < m2Confs.length; i++) {
+                        if (Visibility.PUBLIC.equals(m2Confs[i].getVisibility())) {
+                            dd.addDependencyConfiguration(m2Confs[i].getName(), m2Confs[i].getName());
+                        }
+                    }
                     mdBuilder.addDependency(dd);
                 }
             } else {                            



Mime
View raw message