ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vikas Phonsa <>
Subject RE: Environment variables with $$
Date Fri, 26 Sep 2003 16:44:37 GMT
I started programming just a few months ago and I may not understand exactly
what you are saying so pardon me, but take a look at this:

<project name="Test" default="envtest" basedir=".">
	<target name="envtest">	
  	<property environment="env"/>  
  	<echo message="Class path=${env.CLASSPATH}"/>	



This is how I was able to use "env" to echo the classpath. Maybe you could
try using ${env.Desktop} is that has been set has an environment variable.

-----Original Message-----
From: Duncan Strang [] 
Sent: Friday, September 26, 2003 9:31 AM
Subject: 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

Duncan Strang
JAVA Consultant
UK eUniversities Worldwide Limited
Direct:    +44 (0)207 932 4495
Fax:         +44 (0)207 932 4445
Mobile:   +44 (0)
Switchboard: +44 (0)207 932 4444

This e-mail is from UK eUniversities Worldwide Limited, 14 Buckingham
Gate, London. SW1E 6LB, United Kingdom, No: 4218275.
This e-mail (and any attachment) is confidential to the addressee and
may be privileged.  If you are not the named addressee please notify the
sender immediately by calling our switchboard on  +44 (0) 207 932 4444 -
do not disclose to another person or use, copy or forward all or any of
it in any form.
All information or opinions expressed in this message and/or any
attachments are those of the author and are not necessarily those of UK
eUniversities Worldwide Limited or any of its affiliates. UK
eUniversities Worldwide Limited or any of its affiliates accept no
responsibility for loss or damage arising from its use, including damage
from virus.

This email has been scanned for all viruses on behalf of UKeUniversities
Worldwide Limited by the MessageLabs Email
Security System.

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

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

View raw message