Applied patch (FELIX-309) to allow overriding of supported project types.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@553613 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
index 3ceb9d2..0ebaa65 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
@@ -41,7 +41,12 @@
*/
public class BundlePlugin extends AbstractMojo {
- private static final Collection SUPPORTED_PROJECT_TYPES = Arrays.asList(new String[]{"jar","bundle"});
+ /**
+ * Project types which this plugin supports.
+ *
+ * @parameter
+ */
+ private List supportedProjectTypes = Arrays.asList(new String[]{"jar","bundle"});
/**
* The directory for the generated bundles.
@@ -104,8 +109,9 @@
Properties properties = new Properties();
/* ignore project types not supported, useful when the plugin is configured in the parent pom */
- if (!SUPPORTED_PROJECT_TYPES.contains(getProject().getArtifact().getType())) {
- getLog().debug("Ignoring project " + getProject().getArtifact() + " : type not supported by bundle plugin");
+ if (!supportedProjectTypes.contains(getProject().getArtifact().getType())) {
+ getLog().debug("Ignoring project " + getProject().getArtifact() + " : type " + getProject().getArtifact().getType() +
+ " is not supported by bundle plugin, supported types are " + supportedProjectTypes );
return;
}
diff --git a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
index e4e6e3d..41e8780 100644
--- a/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
+++ b/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
@@ -109,6 +109,10 @@
analyzer.setProperties( props );
+ if ( project.getArtifact().getFile() == null )
+ {
+ throw new NullPointerException( "Artifact file is null" );
+ }
analyzer.setJar( project.getArtifact().getFile() );
if ( classpath != null )