ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CP Agrawal" <>
Subject Javascript inside Ant
Date Tue, 26 Nov 2002 17:54:51 GMT

Is there doc on the methods available when using javascript within ant. Here is the specific
problem which has stumped me: The property "empty" is getting reset as I am looping thru jars,
and second question is how do I get basename within javaScript.

<property name="empty" value=""/>

<target name="test-foreach">

<foreach target="testscript" param="var">

<fileset dir="${build.dir}/${wl.domain}/applications/efmejbs" >

<include name="*.jar"/>



<echo message="empty= ${empty}"/>


<target name="testscript">

<property name="package" value="com.myName.helloWorld" />

<!-- Sets the file.size property with the length of the

file as named in the ant.file property -->

<script language="javascript"><![CDATA[

emptyName = self.getProject().getProperty("empty");

jarName = self.getProject().getProperty("var");

retName = "<ejbComponent URI=\"" + jarName + "\">";

emptyName = emptyName + retName;

self.getProject().setProperty("empty", emptyName);

self.getProject().setNewProperty("retName", emptyName);


<echo message="retName= ${retName}"/>

<echo message="empty= ${empty}"/>


-- CP Agrawal

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message