You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by gn...@apache.org on 2019/03/04 10:59:52 UTC

svn commit: r1854760 - /felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java

Author: gnodet
Date: Mon Mar  4 10:59:52 2019
New Revision: 1854760

URL: http://svn.apache.org/viewvc?rev=1854760&view=rev
Log:
[FELIX-6078] Add an option to silently ignore some project types instead of displaying a warning

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

Modified: felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java
URL: http://svn.apache.org/viewvc/felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java?rev=1854760&r1=1854759&r2=1854760&view=diff
==============================================================================
--- felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java (original)
+++ felix/trunk/tools/maven-bundle-plugin/src/main/java/org/apache/felix/bundleplugin/BundlePlugin.java Mon Mar  4 10:59:52 2019
@@ -260,6 +260,12 @@ public class BundlePlugin extends Abstra
     protected List<String> supportedProjectTypes = Arrays.asList("jar", "bundle");
 
     /**
+     * Project types which are not supported, but silently ignored.
+     */
+    @Parameter
+    protected List<String> noWarningProjectTypes = Collections.emptyList();
+
+    /**
      * The directory for the generated bundles.
      */
     @Parameter( defaultValue = "${project.build.outputDirectory}" )
@@ -345,8 +351,11 @@ public class BundlePlugin extends Abstra
         // ignore unsupported project types, useful when bundleplugin is configured in parent pom
         if ( !supportedProjectTypes.contains( projectType ) )
         {
-            getLog().warn(
-                "Ignoring project type " + projectType + " - supportedProjectTypes = " + supportedProjectTypes );
+            if (!noWarningProjectTypes.contains( projectType ) )
+            {
+                getLog().warn(
+                        "Ignoring project type " + projectType + " - supportedProjectTypes = " + supportedProjectTypes);
+            }
             return;
         }