ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chappell, Simon P" <Simon.Chapp...@landsend.com>
Subject RE: Ant Books
Date Mon, 01 Mar 2004 21:00:35 GMT


>-----Original Message-----
>From: Graham Reeds [mailto:grahamr@ntlworld.com]
>Sent: Monday, March 01, 2004 2:44 PM
>To: Ant Users List
>Subject: RE: Ant Books

snip

>Currently I want to know how to embed my classpath in my build 
>file.  I had
>a thread a couple of weeks ago entitled 'Ant 1.6.0 Long 
>filename support'
>that got put on a back burner recently, but has now come up again.

Did you want to bring in the value of your existing CLASSPATH environment variable from your
hosting operating system, or did you want to define one inside your build file independent
of your operating system CLASSPATH environment variable? It makes a difference.

Here's a snippet from my build file where I pull in the OS environment and then use it in
building my project classpath.

    <!-- Bring in the OS environment variables. -->
    <property environment="env" />

    <!-- Define some standard paths -->
    <path id="base.path">
        <pathelement path="${env.classpath}" />
        <pathelement location="${lib}/struts.jar" />
        etc
        etc
        <secret stuff removed>
        etc
    </path>

So, to use the OS classpath, just pull it in with the ol' <property> element and then
use it within a <path> element.

Hope this helps.

Simon

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message