Overview

Foregej is lauched from ANT by the generic tool task or a subclass of this tool. Foregej aims to isolate itself as much as possible from the tools or workspaces that launch it and will provide a simple configuration API. At the moment there is only one task that that extends the generic tool and that is the CopyrightTask .

Example

Here is a sample of the ToolTask used to trigger tools that do not need any settings.

      
    <taskdef name="tool-task"
      classpathref="build.classpath" 
      classname="com.octagroup.foregej.ant.ToolTask"/>
    <tool-task tools="Attr">
      <src dir="${java.dir}">
        <include name="examples/**/*.java"/>
      </src>
    </tool-task>
    
    
All the java files passed on to the ToolTask will be crunched by the specified tools. When the task exits all the files are flushed to disk, overwriting the old one if it has changed. In the example above all the files under the example directory will be processed by the com.octagroup.foregej.java.tools.attr.AttrTool tool.