geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r507770 - /geronimo/genesis/trunk/plugins/script-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/script/GroovyMojo.java
Date Thu, 15 Feb 2007 01:49:14 GMT
Author: jdillon
Date: Wed Feb 14 17:49:14 2007
New Revision: 507770

URL: http://svn.apache.org/viewvc?view=rev&rev=507770
Log:
Complain if src did not eval to a Groovy class

Modified:
    geronimo/genesis/trunk/plugins/script-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/script/GroovyMojo.java

Modified: geronimo/genesis/trunk/plugins/script-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/script/GroovyMojo.java
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/plugins/script-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/script/GroovyMojo.java?view=diff&rev=507770&r1=507769&r2=507770
==============================================================================
--- geronimo/genesis/trunk/plugins/script-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/script/GroovyMojo.java
(original)
+++ geronimo/genesis/trunk/plugins/script-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/script/GroovyMojo.java
Wed Feb 14 17:49:14 2007
@@ -138,6 +138,10 @@
         boolean debug = log.isDebugEnabled();
 
         Class type = loadGroovyClass(source);
+        if (type == null) {
+            throw new MojoExecutionException("Source did not evaluate to a Groovy class:
" + source);
+        }
+        
         GroovyObject obj = (GroovyObject)type.newInstance();
 
         /*



Mime
View raw message