ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manoj Sadangi <msada...@manh.com>
Subject How do I call another ant build file and pass parameter to it fro m a script task
Date Wed, 14 May 2003 15:30:14 GMT
when I try to pass the parameter this way
this is complaining that addProperty is not a function.
I am using ant1.5.1.     
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");
             prop = jarIt.createProperty();
             prop.addProperty("sbean",sbean);
             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