alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Groovy example source code file (AntTest.xml)

This example Groovy source code file (AntTest.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Groovy tags/keywords

antbuilder, antbuilder, anttest, anttest, groovy-1602, groovy-1602, test, test

The Groovy AntTest.xml source code

<!-- 
does exactly the same as the AntBuilder in AntTest... just to be sure that ant behaves the same
as what we expect from the AntBuilder
 -->
<project name="test" default="full">

    <target name="full">
        <path id="task.path">
            <pathelement location="classes"/>
        </path>
        <taskdef name="spoofcontainer" classname="groovy.util.SpoofTaskContainer" classpathref="task.path"/>
        <taskdef name="spoof" classname="groovy.util.SpoofTask" classpathref="task.path"/>

        <spoofcontainer>
            <spoof foo="123"/>
        </spoofcontainer>
    </target>
	
	<target name="testAntBuilderWithinGroovyTask" description="Test for GROOVY-1602">
		<taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy"/>
		<echo message="before groovy task"/>
		<groovy>
			ant.echo(message: 'ant builder within groovy task')
		</groovy>
		<echo message="after groovy task"/>
	</target>
</project>

Other Groovy examples (source code examples)

Here is a short list of links related to this Groovy AntTest.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.