Browse Source

Fixed the loading of JXPath.

Added more samples of how it can be used.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273174 13f79535-47bb-0310-9956-ffa450edef68
master
Costin Manolache 23 years ago
parent
commit
749486ba91
1 changed files with 19 additions and 4 deletions
  1. +19
    -4
      proposal/embed/test.xml

+ 19
- 4
proposal/embed/test.xml View File

@@ -6,11 +6,10 @@


<target name="main" >
<antcall target="embed.main" />

<path id="myJars" >
<pathelement path="${junit.jar}" />
<pathelement path="${jxpath.jar}" />
<pathelement path="${ant.home}/lib/ant-sax2.jar" />
</path>

<systemPath pathRef="myJars"/>
@@ -18,10 +17,26 @@
<junit id="replacedJunit" />
<echo message="toString sample: ${toString:replacedJunit}" />
<echo message="${jxpath.jar}" />
<!-- This is Taksdef2.java - it'll use the systemPath as parent loader
-->
<taskdef classname="org.apache.tools.ant.taskdefs.optional.JXPath"
name="jxpath" />

<!-- Init JxPath. '/' is the project -->
<jxpath/>
<echo message="jxPath sample: ${jxpath:/}" />

<echo message="jxPath /targets[1]: ${jxpath:/targets[1]}" />
<echo message="jxPath /references: ${jxpath:/references}" />
<echo message="jxPath /references[@name='myJars']: ${jxpath:/references[@name='myJars']}" />
<echo message="jxPath /references/myJars: ${jxpath:/references/myJars}" />

</target>


<target name="test-import" >
<antcall target="embed.main" />
</target>


</project>

Loading…
Cancel
Save