468,294 Members | 1,942 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,294 developers. It's quick & easy.

Nested buildfiles with Nant.

Hi all,

I'm having a problem with <nant> tasks to build sub-projects into an
overall solution. I have the following directory structure:

JobManagerSolution
|_
| JobManager
|_
JobManagerController

where the overall build file is in JobManagerSolution and the
sub-project build files are in JobManager and JobManagerControl. This
is the JobmanagerSolution build file:

<?xml version="1.0"?>
<project name="JobManager" default="build" basedir=".">
<target name="build" description="Clean and build entire solution.">
<nant buildfile="JobManager/JobManager.build" target="clean"
failonerror="false" />
<nant buildfile="JobManager/JobManager.build" />
<nant buildfile="JobManagerControl/JobManagerControl.build"
target="clean" failonerror="false" />
<nant buildfile="JobManagerControl/JobManagerControl.build" />
</target>
</project>

The problem I'm having is that the basedir of the parent build is
being inherited by JobManager and JobManagerControl, and so the paths
are all wrong. I know ant has a dir attribute which can be used to
determine which basedir the child build will have, but there seems to
be no equivalent in Nant. Also I've tried explicitly setting
inheritall="false", but the parent project directory is still used by
the children.

Anyone else come across this?
Nov 13 '05 #1
1 2312
ni****@nopworld.com (Nigel Currie) wrote in message news:<54**************************@posting.google. com>...
The problem I'm having is that the basedir of the parent build is
being inherited by JobManager and JobManagerControl, and so the paths
are all wrong. I know ant has a dir attribute which can be used to
determine which basedir the child build will have, but there seems to
be no equivalent in Nant. Also I've tried explicitly setting
inheritall="false", but the parent project directory is still used by
the children.


Have you tried using ${nant.project.basedir} ?

It appears to be relative to the project build file and will be
correct in your child builds.

HTH,

Jonathan Cogley
Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by hoochiegooch | last post: by
2 posts views Thread by george r smith | last post: by
2 posts views Thread by HaukiDog | last post: by
reply views Thread by muesliflakes | last post: by
2 posts views Thread by Ireneus Broncel | last post: by
2 posts views Thread by Brett Romero | last post: by
12 posts views Thread by michael sorens | last post: by
reply views Thread by james.mcdonagh | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.