TCLethbridge edited this page Sep 20, 2015 · 2 revisions
Clone this wiki locally


Umple provides Ant tasks for integrating Umple into your build chain.


<umplec> uses an API extremely similar to the command-line interface of the Umple compiler.

To use <umplec> in a project, define a task:

<taskdef name="umplec" classname="cruise.umple.util.UmplecAntTask" classpath="/path/to/umple.jar" />

This lets you use the <umplec> task as defined below.

Simple compile

<umplec src="myumple.ump" />

Compile to directory outside current working directory

<property name="src.gen.umple" value="${src}/gen-umple" />
<umplec src="myumple.ump" dest="${src.gen.umple}" />

Compile with single linked file

<umplec src="myumple.ump" linkedFile="linked.ump" />

Compile with multiple linked file

<umplec src="myumple.ump">
<linkedFile src="linked1.ump" />
<linkedFile src="linked2.ump" />

Compile to C++

<umplec src="myumple.ump" generate="Cpp" />

Compile to C++ when the umple file specifies another language

<umplec src="myumple.ump" generate="Cpp" override="on"/>

Source code for the ant task is in cruise.umple/src/util/Ant.ump