"Apache Ant is a Java-based build tool. In theory, it is kind of like Make, but without Make's wrinkles."

To use Floggy with Ant you need to declare a taskdef like the snippet below.

      IMPORTANT: You must change the value of this property pointing it to the directory
      where you have installed Floggy.
      Some examples:
      Linux: /opt/floggy
      Windows: c:\floggy
  <property name="floggy.path" value="c:\floggy"/>
  <path id="floggy.classpath">
    <fileset dir="${floggy.path}\lib" includes="*.jar"/>
  <taskdef name="floggy-persistence-weaver" classname="net.sourceforge.floggy.persistence.WeaverTask" 

Also you need to create a target to execute Floggy.

  <target name="floggy">
        <floggy-persistence-weaver bootclasspathref="..." classpathref="..." input="..." output="..." generateSource="..." configurationFile="floggy.xml"/>

This target must run just after the compilation has done and before the preverification.

The attributes declared in the floggy-persistence-weaver tag has the following meaning.

  1. bootclasspathref (required): a reference to a path that contains the packages cldcapi and midpapi, any version. This packages could be find at the Sun Java Wireless Toolkit.
  2. classpathref (required): a reference to a path that contains a version of the package floggy-persistence-framework. This package could be find at here
  3. input (required): the directory or jar file that contains the classes that will be processed by the weaver.
  4. output (required): the directory or jar file when the weaved classes will be placed.
  5. generateSource (optional): a boolean indicating the weaver to generate or not the source of methods weaved in the bytecode.

A build sample.

We developed a build file to the demo application. You can customize this file to your way of development. The file is available here. The build file use tasks from the Antenna project to generate the JAD file and to preverify the classes.