Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: Can Ant use existing environment variables?

Reply
Thread Tools

Re: Can Ant use existing environment variables?

 
 
Phil Hanna
Guest
Posts: n/a
 
      07-01-2003
On Fri, 27 Jun 2003 07:36:41 +0100, David Potts <>
wrote:

>Wendy S wrote:
>> In build.xml, I have:
>>
>> <property name="tomcat" value="c:\jakarta\jakarta-tomcat-4.1.24" />
>> and
>> <path id="project.classpath">
>> <pathelement location="${tomcat}\common\lib\servlet.jar" />
>> </path>
>>
>> Is there a way to get it to pick up %TOMCAT_HOME% on Windows?
>>

>
>
>
>Yup. You declare a prefix (e.g. "env") with a property tag and can then
>reference environment variables by e.g. $(env.TOMCAT_HOME}.


Specifically,

<property environment="env"/>
<property name="tomcat" value="${env.TOMCAT_HOME}"/>

--
Phil Hanna
Author of JSP 2.0: The Complete Reference
http://www.philhanna.com
http://www.philhanna.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run ant script from ant script? lionelv@gmail.com Java 6 07-26-2007 02:12 AM
error runing ant in eclipse ant view yihucd@gmail.com Java 1 03-07-2006 08:39 PM
Deploying an application with existing library as jar file created with ANT dev-jared@shaw.ca Java 0 07-13-2005 05:12 PM
trouble with Hibernate and Ant (probably just Ant) john martin Java 2 04-07-2005 09:27 PM
wondering how i can launch tomcat from ant without ant hanging... Chris Bedford Java 6 12-23-2004 12:41 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57