|
Groovy example source code file (AntTest.xml)
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 |
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.