ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Schmid <...@standards.tiefbaubg.de>
Subject Is it possible to pass parameters into targets?
Date Mon, 14 Aug 2000 15:00:43 GMT
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



Mime
View raw message