maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r746379 - /maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java
Date Fri, 20 Feb 2009 21:49:41 GMT
Author: jdcasey
Date: Fri Feb 20 21:49:40 2009
New Revision: 746379

URL: http://svn.apache.org/viewvc?rev=746379&view=rev
Log:
[MPLUGIN-106] Throw an exception when no mojo defs found for a plugin, instead of merely warning
about it.

Modified:
    maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java

Modified: maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java?rev=746379&r1=746378&r2=746379&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java
(original)
+++ maven/plugin-tools/trunk/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/scanner/DefaultMojoScanner.java
Fri Feb 20 21:49:40 2009
@@ -122,26 +122,8 @@
 
         if ( numMojoDescriptors == 0 )
         {
-            // MPLUGIN-102. Restore the old functionality and allow a deprecation period
-            // throw new InvalidPluginDescriptorException( "No mojo descriptors were found
in this project." );
-            for ( int i = 0; i < 10; i++ )
-            {
-                logger.warn( "" );
-            }
-
-            logger.warn( "*******************************************************" );
-            logger.warn( "Deprecation Alert:" );
-            logger.warn( "No mojo descriptors were found in this project which has a packaging
type of "
-                + "maven-plugin." );
-            logger.warn( "In future versions of the plugin tools, this will fail the build."
);
-            logger.warn( "If this project is an archetype, change the packaging type from
maven-plugin to "
-                + "maven-archetype." );
-            logger.warn( "********************************************************" );
-
-            for ( int i = 0; i < 10; i++ )
-            {
-                logger.warn( "" );
-            }
+            throw new InvalidPluginDescriptorException( "No mojo definitions were found for
plugin: "
+                + request.getPluginDescriptor().getPluginLookupKey() + "." );
         }
     }
 



Mime
View raw message