Installing JOMC Ant Tasks

The JOMC Ant Tasks are part of the JOMC binary distribution which can be downloaded from here.

To install the tasks, add a corresponding class path to your project and a type definition referencing that classpath. For example:

JDK 1.6+

  <path id="jomc-tools.classpath">
    <fileset dir="${jomc.home}" includes="lib/tools/*.jar"/>
    <fileset dir="${jomc.home}" includes="lib/ant/*.jar"/>
  </path>

  <typedef resource="org/jomc/ant/antlib.xml"
           uri="antlib:org.jomc.ant"
           classpathref="jomc-tools.classpath"/>

JDK 1.5

  <path id="jomc-tools.classpath">
    <fileset dir="${jomc.home}" includes="lib/jdk5/ext/*.jar"/>
    <fileset dir="${jomc.home}" includes="lib/tools/*.jar"/>
    <fileset dir="${jomc.home}" includes="lib/ant/*.jar"/>
  </path>

  <typedef resource="org/jomc/ant/antlib.xml"
           uri="antlib:org.jomc.ant"
           classpathref="jomc-tools.classpath"/>

Example

For your convenience, an example Ant project can be downloaded which will download the JOMC Ant Tasks to a lib/build directory. It first downloads the Maven Ant Tasks to a temporary directory and then uses these tasks to download the JOMC Ant Tasks together with all required dependencies.

  $ ant -projecthelp
  Buildfile: build.xml

  Main targets:

   clean    Removes JOMC Ant Tasks and any temporary files.
   install  Downloads and installs JOMC Ant Tasks.
  Default target: install