Class AntEnhanceTask

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
io.ebean.enhance.ant.AntEnhanceTask
All Implemented Interfaces:
Cloneable

public class AntEnhanceTask
extends org.apache.tools.ant.Task
An ANT task that can enhance entity beans etc for use by Ebean.

You can use this ANT task as part of your build process to enhance entity beans etc.

The parameters are:

  • classSource This is the root directory where the .class files are found.
  • packages A comma delimited list of packages that is searched for classes that need to be enhanced. If the package ends with ** or * then all subpackages are also searched.
  • transformArgs Arguments passed to the transformer. Typically a debug level in the form of debug=1 etc.


         <taskdef name="ebeanEnhance" classname="AntEnhanceTask" classpath="bin" />

   <target name="enhance" depends="compile">
       <ebeanEnhance
            classSource="${bin.dir}"
            packages="com.avaje.ebean.meta.**, com.acme.myapp.entity.**"
            transformArgs="debug=1" />
   </target>

 
  • Constructor Summary

    Constructors
    Constructor Description
    AntEnhanceTask()  
  • Method Summary

    Modifier and Type Method Description
    void execute()  
    String getClasspath()
    the classpath used to search for e.g.
    void setClasspath​(String classpath)
    the classpath used to search for e.g.
    void setClassSource​(String source)
    Set the directory holding the class files we want to transform.
    void setPackages​(String packages)
    Set the package name to search for classes to transform.
    void setTransformArgs​(String transformArgs)
    Set the arguments passed to the transformer.

    Methods inherited from class org.apache.tools.ant.Task

    bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, init, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType

    Methods inherited from class org.apache.tools.ant.ProjectComponent

    clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • execute

      public void execute() throws org.apache.tools.ant.BuildException
      Overrides:
      execute in class org.apache.tools.ant.Task
      Throws:
      org.apache.tools.ant.BuildException
    • getClasspath

      public String getClasspath()
      the classpath used to search for e.g. inerited classes
    • setClasspath

      public void setClasspath​(String classpath)
      the classpath used to search for e.g. inerited classes
    • setClassSource

      public void setClassSource​(String source)
      Set the directory holding the class files we want to transform.
    • setTransformArgs

      public void setTransformArgs​(String transformArgs)
      Set the arguments passed to the transformer.
    • setPackages

      public void setPackages​(String packages)
      Set the package name to search for classes to transform.

      If the package name ends in "/**" then this recursively transforms all sub packages as well.