Skip to main content
blob: b8d3c586a02724365e5cf2e77fb2dad44027ff0e (plain) (tree)





<?xml version='1.0'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">


    <title>Ant Tasks provided by JET</title>

    <link charset="ISO-8859-1" href="../../book.css" rel="STYLESHEET"



    <h2>Ant Tasks Provided by JET</h2>

    <p>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.</p>

    <h3><a name="jet.compile"/>jet.compile</h3>

    <p>This task wraps the JET compiler 
    <a href="PLUGINS_ROOT/org.eclipse.jet.doc/references/javadoc/org/eclipse/jet/compiler/JET2Compiler.html">
    JET2Compiler</a>. Typical usage is:</p>

&lt;!-- Compile the JET templates in project my.jet.plugin --&gt;
&lt;jet.compile project="my.jet.plugin" destdir="jet2java"&gt;
    &lt;srcdir dir="." includes="**/*.jet"/&gt;

      <li><b>project</b> is the name of the Eclipse project containing 
      the compiled output.</li>

      <li><b>destDir</b> is the project relative directory where the 
      Java code for the templates will be written. Package directories 
      will be created under this directory.</li>

      <li><b>srcDir</b> is an Ant 
      <a href="">
      Fileset</a>, specifying template locations and file 
      match rules. The <b>dir</b> attribute is required, an must be relative to the JET project path.</li>


    <h3><a name="jet.transform"/>jet.transform</h3>

    <p>This task wraps the method 
    <a href="PLUGINS_ROOT/org.eclipse.jet.doc/references/javadoc/org/eclipse/jet/JET2Platform.html#runTransformOnResource(java.lang.String, org.eclipse.core.resources.IResource, org.eclipse.core.runtime.IProgressMonitor)">
    JET2Platform.runTransformationOnResource()</a>. Typical usage 

    <pre>&lt;jet.transform transformid=&quot;; resource=&quot;myProject/myfile.ext&quot;/&gt;</pre>

      <li><b>transformid</b> is the id of the transformation to run</li>

      <li><b>resource</b> is a workspace relative path to the transform 




Back to the top