felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1620116 - /felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Date Sun, 24 Aug 2014 10:23:01 GMT
Author: cziegeler
Date: Sun Aug 24 10:23:01 2014
New Revision: 1620116

URL: http://svn.apache.org/r1620116
Log:
FELIX-4596 : Passing configuration values to the maven-bundle-plugin

Modified:
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java

Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java?rev=1620116&r1=1620115&r2=1620116&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
(original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Sun Aug 24 10:23:01 2014
@@ -238,6 +238,7 @@ public class BundlePlugin extends Abstra
     private static final String LOCAL_PACKAGES = "{local-packages}";
     private static final String MAVEN_SOURCES = "{maven-sources}";
     private static final String MAVEN_TEST_SOURCES = "{maven-test-sources}";
+    private static final String BUNDLE_PLUGIN_EXTENSION = "BNDExtension-";
 
     private static final String[] EMPTY_STRING_ARRAY =
         {};
@@ -467,9 +468,9 @@ public class BundlePlugin extends Abstra
         {
             final Map.Entry entry = (Entry) iter.next();
             final String key = entry.getKey().toString();
-            if ( key.startsWith("BNDExtension-") )
+            if ( key.startsWith(BUNDLE_PLUGIN_EXTENSION) )
             {
-                final String oKey = key.substring(13);
+                final String oKey = key.substring(BUNDLE_PLUGIN_EXTENSION.length());
                 final String currentValue = properties.getProperty(oKey);
                 if ( currentValue == null )
                 {
@@ -485,8 +486,9 @@ public class BundlePlugin extends Abstra
         final Iterator keyIter = addProps.keySet().iterator();
         while ( keyIter.hasNext() )
         {
-            properties.remove(keyIter.next());
+            properties.remove(BUNDLE_PLUGIN_EXTENSION + keyIter.next());
         }
+        System.out.println("PROPS: " + properties);
 
         if (properties.getProperty("Bundle-Activator") != null
                 && properties.getProperty("Bundle-Activator").isEmpty())



Mime
View raw message