ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: `ant -find build.xml` and compile/recompile
Date Mon, 12 Apr 2010 05:02:33 GMT
'.' in Ant is the dir where the build.xml is.
I tried "ant -find" from deep inside a project structure and "ant -f ..." from
outside and both resolve <project basedir="."/> to the same path.


Jan

> -----Urspr√ľngliche Nachricht-----
> Von: Daniel Becroft [mailto:djcbecroft@gmail.com] 
> Gesendet: Montag, 12. April 2010 00:07
> An: Ant Users List
> Betreff: Re: `ant -find build.xml` and compile/recompile
> 
> On Sun, Apr 11, 2010 at 1:53 PM, Tim Visher 
> <tim.visher@gmail.com> wrote:
> 
> > Hello Everyone,
> >
> > With `basedir="."`, how is `ant -find` supposed to work?  
> With it set
> > to `/absolute/path/to/build.xml`, how is the build script 
> supposed to
> > be box independent?
> >
> > We use ant to build our system and I would like to be able 
> to use `ant
> > -find` to allow myself (and Emacs) to build the system from any
> > subdirectory.  Currently, we build from the command line and always
> > need to be in the directory that houses build.xml.  The 
> reason is that
> > we have relative paths littered all over the build script 
> in order to
> > package things up and move them around.  I can't figure out 
> how to get
> > around this.  It also leads me to wonder why `-find` is 
> even available
> > if the only way it can be used is if all of your paths are absolute
> > (which is not on anyone's best practices list).
> >
> 
> We don't use 'ant -find' for our builds, but we do have 
> pseudo-relative
> paths throughout our build script. We achieved this by 
> putting the build.xml
> file at the root of the folder structure, and then using the 
> following:
> 
> <dirname property="base.dir" file="${ant.file}" />
> 
> This sets the base.dir property to the directory containing 
> the build.xml
> file (or whatever build file is used). All of our paths are 
> then specified
> as "${base.dir}/foo", and "${base.dir}/foo/bar". I'm not sure 
> if this would
> still work using the "ant -find" command. (I'm not at work 
> atm, but will
> check when I get in).
> 
> I'm cross posting this between Emacs and Ant.  In your reply please
> > attach to both as I couldn't find a relevant thread in 
> either list via
> > the archives.  Of course, that could have been my fault, in 
> which case
> > it'd be awesome to cross post with a link to the solution. :)
> >
> >
> Sorry, I believe it's base practice to cross-post between 
> mailing lists.
> Besides, this is an Apache Ant question, not an Emacs question.
> 
> Cheers,
> Daniel B.
> 

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


Mime
View raw message