Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / March 2005

Tip: Looking for answers? Try searching our database.

ant quetion

Thread view: 
Maxim Kasimov - 15 Mar 2005 09:44 GMT
read thrue the manual, but can't get the simple thing:
is there way to specify options in command line, to use the values in build.xml,
instead of editing property value in build.xml file?

Signature

Best regards,
Maxim

Arnaud Berger - 15 Mar 2005 09:56 GMT
Hi,

I think you can pass properties the "Java way", i.e
: -Dpropertyname=propertyvalue

Regards,

Arnad

> read thrue the manual, but can't get the simple thing:
> is there way to specify options in command line, to use the values in build.xml,
[quoted text clipped - 3 lines]
> Best regards,
> Maxim
Arnaud Berger - 15 Mar 2005 09:57 GMT
I must add that ant may also use a "property file"

Regards,

Arnaud

> read thrue the manual, but can't get the simple thing:
> is there way to specify options in command line, to use the values in build.xml,
[quoted text clipped - 3 lines]
> Best regards,
> Maxim
Maxim Kasimov - 15 Mar 2005 10:47 GMT
> I must add that ant may also use a "property file"
using another file also mean "i have to edit text in a file" - it is very inconvenient

using more and more ant, it is seems to me that the ant is an evil thing.
i'm still using ant only because of preprocessor task of antenna.
is there such a tool to use it in command line? (for Windows/Unix)

> Regards,
>
[quoted text clipped - 10 lines]
>>Best regards,
>>Maxim

Signature

Best regards,
Maxim

Rhino - 15 Mar 2005 19:18 GMT
> > I must add that ant may also use a "property file"
> using another file also mean "i have to edit text in a file" - it is very inconvenient
>
> using more and more ant, it is seems to me that the ant is an evil thing.
> i'm still using ant only because of preprocessor task of antenna.
> is there such a tool to use it in command line? (for Windows/Unix)

Arnaud was right in his reply to your original question: you *can* use Ant
from the command line and pass parameters as he said. For example, the
following command tells Ant to execute a build file named run.xml and passes
in two property values from the command line, namely 'dept' an 'job'. The
'dept' property is given the value A00 and the 'job' property is given the
value Clerk. Note that there are no quotes, apostrophes, back tics or any
other punctuation around values of these two properties, even though they
are Strings:

ant -f run.xml -Ddept=A00 -Djob=Clerk

Rhino


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.