You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2013/12/26 22:50:08 UTC

svn commit: r1553593 - in /ant/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java

Author: hibou
Date: Thu Dec 26 21:50:07 2013
New Revision: 1553593

URL: http://svn.apache.org/r1553593
Log:
When inheriting a module descriptor, also merge the exclude rules
 => used to handle OSGi MANFIEST and their excecution environment 

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

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=1553593&r1=1553592&r2=1553593&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Thu Dec 26 21:50:07 2013
@@ -164,6 +164,7 @@ for detailed view of each issue, please 
 - FIX: Properly handle evicted nodes in ResolveReport
 - FIX: Artifact repository locking did not correctly handle threaded use (IVY-1454) (thanks to Carsten Pfeiffer)
 - FIX: Better support for "Bundle-RequiredExecutionEnvironment" from an OSGi MANIFEST.MF
+- FIX: When inheriting a module descriptor, also merge the exclude rules
 
    2.3.0
 =====================================

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java?rev=1553593&r1=1553592&r2=1553593&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java Thu Dec 26 21:50:07 2013
@@ -477,6 +477,9 @@ public class XmlModuleDescriptorParser e
                 if (extendTypes.contains("licenses")) {
                     mergeLicenses(parent.getLicenses());
                 }
+                if (extendTypes.contains("excludes")) {
+                    mergeExcludes(parent.getAllExcludeRules());
+                }
             }
 
         }
@@ -491,6 +494,7 @@ public class XmlModuleDescriptorParser e
             mergeDependencies(parent.getDependencies());
             mergeDescription(parent.getDescription());
             mergeLicenses(parent.getLicenses());
+            mergeExcludes(parent.getAllExcludeRules());
         }
 
         /**
@@ -597,6 +601,16 @@ public class XmlModuleDescriptorParser e
                 getMd().addLicense(licenses[i]);
             }
         }
+        
+        /**
+         * Describes how to merge exclude rules
+         * @param excludeRules exclude rules going to be inherited
+         */
+        public void mergeExcludes(ExcludeRule[] excludeRules) {
+            for (int i = 0; i < excludeRules.length; i++) {
+                getMd().addExcludeRule(excludeRules[i]);
+            }
+        }
 
         /**
          * Returns the parent module using the location attribute (for dev purpose).