| | 1 | = Apache Ant task for uka.transport code generation = |
| | 2 | |
| | 3 | [[TracNav]] |
| | 4 | 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: |
| | 5 | |
| | 6 | {{{ |
| | 7 | #!xml |
| | 8 | <property name="jp.home" value="PATH TO YOUR JAVAPARTY INSTALLATION" /> |
| | 9 | |
| | 10 | <target name="task.transport"> |
| | 11 | <path id="transport-cp"> |
| | 12 | <pathelement location="${jp.home}/lib/karmic.jar"/> |
| | 13 | </path> |
| | 14 | |
| | 15 | <taskdef name="transport" |
| | 16 | classpathref="transport-cp" |
| | 17 | classname="gjc.ant.RetroTransport" /> |
| | 18 | </target> |
| | 19 | }}} |
| | 20 | |
| | 21 | Once, you have defined the new task, you can use it in a similar like the rmic task from the ant default tasks: |
| | 22 | |
| | 23 | {{{ |
| | 24 | #!xml |
| | 25 | <transport |
| | 26 | base="${classes.plain}" |
| | 27 | destdir="${include}" |
| | 28 | classpathref="cp"/> |
| | 29 | }}} |
| | 30 | |
| | 31 | 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. |
| | 32 | |
| | 33 | |