geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r462761 - /geronimo/genesis/trunk/plugins/script-maven-plugin/src/main/java/org/apache/geronimo/genesis/plugins/script/GroovyMojo.java
Date Wed, 11 Oct 2006 10:47:57 GMT
Author: jdillon
Date: Wed Oct 11 03:47:56 2006
New Revision: 462761

URL: http://svn.apache.org/viewvc?view=rev&rev=462761
Log:
Set the fileName of the URL loaded to produce better debug output

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=462761&r1=462760&r2=462761
==============================================================================
--- 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 Oct 11 03:47:56 2006
@@ -190,9 +190,10 @@
             if (debug) {
                 log.debug("Loading source from: " + url);
             }
-            
+
+            String fileName = new File(url.getFile()).getName();
             InputStream input = url.openConnection().getInputStream();
-            groovyClass = loader.parseClass(input);
+            groovyClass = loader.parseClass(input, fileName);
             input.close();
         }
         
@@ -228,7 +229,7 @@
 
         // Execute the script
         if (debug) {
-            log.debug("Invoking object.run() on: " + groovyObject);
+            log.debug("Invoking run() on: " + groovyObject);
         }
         groovyObject.invokeMethod("run", new Object[0]);
     }



Mime
View raw message