You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "D'Souza, Sudeep" <Su...@gs.com> on 2000/09/22 01:19:56 UTC

Can I print value of properties....

Hi,
	I want some of the values of my properties to be echoed on the
screen.... If I use the echo it is just printing the string as it is as in
${what_ever}. While doing development how do I add debug statements, for
example statements that print out the classpath so that I know that the
classpath is right or not when the build is running.

Thanks,
Sudeep.

Re: Can I print value of properties....

Posted by Nico Seessle <ni...@seessle.de>.
----- Original Message -----
From: "D'Souza, Sudeep" <Su...@gs.com>
To: "Ant user (E-mail)" <an...@jakarta.apache.org>
Sent: Friday, September 22, 2000 1:19 AM
Subject: Can I print value of properties....


> Hi,
> I want some of the values of my properties to be echoed on the
> screen.... If I use the echo it is just printing the string as it is as in
> ${what_ever}. While doing development how do I add debug statements, for
> example statements that print out the classpath so that I know that the
> classpath is right or not when the build is running.
>

In Ant1.1 the bejaviour for properties are only resolved once (while parsing
your buildfile), all usages of <property/> will be "executed" while parsing
independet of where you place them. If you build-file (or the  echo-task)
prints ${what_ever} for your property then this is it's value (and will be
for all usages inside the same 'instance' of the build-file). If you need
more dynamic behaviour you can try to use one of the nightly builds or have
a look at the 'antcall'-task which reparses your file and allows you to
dynamically define properties using nested <param/>-tags (if they are not
already defined in your buildfile).

You should think of one of the nightly builds, even if they are development
builds and not stable builds they should be much more 'stable' (in the sense
of quality, not in the sense of changing their behaviour from day to day)
and probably contain less bugs than 1.1 (even if it may be possible that new
bugs were introduced and no one has found them).

Nico