ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r886938 - in /ant/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
Date Thu, 03 Dec 2009 22:00:27 GMT
Author: maartenc
Date: Thu Dec  3 22:00:26 2009
New Revision: 886938

URL: http://svn.apache.org/viewvc?rev=886938&view=rev
Log:
IMPROVEMENT: Ivy doesn't support Maven 2.0.9 'import' scope (IVY-807)

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=886938&r1=886937&r2=886938&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Thu Dec  3 22:00:26 2009
@@ -95,6 +95,7 @@
 	
    trunk
 =====================================
+- IMPROVEMENT: Ivy doesn't support Maven 2.0.9 'import' scope (IVY-807)
 - IMPROVEMENT: resolver attribute for listmodules task (IVY-1057)
 - IMPROVEMENT: discover 'src' sources in maven repos (IVY-1138)
 - IMPROVEMENT: Trace a message when a property file referenced from the settings doesn't
exixts (IVY-1074)

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=886938&r1=886937&r2=886938&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
Thu Dec  3 22:00:26 2009
@@ -227,7 +227,29 @@
                 
                 for (Iterator it = domReader.getDependencyMgt().iterator(); it.hasNext();)
{
                     PomDependencyMgt dep = (PomDependencyMgt) it.next();
-                    mdBuilder.addDependencyMgt(dep);
+                    if ("import".equals(dep.getScope())) {
+                        ModuleRevisionId importModRevID = ModuleRevisionId.newInstance(
+                            dep.getGroupId(), 
+                            dep.getArtifactId(), 
+                            dep.getVersion());
+                        ResolvedModuleRevision importModule = parseOtherPom(ivySettings,

+                            importModRevID);
+                        if (importModule != null) {
+                            ModuleDescriptor importDescr = importModule.getDescriptor();
+                            
+                            // add dependency management info from imported module
+                            List depMgt = PomModuleDescriptorBuilder.getDependencyManagements(importDescr);
+                            for (Iterator it2 = depMgt.iterator(); it2.hasNext();) {
+                                mdBuilder.addDependencyMgt((PomDependencyMgt) it2.next());
+                            }
+                        } else {
+                            throw new IOException("Impossible to import module for " + descriptorURL
+ "."
+                               + " Import=" + importModRevID);
+                        }
+                        
+                    } else {
+                        mdBuilder.addDependencyMgt(dep);
+                    }
                 }
                 
                 for (Iterator it = domReader.getDependencies().iterator(); it.hasNext();)
{



Mime
View raw message