forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject Re: Calling forrest from ant with a specific project.build-dir
Date Thu, 23 Nov 2006 01:17:32 GMT
Cameron McCormack wrote:
> Hi again.
> 
> I???m calling forrest with an exec from my ant build.xml, but I???d like
> Forrest???s project.build-dir property to be set based on some properties
> in my build file.  To test it out first, I???ve been trying this from the
> command line:
> 
>   $ forrest -Dproject.build-dir=blah site
> 
> but with that, Forrest tells me:
> 
>   ...
>   X [0]  linkmap.html  BROKEN: /usr/local/apache-forrest-0.7/main/webapp/blah/tmp/build-info.xml
(No such file or directory)
> 
> as if it is resolving the relative path "blah" with a base of
> main/webapp from within Forrest???s installation directory.

Yes, as expected. You specifed a path relative to the context directory.

>  In my
> forrest.properties, I notice that the default value of project.build-dir
> is ${project.home}/build, so I guess ${project.home} is initialised to
> be the current directory when Forrest starts.  I can???t access that
> ${project.home} variable from the command line though.

You should be able to set the value of project.build-dir in
your forrest.properties to whatever path you want. Try a full
pathname. Or try a full pathname from your command-line test.

Be careful with using your own Ant build to call forrest's
Ant targets. There are some issues with clashing target names
and other troubles (see our issue tracker). Also it hasn't been
designed to be called like this, so perhaps you are missing some
initialisation that forrest would normally do.

Things are a bit improved in the development version of Forrest,
but needs more work.

-David

> Any suggestion on how I can make the build go under the current
> directory (apart from doing something like `pwd` in command line, since
> it needs to be cross platform)?
> 
> Thanks,
> 
> Cameron
>   
> -- 
> Cameron McCormack, http://mcc.id.au/
> 	xmpp:heycam@jabber.org  ???  ICQ 26955922  ???  MSN cam@mcc.id.au

Mime
View raw message