blob: 4e1d32b05aa6eb23ace19ea375dfc66d7032e14e [file] [log] [blame]
<?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-</echo>
<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</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>