felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r553613 - in /felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin: BundlePlugin.java ManifestPlugin.java
Date Thu, 05 Jul 2007 19:02:52 GMT
Author: rickhall
Date: Thu Jul  5 12:02:51 2007
New Revision: 553613

URL: http://svn.apache.org/viewvc?view=rev&rev=553613
Log:
Applied patch (FELIX-309) to allow overriding of supported project types.

Modified:
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
    felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.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?view=diff&rev=553613&r1=553612&r2=553613
==============================================================================
--- 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
Thu Jul  5 12:02:51 2007
@@ -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;
   }
   

Modified: felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java?view=diff&rev=553613&r1=553612&r2=553613
==============================================================================
--- felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
(original)
+++ felix/trunk/bundleplugin/src/main/java/org/apache/felix/bundleplugin/ManifestPlugin.java
Thu Jul  5 12:02:51 2007
@@ -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 )



Mime
View raw message