You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Manoj Sadangi <ms...@manh.com> on 2003/05/14 00:15:29 UTC

calling another ant file from script task

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