473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 2496
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: hoochiegooch | last post by:
Hi, all. I have a couple of questions about NAnt. 1. Is there a better way to invoke NAnt from a C# "Master Test Rig" than shelling out? IOW, how should an ASP.NET web app or Windows Service...
2
by: george r smith | last post by:
I am curious, anyone using NAnt and what are their opinions. thanks grs
2
by: HaukiDog | last post by:
Hi, I am trying to set up my C# web project to be compiled by NANT. Everything compiles and works fine within the IDE. I have a created a NANT build file which has a simple project tag, like...
0
by: muesliflakes | last post by:
I have figured out how to get this running by using Ant.Console as a starting point for calling NAnt. I had to include NAnt.Core, NAnt.DotNet & NDoc.Core in my project and it worked correctly. ...
2
by: Ireneus Broncel | last post by:
Maybe I am wrong here, but I have a problem with nant that I don't unterstand, I'm trying to compile an example ConsoleApp Project with net-1.1, and get the errror: log4net:ERROR LogLog:...
2
by: Brett Romero | last post by:
I am compiling a winform app using nant. I first compile via VS.NET, which generates *.resource files in obj\debug. Then I use the <resources> tag in the Nant script to complete a build via Nant....
12
by: michael sorens | last post by:
So I have compiled a .dll file from a Visual Studio 2005 project containing a few dozen c# files. Now I want to automate this build using ant (have not yet looked at nant, but the rest of my...
0
by: james.mcdonagh | last post by:
Hi I am a newbie using nAnt for .net 2.0. As such I have not come across this bug before, and I would be happy of any help that you may be able to provide. In order to help I have included the...
1
by: jamesmcdonagh | last post by:
Hi newbie using nAnt for .net 2.0. I would be happy of any help that you may be able to provide. The weird thing is that VS.net builds without a problem. And the intellisense within the object...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.