|
Ant example source code file (antlib.xml)
The antlib.xml source code<?xml version="1.0"?> <project name="test"> <property name="testcases.dir" location="../../../../build/testcases"/> <path id="testclasses"> <pathelement location="${testcases.dir}" /> <pathelement path="${java.class.path}" /> </path> <target name="antlib.file"> <typedef file="test.antlib.xml" classpathref="testclasses"/> <mytask/> </target> <target name="antlib.resource"> <typedef resource="taskdefs/test.antlib.xml"> <classpath> <!-- To load the task classes: --> <path refid="testclasses"/> <!-- For test.antlib.xml: --> <pathelement location=".."/> <!-- For test2.antlib.xml: --> <pathelement location="${testcases.dir}/org/apache/tools/ant/taskdefs/test2-antlib.jar"/> </classpath> </typedef> <mytask/> <echo>-and-then- <mytask2/> </target> <target name="ns.current"> <typedef file="antlib.current-test.xml" uri="abc"/> <x:useecho2 xmlns:x="abc"/> <x:preset.echo xmlns:x="abc" name="p"/> <x:p xmlns:x="abc">Hello from x:p </target> <target name="antlib_uri" > <typedef uri="antlib:org.example.tasks" onerror="failall"/> </target> <target name="antlib_uri_auto" xmlns:ex="antlib:org.example.tasks"> <ex:simple> <echo message="inside simple" /> </ex:simple> </target> <target name="antlib_uri_auto2" xmlns:ex="antlib://org/example/tasks/antlib2.xml"> <ex:simple> <echo message="inside simple"/> </ex:simple> </target> </project> Other Ant examples (source code examples)Here is a short list of links related to this Ant antlib.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.