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/15 14:49:13 UTC

RE: How do I call another ant build file and pass parameter to it fro m a script task

THANKS that worked.
   this is what i did inside a script task

             antcall=project.createTask("antcall");
		 antcall.init();
	       antcall.setTarget("createJar");
		 antcallParam=antcall.createParam();
		 antcallParam.setName("sbean");
		 antcallParam.setValue(sbean);
		 antcallParam.setName("beanname");
		 antcallParam.setValue(beanname);
		 antcall.execute();

thanks, 
manoj 



-----Original Message-----
From: Pellier Marc [mailto:archi7@onssapl.fgov.be]
Sent: Thursday, May 15, 2003 2:39 AM
To: 'Ant Users List'
Subject: RE: How do I call another ant build file and pass parameter to
it fro m a script task


  <ant antfile="subproject/property_based_subbuild.xml" inheritAll ="true">
    <property name="param1" value="version 1.x"/>
  </ant>

You pass all the properties with inheritAll
You pass a new property with nested element <property>

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: mercredi 14 mai 2003 17:37
To: user@ant.apache.org
Subject: Re: How do I call another ant build file and pass parameter to
it fro m a script task


On Wed, 14 May 2003, Manoj Sadangi <ms...@manh.com> wrote:

> this is complaining that addProperty is not a function.

There is no method addProperty in the Property class that would take
two arguments, in fact ther is no method of that name at all.

Maybe what you really mean is

    prop.setName("sbean");
    prop.setValue(sbean);

instead of 

>              prop.addProperty("sbean",sbean);

???

Stefan

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

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