Hi,
I've just polished up a little sandbox project I've built over in Ant
land, a task library to help a little in a .NET world. There isn't
any documentation yet, but I wanted to run what I currently have by
you for some feedback.
One of the tasks is a <nant> task. This can be used to invoke NAnt on
an existing build file like
<nant buildfile="src/nant.build">
<target name="echo"/>
<property name="foo" value="bar"/>
</nant>
buildfile, target and property are all optional. buildfile corresponds
to the -buildfile: switch, <property> (which can be repeated) to
-D:name=value and <target> (which can be repeated) lists targets.
There is an additional mode, and that can be used to nest the NAnt
build file into Ant's:
<nant>
<build>
<project basedir="." default="echo">
<target name="echo">
<echo message="foo is ${foo}"/>
</target>
</project>
</build>
</nant>
and the task is even smart enough to wrap a <project> around
non-project elements, i.e.
<ant:project xmlns:ant="antlib:org.apache.tools.ant"
xmlns="antlib:org.apache.tools.ant.taskdefs.optional.dotnet">
<nant>
<build>
<echo message="This is NAnt"/>
</build>
</nant>
</ant:project>
creates a temporary build file, nests the <echo> into an empty
<project> and runs NAnt on it. The result (Linux, NAnt from CVS some
weeks ago and Mono, BTW):
[EMAIL PROTECTED] dotnet]$ ant -f /tmp/nant.xml
Buildfile: /tmp/nant.xml
[nant] NAnt version 0.8.4 Copyright (C) 2001-2003 Gerry Shaw
[nant] http://nant.sourceforge.net
[nant] Buildfile: file://tmp/build956726090.xml
[nant] [echo] This is NAnt
[nant] BUILD SUCCEEDED
[nant] Total time: 0.1 seconds.
BUILD SUCCESSFUL
Total time: 2 seconds
(The namespace stuff is there for Ant, as I've implemented the tasks
in an "antlib" that's bound to a namespace - ignore it.)
Any feedback is appreciated, in particular: should I expose more NAnt
command line arguments (which)?
I can give build instructions, if anybody is interested.
Cheers
Stefan
PS: the URL echoed by NAnt looks wrong, it should have three slashes.
PPS: I've done the same for MSBuild, but can't test it.
--
http://stefanbodewig.blogger.de/
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers