wiki:uka.transport/Ant

Apache Ant task for uka.transport code generation

There is an Apache Ant task for invoking the uka.transport code generator easily from your build.xml. This task is included in the karmic.jar file. With the following XML snippet, you can define a new task called <transport .../> in your build.xml file:

  <property name="jp.home" value="PATH TO YOUR JAVAPARTY INSTALLATION" />

  <target name="task.transport">
    <path id="transport-cp">
      <pathelement location="${jp.home}/lib/karmic.jar"/>
    </path>

    <taskdef name="transport" 
      classpathref="transport-cp"
      classname="gjc.ant.RetroTransport" />
  </target>

Once, you have defined the new task, you can use it in a similar like the rmic task from the ant default tasks:

<transport
   base="${classes.plain}"
   destdir="${include}"
   classpathref="cp"/>

The base parameter points to the directory, where your class files reside that have been compiled from your non-transportable classes. The destdir points to a directory, where the generated Java fragments should be saved.

Last modified 12 years ago Last modified on Aug 22, 2005 9:26:02 AM