When I run groovyc without the fork option, it works fine. But with fork="true" it fails with an error message:
Error: Could not find or load main class org.codehaus.groovy.ant.FileSystemCompilerFacade
What is wrong here?
Ant task:
<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="test.path" />
<groovyc fork="true" srcdir="../myproject/src-test" destdir="${build.test.dir}">
<javac debug="true" source="1.7" target="1.7" >
<compilerarg value="-XX:-UseSplitVerifier"/>
</javac>
</groovyc>
EDIT:
test.path contains a groovy jar:
(...):/home/pkalinow/(..)/groovy-all-1.8.6.jar:(...)
The classpathref="test.path" must be specified in both <taskdef> and <groovyc> invocations when groovyc is forked.
I cannot find any confirmation in the documentation, but it seems, that only non-forking groovyc is inheriting classpath from taskdef.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With