ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rees <d.ree...@usa.net>
Subject Re: sub-directory compilation
Date Thu, 08 Feb 2001 07:37:04 GMT
On Wed, 7 Feb 2001 09:36:21 +0100, Nico Seessle wrote:

>
>  ----- Original Message ----- 
>  From: John McCormick 
>  To: ant-user@jakarta.apache.org 
>  Sent: Monday, February 10, 1997 5:25 AM
>  Subject: sub-directory compilation
>
>
>  I would like to be able to compile code (using the javac task) starting from my current
directory path and including any subdirectories, with my build.xml being in a different directory.
>
>  Is there a way to get current directory? 
>
>The current directory should be available as ${user.dir} inside your buildfile. So you
will get a list of files in the current directory and all subdirectories using
>
>    <fileset dir="${user.dir}">
>      <include name="*"/>
>    </fileset>
>

To build on this, the project entity has a basedir attribute that you
can use to indicate where you want everything in the file to be
relative to. So you could define the project as:

<project name="MyProject" default="build" basedir="${user.dir}">

d

Mime
View raw message