Issue Details (XML | Word | Printable)

Key: GROOVY-1019
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Paul King
Reporter: Ron Lancaster
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
groovy

Ant Task Not Using Classpath

Created: 18/Aug/05 10:21 PM   Updated: 22/Nov/07 05:25 AM
Component/s: Ant integration
Affects Version/s: 1.0-JSR-3
Fix Version/s: 1.1-rc-2

Time Tracking:
Not Specified

Environment: OSX 10.4, IDEA 5.0, Ant 1.6.5, Java 1.4.2

Testcase included: yes


 Description  « Hide
In JSR03, the groovyc ant task doesn't seem to use the classpath provided.

In JSR01, the following Ant task worked. In JSR03 it does not and I get class not found errors.

<groovyc srcdir="${src}" destdir="${classes}" classpath="${classes}">
<classpath>
<fileset dir="${lib}" casesensitive="yes">
<include name="*/.jar"/>
</fileset>
</classpath>
</groovyc>



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Hein Meling added a comment - 19/Aug/05 01:34 AM
I had the opposite problem, JSR02 didn't work, while JSR03 works after I provided a fix. I use this:

<groovyc destdir="${build}" srcdir="${groovy-src}" listfiles="true" stacktrace="false">
<classpath refid="run.path"/>
</groovyc>

Could you provide more details to see if it is possible to resolve this. Try adding stacktrace="true" and see if that helps us get the necessary details to understand why your thing didn't work. Also, if you have a simple example that allows reproduction.

BTW: this issue does not include a junit test case as claimed. Maybe you forgot to add it.


Paul King added a comment - 17/Oct/07 12:03 AM
I am not sure when this was fixed but the following works for me now:
<project name="groovy-1019" default="run">
    <path id="taskdef.path">
        <path path="C:/Downloads/groovy.codehaus.org/groovy-1.1-rc-1/embeddable/groovy-all-1.1-rc-1.jar"/>
        <path path="C:/Downloads/groovy.codehaus.org/groovy-1.1-rc-1/lib/commons-cli-1.0.jar"/>
    </path>
    <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc" classpathref="taskdef.path"/>

    <path id="compile.path">
        <fileset dir="./groovy-1019/lib" />
    </path>

    <target name="run">
        <groovyc destdir="." srcdir="./groovy-1019/src" listfiles="true" stacktrace="false">
            <classpath refid="compile.path"/>
        </groovyc>
    </target>

</project>

Where in src is a single groovy file requiring commons lang and in lib is just the commons lang jar.