libant1.6-java for Debian
=========================

- This package provides the Ant 1.6 core tasks in /usr/share/java/ant-1.6.jar.
  Ant's home directory (Java property ant.home) is /usr/share/ant1.6.

- Additional tasks that can be run with packages from the Debian main archive
  are also part of this package. This currently includes the tasks from the
  archives ant-nodeps.jar, ant-trax.jar and ant-junit.jar.

- Other tasks that require packages from the Debian contrib archive can be
  found in the ant package which is also in the contrib section the the Debian
  archive.

- You should only use /usr/share/ant1.6 for building Debian packages, use
  /usr/share/ant in all other cases! The teasks in /usr/share/ant1.6 are
  incomplete and may differ from upstream's version!

- This package includes a gjdoc task. It can be use instead of the javadoc
  task by just replacing <javadoc> with <gjdoc> in build.xml or by overriding
  the javadoc task like this:

   <taskdef name="javadoc" classname="org.apache.tools.ant.taskdefs.Gjdoc" />

  In order to user the gjdoc task you need to install the gjdoc package.

- If your package uses Ant 1.6 and you want it to be in the main section of the
  Debian archive you need to build depend on libant1.6-java and all other
  JARs from your class path. Then call Ant's main class directly in
  debian/rules, like this example does:

  --- beginning of example for debian/rules ---

# Java home directory and the JVM executable
JAVA_HOME := /some/working/jvm/from/main
JAVACMD   := ${JAVA_HOME}/bin/java

# Class path: Ant requires and JAXP-compatible XML parser
# You need to set CLASSPATH here (even if your build.xml assembles its own
# class path) to ensure the same build results in all cases
JARS      := /usr/share/java
ANT_HOME  := /usr/share/ant1.6
CLASSPATH := ${JARS}/xerces.jar:${ANT_HOME}/lib/ant.jar

# Ant options (jikes as compiler)
ANT_OPTS := =-Dbuild.compiler=jikes -Dant.home=${ANT_HOME}
ANT      := ${JAVACMD} -classpath ${CLASSPATH} \
            org.apache.tools.ant.Main ${ANT_OPTS}

[...]

build: build-stamp
build-stamp:
	dh_testdir
	${ANT} build
	touch build-stamp

  --- end of example for debian/rules ---

  You may also use the Ant class in CDBS, see the libservlet2.2-java package
  for an example.

