ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <>
Subject AW: Environment variables with $$
Date Sun, 28 Sep 2003 17:10:42 GMT
1) $$DESKTOP as part of a property value does  not mean anything special for
2) the interpretation which springs to my mind is : the build file writer
designed this property "providers" so that its value
"${portaldir}/$$DESKTOP/classes/portal/providers/" be usable as an argument
for a shell script. The shell interpreter would then expand the property
value, not ant.

Also, it seems that $$ as part of a property value is understood just the
same as $ by ant :

<project name="testdol">
<property name="twodols" value="twodols$$twodols"/>
<property name="onedol" value="onedol$onedol"/>


 ant -f testdol.xml
Buildfile: testdol.xml
     [echo] onedol=onedol$onedol
     [echo] twodols=twodols$twodols
Total time: 0 seconds

-----Ursprungliche Nachricht-----
Von: Duncan Strang []
Gesendet: Freitag, 26. September 2003 18:31
Betreff: Environment variables with $$


I have an ant build script that contains the following target

   <target name="init">
      <filter filtersfile="${filtersfile}" />
         <format property="build.sdate" pattern="yyMMdd" />
      <copy todir="${tmpdir}" filtering="true" >
          <fileset dir="${build}/packages" />
      <property name="providers"
      <echo>Just set a property called providers this has the value

I'm trying to understand the semantics of the $$DESKTOP bit.
I have similar statements all through my 5000 line build.xml
I have been told that DESKTOP is a 'simple environment variable' however
I have set a variable in my .profile file (Solaris 8) with the value
foobar. I can access this from the shell with echo $DESKTOP, I get
foobar back
When I run the init target I was expecting to get
Instead I got

I have the book 'Java development with ant' by Hatcher and Loughran,
they talk about using the env prefix to access environment variables. I
have searched build.xml and I can find no reference to anything that
looks like it is setting or retrieving an ev.

I have also had a look round the archives, once again all I see is the
env prefix stuff.

Can anyone explain the semantics of $$DESKTOP.

Many Thanks

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message