Author: mcculls
Date: Tue Oct 30 23:49:53 2007
New Revision: 590570

URL: http://svn.apache.org/viewvc?rev=590570&view=rev
Log:
FELIX-417: fix project references

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=590570&r1=590569&r2=590570&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 Oct 30 23:49:53 2007
@@ -221,7 +221,7 @@
             properties.putAll(this.transformDirectives(instructions));
 
             // pass maven resource paths onto BND analyzer
-            final String mavenResourcePaths = this.getMavenResourcePaths();
+            final String mavenResourcePaths = 
this.getMavenResourcePaths(project);
             final String includeResource = 
(String)properties.get(Analyzer.INCLUDE_RESOURCE);
             if (includeResource != null)
             {
@@ -259,11 +259,11 @@
             }
 
             Builder builder = new Builder();
-            builder.setBase(this.baseDir);
+            builder.setBase(project.getBasedir());
             builder.setProperties(properties);
             builder.setClasspath(classpath);
 
-            Collection embeddableArtifacts = 
getEmbeddableArtifacts(properties);
+            Collection embeddableArtifacts = getEmbeddableArtifacts(project, 
properties);
             if (embeddableArtifacts.size() > 0)
             {
                 // add BND instructions to embed selected dependencies
@@ -581,12 +581,12 @@
         this.outputDirectory = outputDirectory;
     }
 
-    String getMavenResourcePaths()
+    String getMavenResourcePaths(MavenProject project)
     {
-        final String basePath = this.baseDir.getAbsolutePath();
+        final String basePath = project.getBasedir().getAbsolutePath();
 
         StringBuffer resourcePaths = new StringBuffer();
-        for (Iterator i = this.project.getResources().iterator(); i.hasNext();)
+        for (Iterator i = project.getResources().iterator(); i.hasNext();)
         {
             org.apache.maven.model.Resource resource = 
(org.apache.maven.model.Resource)i.next();
 
@@ -598,7 +598,7 @@
             {
                 String path = sourcePath;
 
-                // make relative to basedir
+                // make relative to project
                 if (path.startsWith(basePath))
                 {
                     if ( path.length() == basePath.length() )
@@ -643,7 +643,7 @@
         return resourcePaths.toString();
     }
 
-    Collection getEmbeddableArtifacts(Properties properties)
+    Collection getEmbeddableArtifacts(MavenProject project, Properties 
properties)
     {
         String embedTransitive = 
properties.getProperty(DependencyEmbedder.EMBED_TRANSITIVE);
         if (Boolean.valueOf(embedTransitive).booleanValue())


Reply via email to