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



























                                                                                                             





                                                                 










                                                                       

                                                                                                          























                                                                                                                                                                                                                              
<?xml version='1.0'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

  <head>

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

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

  </head>

  <body>

    <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>

    <pre>
&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;
&lt;/jet.compile&gt;
    </pre>
    <ul>

      <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="http://ant.apache.org/manual/CoreTypes/fileset.html">
      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>

    </ul>

    <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 
    is:</p>

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

      <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 
      input.</li>

    </ul>

  </body>

</html>

Back to the top