It's not a secret anymore!
The moose likes Ant, Maven and Other Build Tools and the fly likes Understanding build.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Understanding build.xml" Watch "Understanding build.xml" New topic

Understanding build.xml

Bhaskar Mukhejee

Joined: Sep 16, 2008
Posts: 14
Hello, I am new to the j2ee and code builing. In a typical build.xml file(required by ANT utility) I can not understand in the properties tag what is the necessity of value attribute?
why we keep the value (of property tag )under somethink like this "${}" i.e value = "${build.dir}" (for example).
I have gone through several sites but the concept is not clear to me. please help me. Awaiting for an aspiring reponse from your side. Thanks in advance.
[ September 16, 2008: Message edited by: Bear Bibeault ]
Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
HI Bhakar,
I am moving your question to our ANT, Maven and other build tools forum as this question has nothing to do with webservices forum.

Spritle Software Blogs
Peter Johnson

Joined: May 14, 2008
Posts: 5852

I guess I am not sure I understand the question. So if this does not answer it, let us know.

The "${..}" syntax is used to access the value of a property within the build. Consider this property setting:

The property 'basedir' is a built-in property whose value is the directory containing the build.xml file. For example, its value might be "/home/peter/myproject". Ant set the property 'src.dir' to the value "/home/peter/myproject/src".

Put it another way, the above property statement is similar to the following statement in a scripting language, or even in Java (if such languages allowed dots in their variable names):

JBoss In Action
Bhaskar Mukhejee

Joined: Sep 16, 2008
Posts: 14
Thanks Peter,

You exactly gave the answer that I wanted. Now the doubt is clear to me. Thank you very much.

I agree. Here's the link:
subject: Understanding build.xml
It's not a secret anymore!