felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mccu...@apache.org
Subject svn commit: r1140381 - in /felix/trunk/bundleplugin: pom.xml src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Date Tue, 28 Jun 2011 00:03:15 GMT
Author: mcculls
Date: Tue Jun 28 00:03:15 2011
New Revision: 1140381

URL: http://svn.apache.org/viewvc?rev=1140381&view=rev
Log:
FELIX-2449: session properties should be given precedence over project properties when filtering

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

Modified: felix/trunk/bundleplugin/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/pom.xml?rev=1140381&r1=1140380&r2=1140381&view=diff
==============================================================================
--- felix/trunk/bundleplugin/pom.xml (original)
+++ felix/trunk/bundleplugin/pom.xml Tue Jun 28 00:03:15 2011
@@ -65,12 +65,7 @@
   </dependency>
   <dependency>
    <groupId>org.apache.maven</groupId>
-   <artifactId>maven-plugin-api</artifactId>
-   <version>2.0.7</version>
-  </dependency>
-  <dependency>
-   <groupId>org.apache.maven</groupId>
-   <artifactId>maven-project</artifactId>
+   <artifactId>maven-core</artifactId>
    <version>2.0.7</version>
   </dependency>
   <dependency>

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=1140381&r1=1140380&r2=1140381&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
Tue Jun 28 00:03:15 2011
@@ -46,6 +46,7 @@ import org.apache.maven.archiver.MavenAr
 import org.apache.maven.archiver.MavenArchiver;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
+import org.apache.maven.execution.MavenSession;
 import org.apache.maven.model.License;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.Resource;
@@ -188,6 +189,13 @@ public class BundlePlugin extends Abstra
      */
     private MavenArchiveConfiguration archive; // accessed indirectly in JarPluginConfiguration
 
+    /**
+     * @parameter default-value="${session}"
+     * @required
+     * @readonly
+     */
+    private MavenSession m_mavenSession;   
+
     private static final String MAVEN_SYMBOLICNAME = "maven-symbolicname";
     private static final String MAVEN_RESOURCES = "{maven-resources}";
     private static final String LOCAL_PACKAGES = "{local-packages}";
@@ -1012,9 +1020,15 @@ public class BundlePlugin extends Abstra
 
         properties.putAll( currentProject.getProperties() );
         properties.putAll( currentProject.getModel().getProperties() );
+        if ( m_mavenSession != null )
+        {
+            properties.putAll( m_mavenSession.getExecutionProperties() );
+        }
+
         properties.putAll( getProperties( currentProject.getModel(), "project.build." ) );
         properties.putAll( getProperties( currentProject.getModel(), "pom." ) );
         properties.putAll( getProperties( currentProject.getModel(), "project." ) );
+
         properties.put( "project.baseDir", baseDir );
         properties.put( "project.build.directory", getBuildDirectory() );
         properties.put( "project.build.outputdirectory", getOutputDirectory() );



Mime
View raw message