Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.5.3
-
None
-
Mac OS X 10.5, Java 1.5
Description
Trying to execute a Groovy Test Case using the Groovy Ant Tasks fails because it is complaining about a missing main() method:
groovy.lang.MissingMethodException: No signature of method: org.guilder.plugin.PluginTest.main() is applicable for argument types: ([Ljava.lang.String values:
{[]} at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:54)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:59)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:169)
at org.guilder.plugin.PluginTest.invokeMethod(PluginTest.groovy)
at org.codehaus.groovy.runtime.InvokerHelper$2.run(InvokerHelper.java:426)
at org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:348)
This happens when I use Ant through the command line as well as using AntBuilder. This is the build.xml script I use:
project>
<path id="my.classpath">
<fileset dir="/Java/groovy/lib">
<include name="*/.jar"/>
</fileset>
</path>
<target name="run">
<taskdef name="groovy"
classname="org.codehaus.groovy.ant.Groovy"
classpathref="my.classpath"/>
<groovy src="org/guilder/plugin/PluginTest.groovy">
</groovy>
</target>
</project>
Executing the Script through: 'groovy org/guilder/plugin/PluginTest.groovy' it works fine.
Unfortunately I could not figure out how the Groovy Command Line tool does handle that otherwise I would created a patch.
Any ideas?
-Andy
Attachments
Attachments
Issue Links
- is duplicated by
-
GROOVY-2590 MissingMethodException in Unit Test
- Closed