ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r988332 - in /ant/ivy/core/branches/2.2.x: ./ src/java/org/apache/ivy/ant/IvyMakePom.java src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java src/java/org/apache/ivy/plugins/parser/m2/PomWriterOptions.java
Date Mon, 23 Aug 2010 21:59:39 GMT
Author: maartenc
Date: Mon Aug 23 21:59:38 2010
New Revision: 988332

URL: http://svn.apache.org/viewvc?rev=988332&view=rev
Log:
Merged revision 984952 from trunk into 2.2.x branch.

Modified:
    ant/ivy/core/branches/2.2.x/   (props changed)
    ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/ant/IvyMakePom.java
    ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
    ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/m2/PomWriterOptions.java

Propchange: ant/ivy/core/branches/2.2.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Aug 23 21:59:38 2010
@@ -1,4 +1,4 @@
 /ant/ivy/core/branches/2.0.0:727187-727188,727520-732505
 /ant/ivy/core/branches/2.0.0-rc2:707459-708717
 /ant/ivy/core/branches/2.0.x:696803-698317
-/ant/ivy/core/trunk:695737,696014-696031,696442,958415-958693,961017-961020,962767-983820
+/ant/ivy/core/trunk:695737,696014-696031,696442,958415-958693,961017-961020,962767-983820,983827-984586,984952

Modified: ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/ant/IvyMakePom.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/ant/IvyMakePom.java?rev=988332&r1=988331&r2=988332&view=diff
==============================================================================
--- ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/ant/IvyMakePom.java (original)
+++ ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/ant/IvyMakePom.java Mon Aug 23 21:59:38
2010
@@ -229,7 +229,12 @@ public class IvyMakePom extends IvyTask 
         Map mappingsMap = new HashMap();
         for (Iterator iter = mappings.iterator(); iter.hasNext();) {
             Mapping mapping = (Mapping) iter.next();
-            mappingsMap.put(mapping.getConf(), mapping.getScope());
+            String[] mappingConfs = splitConfs(mapping.getConf());
+            for (int i = 0; i < mappingConfs.length; i++) {
+                if (!mappingsMap.containsKey(mappingConfs[i])) {
+                    mappingsMap.put(mappingConfs[i], mapping.getScope());
+                }
+            }
         }
         return mappingsMap;
     }

Modified: ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java?rev=988332&r1=988331&r2=988332&view=diff
==============================================================================
--- ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
(original)
+++ ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
Mon Aug 23 21:59:38 2010
@@ -41,7 +41,7 @@ public final class PomModuleDescriptorWr
     private static final ConfigurationScopeMapping DEFAULT_MAPPING 
             = new ConfigurationScopeMapping(new HashMap() {
                 {
-                    put("compile, runtime", "compile");
+                    put("compile", "compile");
                     put("runtime", "runtime");
                     put("provided", "provided");
                     put("test", "test");

Modified: ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/m2/PomWriterOptions.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/m2/PomWriterOptions.java?rev=988332&r1=988331&r2=988332&view=diff
==============================================================================
--- ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/m2/PomWriterOptions.java
(original)
+++ ant/ivy/core/branches/2.2.x/src/java/org/apache/ivy/plugins/parser/m2/PomWriterOptions.java
Mon Aug 23 21:59:38 2010
@@ -22,8 +22,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.ivy.util.StringUtils;
-
 public class PomWriterOptions {
 
     private String[] confs;
@@ -117,8 +115,15 @@ public class PomWriterOptions {
          * @return the scope to which the conf is mapped
          */
         public String getScope(String[] confs) {
-            return (String) scopes.get(StringUtils.join(confs, ", "));
+            for (int i = 0; i < confs.length; i++) {
+                if (scopes.containsKey(confs[i])) {
+                    return (String) scopes.get(confs[i]);
+                }
+            }
+
+            return null;
         }
+        
         public boolean isOptional(String[] confs) {
             return getScope(confs) == null;
         }



Mime
View raw message