Author: mcculls
Date: Sat Feb 11 14:17:41 2012
New Revision: 1243069
URL: http://svn.apache.org/viewvc?rev=1243069&view=rev
Log:
FELIX-3347: when adding the Maven session environment to the properties passed
to bnd, avoid entries whose keys start with upper-case letter (since they end
up in the final manifest)
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=1243069&r1=1243068&r2=1243069&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
Sat Feb 11 14:17:41 2012
@@ -1183,7 +1183,23 @@ public class BundlePlugin extends Abstra
properties.putAll( currentProject.getModel().getProperties() );
if ( m_mavenSession != null )
{
- properties.putAll( m_mavenSession.getExecutionProperties() );
+ try
+ {
+ Properties sessionProperties =
m_mavenSession.getExecutionProperties();
+ for ( Enumeration e = sessionProperties.propertyNames();
e.hasMoreElements(); )
+ {
+ // don't pass upper-case settings to bnd
+ String key = ( String ) e.nextElement();
+ if ( key.length() > 0 && !Character.isUpperCase(
key.charAt( 0 ) ) )
+ {
+ properties.put( key, sessionProperties.getProperty(
key ) );
+ }
+ }
+ }
+ catch ( Exception e )
+ {
+ getLog().warn( "Problem with Maven session properties: " +
e.getLocalizedMessage() );
+ }
}
properties.putAll( getProperties( currentProject.getModel(),
"project.build." ) );