This library provides support for building/installing/maintaining Debian packages.
The source code for this library lives in the sandbox of Ant's SVN - http://svn.apache.org/viewvc/ant/sandbox/antlibs/debian/trunk/.
If you are building this from sources, run the antlib target
and you'll get a file ant-debian-[version].jar
.
There are several ways to use the tasks:
<taskdef resource="org/apache/ant/antunit/antlib.xml"> <classpath> <pathelement location="YOUR-PATH-TO/ant-debian=[version].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 <debian> as well.
<taskdef uri="antlib:org.apache.ant.debian" resource="org/apache/ant/debian/antlib.xml"> <classpath> <pathelement location="YOUR-PATH-TO/ant-debian-[version].jar"/> </classpath> </taskdef>This puts the tasks into a separate namespace, different from Ant's namespace. You would use the tasks like
<project xmlns:deb="antlib:org.apache.ant.debian" xmlns="antlib:org.apache.tools.ant"> ... <deb:dpkg packageName="${package}" dir="${src.dir}"/>or a variation thereof.
ant-debian-[version].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:deb="antlib:org.apache.ant.debian" xmlns="antlib:org.apache.tools.ant">And all tasks of this library will automatically be available in the
deb
namespace without any
taskdef
.