Morpheous wrote:
1). one main build file (say /src/main.build).
2). A single build file for each project ( say /src/project1/project1.build)
The main build file will traverse each of the folders under the /src/*
directority, and execute any *.build it encounters in the directory. (i.e
the individual build projects)
My questions are:
1). How can I create a main.build which will traverse a directory from a
specified base, and execute each of the .build files it encounters?
2). How can I specify in a project - a depency on another project?
The two goals are in conflict to an extent. The first says you want to
run a set of build files with no information other than their paths,
while the latter says you will have additional dependency information.
A limitation of NAnt that constrains your options is that the <nant>
task doesn't apply propagate dependencies across build files, so you
can't use it to distribute the dependency information. If there were no
dependencies, then you could just use the <nant> task with a
<buildfiles> fileset, specifying a pattern such as "*/*.build".
The NAnt <include> task does allow you to distribute the dependency
information. This is a bit more work, because the <include> task
doesn't take filesets. Moreover, this forces you into a rigorous naming
convention, because you're not allowed to have two targets with the same
name in a single build file. Still, this would work without added
complexity.
Another tactic might be to factor out the dependencies into a separate
include file. Each include file would have one target, build-projectN,
with dependencies on the corresponding targets of the projects that must
be built first. The body of the target would invoke the <nant> task on
the build file for that target. Then, at the top level, use a <foreach>
loop to iterate over those files and include them. This requires that
the include file exist for all projects, even those with no
dependencies, but that seems acceptable.
Gary
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users