Edit on GitHub

[Pro] Headless: Ant

Overview

Invoke headless code generation with Apache Ant.

Integration in Apache Ant

Apache Ant is another build tool specialized for building Java projects. It uses an xml as well like Maven does, but one that is a bit less talkative. The exact same project as the one in the Maven example can be built with Ant using the following xml:

<project> <target name="clean"> <delete dir="build"/> </target>  <target name="generate"> <exec executable="scc"/> </target>  <target name="compile" depends="generate"> <mkdir dir="build/classes"/> <javac srcdir="src/main/java" destdir="build/classes"/> </target>  <target name="jar" depends="compile"> <mkdir dir="build/jar"/> <jar destfile="build/jar/HelloWorld.jar" basedir="build/classes"> <manifest> <attribute name="Main-Class" value="hello.HelloWorld"/> </manifest> </jar> </target> <target name="run" depends="jar"> <java jar="build/jar/HelloWorld.jar" fork="true"/> </target>  </project>

The important bit is the part with “generate” and that the step “compile” depends on it.

Download examples

Drag to install

Drag to your running YAKINDU Statechart Tools (min. version 2.8.0) workspace.

Back to overview