As with any property, these are just ways of assigning a value to a name
that can then be referenced by that name. For example, if you hard-coded a
value for the 'debug' attribute to "on" in every <javac> task instead, and
you then wanted to change it to "off", you would need to go through and
change it in every <javac> task in your build-file(s) -- whereas, if you
set a property (called "debug" in your example) to hold the value, you
could then reference that property in your <javac> tasks attributes:
  <javac debug="${debug}"
         optimize="${optimize}"
  [etc.]
Then to change the attribute's value, you would only need to change the
*property's* definition (ie., in one place, rather than in every <javac>
task).

The "classpath" property in your example serves both that purpose as well
as serving as a short-hand -- it's much cleaner/easier/less-error-prone to
type in a long list of paths in one place, then reference that list using
${classpath} that it would be to repeat that long list everywhere it was
needed.

Diane

--- Pinar Bicioglu <[EMAIL PROTECTED]> wrote:
> 
> I've one more question. So when we say <property name="debug" value="on"
> />,
> what do we really mean. Same thing for <property name="optimize"
> value="false" />.
> 
> Could you also please help me to understand with the one below.
> 
> property name="classpath"
>
value=".;./thirdparty/xml4j.jar;./thirdparty/xerces.jar;./thirdparty/cfx.jar
>
;./thirdparty/oracleclasses111.zip;./thirdparty/servlet.jar;d:/jbuilder3/lib
> /jbcl3.0.jar" /> 
> 
> Sorry for all of these silly and easy questions I ask. But since I have
> only
> one source to reference, I get stuck very often :(
> 
> -----Original Message-----
> From: Diane Holt [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 11, 2001 12:36 PM
> To: [EMAIL PROTECTED]
> Subject: Re: property names
> 
> 
> A property is a way to associate a value with a name that can then be
> referenced by that name, using the form ${property_name}. The property
> name is whatever you want to call it, although it's usually a good idea
> to
> call it something that says something about the value it holds. For
> example, a property to hold the path to the top of the source tree might
> be called "srcdir". Properties are used to allow for a variable value or
> as a means of having a short-hand way of referring to something.
> 
> Diane 
> 
> --- Pinar Bicioglu <[EMAIL PROTECTED]> wrote:
> > 
> > Hi,
> > 
> > Could someone please axplain to me what the "propery name" is?
> Actually
> > the
> > question is how do we specify those? I have this build.xml file that
> > sets
> > the compiler and location options using <property name > tag. And I
> have
> > another build.xml file as a sample that sets different propert names.
> > Are
> > the names standard?
> > 
> > Thanks
> 
> 
> =====
> ([EMAIL PROTECTED])
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail. 
> http://personal.mail.yahoo.com/


=====
([EMAIL PROTECTED])



__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

Reply via email to