com.i3sp.ant
Class JspC

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.apache.tools.ant.taskdefs.MatchingTask
                    |
                    +--com.i3sp.ant.JspC

public class JspC
extends org.apache.tools.ant.taskdefs.MatchingTask

Ant task to run the jsp compiler.

This task takes the given jsp files and compiles them into java files. It is then up to the user to compile the java files into classes.

The task requires the srcdir and destdir attributes to be set. This Task is a MatchingTask, so the files to be compiled can be specified using includes/excludes attributes or nested include/exclude elements. Ooptional attributes are verbose (set the verbosity level passed to jasper) and package (name of the destination package for generated java classes.

Notes

At present, this task only supports the jasper compiler. In future, other compilers will be supported by setting the jsp.compiler property.

Usage

 <jspc srcdir="${basedir}/src/war"
       destdir="${basedir}/gensrc"
       package="com.i3sp.jsp"
       verbose="9">
   <include name="**\/*.jsp" />
 </jspc>
 

Version:
$Revision: 1.1 $ $Date: 2002/04/13 03:51:36 $
Author:
Matthew Watson

Constructor Summary
JspC()
           
 
Method Summary
 void execute()
           
 void setDestdir(java.io.File destDir)
          Set the destination directory into which the JSP source files should be compiled.
 void setPackage(java.lang.String pkg)
          Set the name of the package the compiled jsp files should be in
 void setSrcdir(org.apache.tools.ant.types.Path srcDir)
          Set the source dirs to find the source JSP files.
 void setVerbose(int i)
          Set the verbose level of the compiler
 
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, setDefaultexcludes, setExcludes, setExcludesfile, setIncludes, setIncludesfile, XsetIgnore, XsetItems
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JspC

public JspC()
Method Detail

setSrcdir

public void setSrcdir(org.apache.tools.ant.types.Path srcDir)
Set the source dirs to find the source JSP files.

setDestdir

public void setDestdir(java.io.File destDir)
Set the destination directory into which the JSP source files should be compiled.

setPackage

public void setPackage(java.lang.String pkg)
Set the name of the package the compiled jsp files should be in

setVerbose

public void setVerbose(int i)
Set the verbose level of the compiler

execute

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


Copyright © 2001 i3SP Pty. Ltd. All Rights Reserved.