blob: 46bed109bc73a6a04ed8f12fb7388df2c4a38554 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1" ?>
<project name="test-groovy-task" default="groovyCodeWithinTask" basedir=".">
<target name="groovyCodeWithinTask" depends="defineTask">
<groovy>
org.codehaus.groovy.ant.GroovyTest.FLAG = "from groovy inlined in ant"
</groovy>
</target>
<target name="groovyCodeInExternalFile" depends="defineTask">
<groovy src="GroovyTest1.groovy"/>
</target>
<target name="groovyCodeInExternalFileWithOtherClass" depends="defineTask">
<groovy src="GroovyTest2.groovy"/>
</target>
<target name="groovyClasspath_missing" depends="defineTask" description="should fail!">
<groovy>
def foo = new GroovyTest3Class()
foo.doSomething()
</groovy>
</target>
<target name="groovyClasspath_classpathAttribute" depends="defineTask">
<groovy classpath="groovytest3">
def foo = new GroovyTest3Class()
foo.doSomething()
</groovy>
</target>
<target name="groovyClasspath_classpathrefAttribute" depends="defineTask">
<path id="myClasspathRef">
<pathelement location="groovytest3"/>
</path>
<groovy classpathref="myClasspathRef">
def foo = new GroovyTest3Class()
foo.doSomething()
</groovy>
</target>
<target name="groovyClasspath_nestedClasspath" depends="defineTask">
<groovy classpathref="myClasspathRef">
<classpath>
<pathelement location="groovytest3"/>
</classpath>
def foo = new GroovyTest3Class()
foo.doSomething()
</groovy>
</target>
<target name="defineTask">
<taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy"/>
</target>
</project>