ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Sadangi <msada...@manh.com>
Subject calling another ant file from script task
Date Tue, 13 May 2003 22:15:29 GMT
how can I pass the parameter to another build file ?
this script i am calling from main build.xml
<script language="javascript"> <![CDATA[
        importClass(java.util.StringTokenizer);      
        stoken = new StringTokenizer(basedata.getProperty("mylist"),',');
        i = stoken.countTokens();
        for (k=0;k<i;k++)
        {
             sbean = stoken.nextToken();
             beanname = sbean.substring(sbean.lastIndexOf("/"));
       	 jarIt = basedata.createTask('ant');
             jarIt.setAntfile("jarIt.xml");
             jarIt.setInheritAll(true);
             jarIt.execute();
        }


    ]]> </script>

my jarIt xml looks like this.
<?xml version="1.0"?>
<project name="jarit" default="all" basedir=".">
  <property name="jarDir" value=project.getProperty("jarDir")/>
  <property name="earDir" value=project.getProperty("earDir")/>
  <delete dir="${jarDir}"/>       
  <copy todir="${jarDir}">
		<fileset dir="${sbean}" includes="*.class" /> 
  </copy>
  <copy todir="${jarDir}/META-INF">
	<fileset dir="${sbean}" includes="*.xml" /> 
  </copy>
<jar jarfile="${earDir}/${beanname}" basedir="${jarDir}" />
</project>

thanks, 
manoj  



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

Mime
View raw message