ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul, R. Chip" <>
Subject RE: ant variables on win & unix
Date Mon, 02 Feb 2004 14:44:57 GMT
Shouldn't you have an environment variable named TOMCAT_HOME anyway? (or is
I thought Tomcat wanted that to run properly.

If you have an env variable you could just do:
    <!-- Get the environment variables -->
    <property name="env" environment="env" value="env"/>

    <property name="webapp.dir" value="${env.TOMCAT_HOME}/webapps/myapp" />

Alternatively, specify webapp.dir in a file that defines it
properly for each environment.  I'm not sure you want to check for an OS
version for something as simple as a path change.

Chip Paul
Sr Software Engineer
ComFrame Software Corporation

-----Original Message-----
From: Pete Stokes [] 
Sent: Monday, February 02, 2004 8:05 AM
Subject: ant variables on win & unix


I want to ant to automatically detect which platform I'm running it on 
(win/linux) and therefore to use a different variable for the deploy 
target, i.e. in win I'd need to take into account drive names

win: e:/java/deploy/tomcat/webapps/myapp
linux /usr/local/tomcat/webapps/myapp

Looked at system properties, but cannot figure it out, any help would be 
greatly appreciated.


This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
For any information on the Quinn Group of Companies please visit :-

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

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

View raw message