FELIX-4596 : Passing configuration values to the maven-bundle-plugin
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1620116 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 1837855..68e1911 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
@@ -238,6 +238,7 @@
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 @@
{
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 @@
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())