Ant Tasks Provided by JET
JET provides several ant tasks to faciliate the compilation of
JET templates and execution of JET transformations in an Eclipse
headless environment. These can be used with buildfiles that are
set to build within the same JRE as the workspace.
This task wraps the JET compiler
JET2Compiler. Typical usage is:
<!-- Compile the JET templates in project my.jet.plugin -->
<jet.compile project="my.jet.plugin" destdir="jet2java">
<srcdir dir="." includes="**/*.jet"/>
</jet.compile>
-
project is the name of the Eclipse project containing
the compiled output.
-
destDir is the project relative directory where the
Java code for the templates will be written. Package directories
will be created under this directory.
-
srcDir is an Ant
Fileset, specifying template locations and file
match rules. The dir attribute is required, an must be relative to the JET project path.
This task wraps the method
JET2Platform.runTransformationOnResource(). Typical usage
is:
<jet.transform transformid="my.transform.id" resource="myProject/myfile.ext"/>
-
transformid is the id of the transformation to run
-
resource is a workspace relative path to the transform
input.