ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Schmid <>
Subject Is it possible to pass parameters into targets?
Date Mon, 14 Aug 2000 15:00:43 GMT

i am completely new to ant, so forgive me if, I have overlooked something in the docs, or
a similar question
 has been discussed earlier.

I would like to port some Makefiles to Ant (currently 1.1) and would appreciate any help or
pointers to help 
on the following topics:

Is it possible to pass parameters into targets?

like <target name="ejb" depends="compile,jetace,deploy" parameterlist="name,package")
which would pass on two parameter. I would like to use them properties

    <jar jarfile="./$(name).jar"

this would allow me to have a target similar to the Makefile.bean in my makefile:


all: a b

	make -f Makefile.bean name=Ejb1 package=package1

b:	make -f Makefile.bean name=Ejb2 package=package2

and have only one Makefile.bean (resp. ant target) to be executed for compiling, rmic, jar,

I tried to use properies, but they seem to be like global constants.

Any help or suggestions are highly appreciated.


View raw message