You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Hans Schmid <hs...@standards.tiefbaubg.de> on 2000/08/14 17:00:43 UTC
Is it possible to pass parameters into targets?
Hello,
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"
basedir="./classes"
includes="${package}/*.class"
/>
this would allow me to have a target similar to the Makefile.bean in my makefile:
Makefile:
all: a b
a:
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, deploying.
I tried to use properies, but they seem to be like global constants.
Any help or suggestions are highly appreciated.
Thanks,
Hans