ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: Parameters for tasks.
Date Sat, 02 Dec 2000 21:06:51 GMT
Not entirely sure I understand what you're asking, but hopefully this will
cover it somewhere along the line. You can reference properties (ie.,
${prop_name}) in the build-file pretty much anywhere you could have a
hard-coded value, and you can set properties in lots of different ways:
  - have the 'ant' script pass, as property defines on the java
    command-line, environment variables that are already in the user env
  - (assuming a unix-type shell) set an env var on the 'ant' command-line
    (eg., "$ FOO=bar ant"), and again, let the 'ant' script deal with it
  - define a property on the ant command-line (eg., "$ ant -Dfooprop=bar")
  - set properties inside the build-file via the <property> task
  - set properties via the <available> task

If I've left out any other ways, I'm sure someone else will fill them in
(and of course, there's always the Ant doc :)

--- Stephane <> wrote:
> Hello all,
> is there a way to pass arguments to ant tasks ?
> It would be pretty nice for exemple
> if you want to give args to a "run" target to give them on the command
> line
> of ant instead of creating many different targets for each different
> tasks.
> Thanks in advance,
>  and excuse me if i ask stupid questions,
>  i am a yound user of ant, and yet mad of it.
> What a software you made !


Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.

View raw message