Commna line ant options

Hi. Our ant scripts need to take a command line argument:

ant -propertyfile d:\myproject\project.properties

In the hope of anticipating any first efforts at solving this, even if I had the patience to go through the ant properties dialog and enter all the properties from my project file, I couldn't as the values of most of the properties rely on the values of other properties that are loaded at runtime.

Is there any way (other than ignoring IDEA and running ant from the command line) to pass a command-line argument to ant in IDEA?

Please say there is! It would involve substantial work to re-work these scripts (and we've built them up over months of project work).

Yours in hope,
Matthew.

3 comments
Comment actions Permalink

Doh! Subject was supposed to read "command line ant options", not the mis-typed junk it actually read.

Apologies for any confusion.

0
Comment actions Permalink

You'll kick yourself for not thinking of this... :)

Just pass in the name of the property file as a property. For example, if
you run it like this:

ant -Dpropertyfile=d:\myproject\project.properties

Then, in your ant file you have something like this:

<property file="$"/>

Hope that helps,
Vil.
--
Vilya Harvey, Consultant
vilya.harvey@digitalsteps.com / digital steps /
(W) +44 (0)1483 469 480
(M) +44 (0)7816 678 457 http://www.digitalsteps.com/

Disclaimer

This e-mail and any attachments may be confidential and/or legally
privileged. If you have received this email and you are not a named
addressee, please inform the sender at Digital Steps Ltd by phone on
+44 (0)1483 469 480 or by reply email and then delete the email from
your system. If you are not a named addressee you must not use,
disclose, distribute, copy, print or rely on this email. Although
Digital Steps Ltd routinely screens for viruses, addressees should
check this email and any attachments for viruses. Digital Steps Ltd
makes no representation or warranty as to the absence of viruses in this
email or any attachments.


"Matthew" <jiveadmin@jetbrains.com> wrote in message
news:5539011.1040055266343.JavaMail.javamailuser@localhost...

Hi. Our ant scripts need to take a command line argument:

>

ant -propertyfile d:\myproject\project.properties

>

In the hope of anticipating any first efforts at solving this, even if I

had the patience to go through the ant properties dialog and enter all the
properties from my project file, I couldn't as the values of most of the
properties rely on the values of other properties that are loaded at
runtime.
>

Is there any way (other than ignoring IDEA and running ant from the

command line) to pass a command-line argument to ant in IDEA?
>

Please say there is! It would involve substantial work to re-work these

scripts (and we've built them up over months of project work).
>

Yours in hope,
Matthew.

>


0
Comment actions Permalink

Consider myself kicked.

Thanks for the prompt reply Vil - I owe you one.

Matthew.

0

Please sign in to leave a comment.