|
Ant example source code file (location.xml)
The location.xml source code<?xml version="1.0"?> <project name="location-test" basedir="." default="all" xmlns:au="antlib:org.apache.ant.antunit"> <property name="ant.build.dir" location="../../../../../build"/> <property name="working.dir" location="${ant.build.dir}/ant-unit/location-dir"/> <property name="classes.dir" location="${working.dir}/classes"/> <target name="all"> <au:antunit> <fileset file="${ant.file}"/> <au:plainlistener/> </au:antunit> </target> <target name="setUp"> <mkdir dir="${classes.dir}"/> <javac srcdir="src" destdir="${classes.dir}" debug="yes"/> <taskdef name="echo-location" classname="task.EchoLocation" classpath="${classes.dir}"/> </target> <target name="define"> <taskdef name="echoloc" classname="task.EchoLocation"> <classpath> <pathelement location="${classes.dir}" /> <pathelement path="${java.class.path}"/> </classpath> </taskdef> </target> <target name="macrodef" depends="define"> <macrodef name="echoloc2" backtrace="false"> <sequential> <echoloc/> </sequential> </macrodef> </target> <target name="presetdef" depends="define"> <presetdef name="echoloc3"> <echoloc/> </presetdef> </target> <target name="tearDown"> <delete dir="${working.dir}"/> </target> <target name="test-plain-task"> <echo id="echo">Hello <au:assertLogContains text="Hello"/> </target> <target name="test-standalone-type"> <!-- TODO --> </target> <target name="test-condition-task"> <!-- TODO --> </target> <target name="test-macrodef-wrapped-task" depends="macrodef"> <echo id="echo3">Hello <echoloc2/> <au:assertLogContains text="Line: "/> </target> <target name="test-presetdef-wrapped-task" depends="presetdef"> <echo id="echo4">Hello <echoloc3/> <au:assertLogContains text="Line: "/> </target> </project> Other Ant examples (source code examples)Here is a short list of links related to this Ant location.xml source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 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.