Foster, Richard - PAL wrote:
Hi there,
Sorry in advance if this question is somewhat esoteric!
We have a project made up of several components. Until now, we have
created build files for each of the components, then called those
build files (using the NANT task) from a central application build file.
We also have a custom task (and may need/desire more custom tasks in
the future to access in-house utilities while allowing our build files
to remain OS and framework independent).
Ideally, we want to load the custom task library using "loadtasks",
since that way we should be able to guarantee that the latest version
of that task library is used. Unfortunately, the information about
loaded tasks is not passed across the NANT task boundary.
As I see it, there are two ways we could resolve this problem:
1) Update all the component build files to include loading the custom
task library (probably by using a shared file which each of those
component builds includes since that would also allow us to set any
default properties which may be needed).
2) Use the "include" mechanism to include each of the component build
files in the application build file, then "call" the tasks within the
build file instead of using the NANT task. This has the disadvantage
that all the tasks would have to have different names to avoid
conflict, and this may limit our ability to easily build a single
component.
In my opinion, option 1 is probably better since it would still allow
easy building of the individual components… but is there a better way
that I have missed?
I would go with option 1) with a common.properties.include file. It also
scales better as option 2) means that every build file in the system is
loaded when you load the main build file - potentially using a lot of
memory and giving rise to the name collision issues you mention.
Ian
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users