This is a library of Ant tasks that support using .NET executables accross different platforms and in particular support using common .NET development tools like NAnt from within Ant.
The current version will only work for a CVS build of Ant created from CVS HEAD (i.e. after Ant 1.6's feature freeze) of 2003-11-27 or later. A version that can work with Ant 1.6 may be provided at a later stage. This task library is never going to work with Ant < 1.6.
If you are building this from sources, run the antlib target
and you'll get a file dotnet.jar. If you've
downloaded dotnet.jar, you are already ready.
There are several ways to use the tasks:
<taskdef
resource="org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml">
<classpath>
<pathelement location="YOUR-PATH-TO/dotnet.jar"/>
</classpath>
</taskdef>
With this you can use the tasks like plain Ant tasks, they'll
live in the default namespace. I.e. if you can run
<exec> without any namespace prefix, you can do so for
<dotnetexec> as well.
<taskdef
uri="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"
resource="org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml">
<classpath>
<pathelement location="YOUR-PATH-TO/dotnet.jar"/>
</classpath>
</taskdef>
This puts you task into a separate namespace than Ant's
namespace. You would use the tasks like
<project
xmlns:dn="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"
xmlns="antlib:org.apache.tools.ant">
...
<dn:nant>
<dn:target name="my-target"/>
</dn:nant>
or
<nant xmlns="antlib:org.apache.tools.ant.taskdefs.optional.dotnet">
<target name="my-target"/>
</nant>
or a variation thereof.
dotnet.jar
into a directory and use ant -lib
DIR-CONTAINING-THE-JAR or copy it into
ANT_HOME/lib - and then in your build file, simply
declare the namespace on the project tag:
<project
xmlns:dn="antlib:org.apache.tools.ant.taskdefs.optional.dotnet"
xmlns="antlib:org.apache.tools.ant">
And all tasks of this library will automatically be available
in the dn namespace without any
taskdef.
Copyright © 2003-2004 The Apache Software Foundation. All rights Reserved.