Line | |
---|
1 | <?xml version="1.0"?>
|
---|
2 | <project name="test">
|
---|
3 |
|
---|
4 | <property name="testcases.dir" location="../../../../build/testcases"/>
|
---|
5 |
|
---|
6 | <path id="testclasses">
|
---|
7 | <pathelement location="${testcases.dir}" />
|
---|
8 | <pathelement path="${java.class.path}" />
|
---|
9 | </path>
|
---|
10 |
|
---|
11 | <target name="antlib.file">
|
---|
12 | <typedef file="test.antlib.xml"
|
---|
13 | classpathref="testclasses"/>
|
---|
14 | <mytask/>
|
---|
15 | </target>
|
---|
16 |
|
---|
17 | <target name="antlib.resource">
|
---|
18 | <typedef resource="taskdefs/test.antlib.xml">
|
---|
19 | <classpath>
|
---|
20 | <!-- To load the task classes: -->
|
---|
21 | <path refid="testclasses"/>
|
---|
22 | <!-- For test.antlib.xml: -->
|
---|
23 | <pathelement location=".."/>
|
---|
24 | <!-- For test2.antlib.xml: -->
|
---|
25 | <pathelement location="${testcases.dir}/org/apache/tools/ant/taskdefs/test2-antlib.jar"/>
|
---|
26 | </classpath>
|
---|
27 | </typedef>
|
---|
28 | <mytask/>
|
---|
29 | <echo>-and-then-</echo>
|
---|
30 | <mytask2/>
|
---|
31 | </target>
|
---|
32 |
|
---|
33 | <target name="ns.current">
|
---|
34 | <typedef file="antlib.current-test.xml" uri="abc"/>
|
---|
35 | <x:useecho2 xmlns:x="abc"/>
|
---|
36 | <x:preset.echo xmlns:x="abc" name="p"/>
|
---|
37 | <x:p xmlns:x="abc">Hello from x:p</x:p>
|
---|
38 | </target>
|
---|
39 | </project> |
---|
Note:
See
TracBrowser
for help on using the repository browser.