You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by gn...@apache.org on 2015/03/04 13:08:38 UTC
svn commit: r1663957 -
/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Author: gnodet
Date: Wed Mar 4 12:08:38 2015
New Revision: 1663957
URL: http://svn.apache.org/r1663957
Log:
[FELI-4824] Add support for prepending instructions
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=1663957&r1=1663956&r2=1663957&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 Wed Mar 4 12:08:38 2015
@@ -239,6 +239,7 @@ public class BundlePlugin extends Abstra
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 BUNDLE_PLUGIN_PREPEND_EXTENSION = "BNDPrependExtension-";
private static final String[] EMPTY_STRING_ARRAY =
{};
@@ -481,12 +482,27 @@ public class BundlePlugin extends Abstra
addProps.put(oKey, currentValue + ',' + entry.getValue());
}
}
+ if ( key.startsWith(BUNDLE_PLUGIN_PREPEND_EXTENSION) )
+ {
+ final String oKey = key.substring(BUNDLE_PLUGIN_PREPEND_EXTENSION.length());
+ final String currentValue = properties.getProperty(oKey);
+ if ( currentValue == null )
+ {
+ addProps.put(oKey, entry.getValue());
+ }
+ else
+ {
+ addProps.put(oKey, entry.getValue() + "," + currentValue);
+ }
+ }
}
properties.putAll( addProps );
final Iterator keyIter = addProps.keySet().iterator();
while ( keyIter.hasNext() )
{
- properties.remove(BUNDLE_PLUGIN_EXTENSION + keyIter.next());
+ Object key = keyIter.next();
+ properties.remove(BUNDLE_PLUGIN_EXTENSION + key);
+ properties.remove(BUNDLE_PLUGIN_PREPEND_EXTENSION + key);
}
if (properties.getProperty("Bundle-Activator") != null