FELIX-4596 : Passing configuration values to the maven-bundle-plugin

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1616415 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
index 2977716..1837855 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
@@ -461,7 +461,7 @@
         properties.putAll( transformDirectives( originalInstructions ) );
 
         // process overrides from project
-        final Set removeProps = new HashSet();
+        final Map addProps = new HashMap();
         final Iterator iter = currentProject.getProperties().entrySet().iterator();
         while ( iter.hasNext() )
         {
@@ -473,16 +473,16 @@
                 final String currentValue = properties.getProperty(oKey);
                 if ( currentValue == null )
                 {
-                    properties.put(oKey, entry.getValue());
+                    addProps.put(oKey, entry.getValue());
                 }
                 else
                 {
-                    properties.put(oKey, currentValue + ',' + entry.getValue());
+                    addProps.put(oKey, currentValue + ',' + entry.getValue());
                 }
-                removeProps.add(key);
             }
         }
-        final Iterator keyIter = removeProps.iterator();
+        properties.putAll( addProps );
+        final Iterator keyIter = addProps.keySet().iterator();
         while ( keyIter.hasNext() )
         {
             properties.remove(keyIter.next());