Hello Marc,
--- [EMAIL PROTECTED] wrote:
> Hi,
>
> I've setup my project with cruisecontrol, so that my
> build.xml gets called
> from a parent directory.
How is your build.xml called exactly?
>
> The problem is that my unit tests that have relative
> paths in them all
> fail now because the current working directory is
> not the project root
> anymore.
If you use <ant> task, note that it has two important
attribuites:
[quote from Ant manual of <ant> task]
antfile - the buildfile to use. Defaults to
"build.xml". This file is expected to be a filename
relative to the dir attribute given.
dir - the directory to use as a *basedir* for the new
Ant project. Defaults to the current *project's
basedir*, unless inheritall has been set to false, in
which case it doesn't have a default value. This will
override the basedir setting of the called project.
[end of qoute]
So if you want to reset the basedir of the subbuild
(the one called with <ant>) you do the following:
<ant dir="the_dir_of_subbuild" file="sub_build_file">
The directory against which the files used in
sub_build_file will be the_dir_of_subbuild. In short
you need to specify it in "dir" attribute of <ant>
task.
Hope this helps.
Regards
Ivan
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]