felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mccu...@apache.org
Subject svn commit: r643300 - in /felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin: BundlePlugin.java DependencyEmbedder.java
Date Tue, 01 Apr 2008 06:54:27 GMT
Author: mcculls
Date: Mon Mar 31 23:54:26 2008
New Revision: 643300

URL: http://svn.apache.org/viewvc?rev=643300&view=rev
Log:
FELIX-526: Prepend embedded dependencies before maven resources to avoid overwriting them

Modified:
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.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=643300&r1=643299&r2=643300&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
Mon Mar 31 23:54:26 2008
@@ -354,13 +354,13 @@
         properties.putAll( getDefaultProperties( currentProject ) );
         properties.putAll( transformDirectives( originalInstructions ) );
 
-        // update BND instructions to add Maven resources
-        includeMavenResources( currentProject, properties, getLog() );
-
         Builder builder = new Builder();
         builder.setBase( currentProject.getBasedir() );
         builder.setProperties( properties );
         builder.setClasspath( classpath );
+
+        // update BND instructions to add included Maven resources
+        includeMavenResources( currentProject, properties, getLog() );
 
         if ( null != classifier && classifier.trim().length() > 0 )
         {

Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java?rev=643300&r1=643299&r2=643300&view=diff
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java
(original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/DependencyEmbedder.java
Mon Mar 31 23:54:26 2008
@@ -423,8 +423,16 @@
             }
             else if ( mavenDependencies.length() > 0 )
             {
-                // original behaviour: append dependencies to the instruction
-                properties.setProperty( directiveName, instruction + ',' + mavenDependencies
);
+                if ( Analyzer.INCLUDE_RESOURCE.equalsIgnoreCase( directiveName ) )
+                {
+                    // dependencies should be prepended so they can be overwritten by local
resources
+                    properties.setProperty( directiveName, mavenDependencies + ',' + instruction
);
+                }
+                else  // Analyzer.BUNDLE_CLASSPATH
+                {
+                    // for the classpath we want dependencies to be appended after local
entries
+                    properties.setProperty( directiveName, instruction + ',' + mavenDependencies
);
+                }
             }
             // otherwise leave instruction unchanged
         }



Mime
View raw message