felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r533166 - /incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java
Date Fri, 27 Apr 2007 17:07:18 GMT
Author: rickhall
Date: Fri Apr 27 10:07:17 2007
New Revision: 533166

URL: http://svn.apache.org/viewvc?view=rev&rev=533166
Log:
Applied patch (FELIX-269) to avoid running the plugin on pom projects.

Modified:
    incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java

Modified: incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java?view=diff&rev=533166&r1=533165&r2=533166
==============================================================================
--- incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java
(original)
+++ incubator/felix/trunk/tools/maven2/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/BundlePlugin.java
Fri Apr 27 10:07:17 2007
@@ -49,6 +49,8 @@
  /** pattern that matches strings that contain only numbers */
  private static final Pattern ONLY_NUMBERS = Pattern.compile("[0-9]+");
 
+ private static final Collection SUPPORTED_PROJECT_TYPES = Arrays.asList(new String[]{"jar","osgi-bundle"});
+
  /**
   * @parameter expression="${project.build.outputDirectory}"
   * @required
@@ -97,6 +99,12 @@
 
   if (new File(baseDir, "src/main/resources").exists()) {
     header(properties, Analyzer.INCLUDE_RESOURCE, "src/main/resources/");
+  }
+  
+  /* 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");
+    return;
   }
   
   execute(project, instructions, properties);



Mime
View raw message