You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by mc...@apache.org on 2008/01/09 17:42:51 UTC
svn commit: r610446 -
/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
Author: mcculls
Date: Wed Jan 9 08:42:16 2008
New Revision: 610446
URL: http://svn.apache.org/viewvc?rev=610446&view=rev
Log:
FELIX-449: add 'excludeDependencies' option (disabled by default) to exclude all dependencies from the classpath passed to BND
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=610446&r1=610445&r2=610446&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 Jan 9 08:42:16 2008
@@ -27,6 +27,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -85,6 +86,13 @@
protected boolean unpackBundle;
/**
+ * When true, exclude project dependencies from the classpath passed to BND
+ *
+ * @parameter expression="${excludeDependencies}"
+ */
+ protected boolean excludeDependencies;
+
+ /**
* @component
*/
private ArchiverManager archiverManager;
@@ -554,7 +562,16 @@
list.add(new Jar(".", this.getOutputDirectory()));
}
- Set artifacts = project.getArtifacts();
+ final Set artifacts;
+ if (excludeDependencies)
+ {
+ artifacts = Collections.EMPTY_SET;
+ }
+ else
+ {
+ artifacts = project.getArtifacts();
+ }
+
for (Iterator it = artifacts.iterator(); it.hasNext();)
{
Artifact artifact = (Artifact) it.next();