|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.Task | +--org.apache.tools.ant.taskdefs.MatchingTask | +--org.apache.tools.ant.taskdefs.optional.jsp.JspC
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. Optional attributes are verbose (set the verbosity level passed to jasper), package (name of the destination package for generated java classes and classpath (the classpath to use when running the jsp compiler).
This task supports the nested elements classpath (A Path) and classpathref (A Reference) which can be used in preference to the attribute classpath, if the jsp compiler is not already in the ant classpath.
At present, this task only supports the jasper compiler. In future, other compilers will be supported by setting the jsp.compiler property.
<jspc srcdir="${basedir}/src/war" destdir="${basedir}/gensrc" package="com.i3sp.jsp" verbose="9"> <include name="**\/*.jsp" /> </jspc>
Large Amount of cutting and pasting from the Javac task..., James Davidson duncan@x180.com, Robin Green greenrd@hotmail.com, Stefan Bodewig, J D Glanville
Constructor Summary | |
JspC()
|
Method Summary | |
org.apache.tools.ant.types.Path |
createClasspath()
Maybe creates a nested classpath element. |
void |
execute()
|
org.apache.tools.ant.types.Path |
getClasspath()
|
java.util.Vector |
getCompileList()
|
java.io.File |
getDestdir()
|
boolean |
getFailonerror()
Gets the failonerror flag. |
java.lang.String |
getIeplugin()
|
java.lang.String |
getPackage()
|
org.apache.tools.ant.types.Path |
getSrcDir()
|
java.io.File |
getUribase()
|
java.io.File |
getUriroot()
|
int |
getVerbose()
|
boolean |
isMapped()
|
void |
setClasspath(org.apache.tools.ant.types.Path cp)
Set the classpath to be used for this compilation |
void |
setClasspathRef(org.apache.tools.ant.types.Reference r)
Adds a reference to a CLASSPATH defined elsewhere |
void |
setDestdir(java.io.File destDir)
Set the destination directory into which the JSP source files should be compiled. |
void |
setFailonerror(boolean fail)
Throw a BuildException if compilation fails |
void |
setIeplugin(java.lang.String iepluginid_)
Set the ieplugin id |
void |
setMapped(boolean mapped_)
set the mapped flag |
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 |
setUribase(java.io.File uribase)
-uribase. |
void |
setUriroot(java.io.File uriroot)
-uriroot The root directory that uri files should be resolved against, (Default is the directory jspc is invoked from) |
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 |
public JspC()
Method Detail |
public void setSrcdir(org.apache.tools.ant.types.Path srcDir)
public org.apache.tools.ant.types.Path getSrcDir()
public void setDestdir(java.io.File destDir)
public java.io.File getDestdir()
public void setPackage(java.lang.String pkg)
public java.lang.String getPackage()
public void setVerbose(int i)
public int getVerbose()
public void setFailonerror(boolean fail)
public boolean getFailonerror()
public java.lang.String getIeplugin()
public void setIeplugin(java.lang.String iepluginid_)
public boolean isMapped()
public void setMapped(boolean mapped_)
public void setUribase(java.io.File uribase)
uribase
- The new Uribase valuepublic java.io.File getUribase()
public void setUriroot(java.io.File uriroot)
uriroot
- The new Uribase valuepublic java.io.File getUriroot()
public void setClasspath(org.apache.tools.ant.types.Path cp)
public org.apache.tools.ant.types.Path createClasspath()
public void setClasspathRef(org.apache.tools.ant.types.Reference r)
public org.apache.tools.ant.types.Path getClasspath()
public java.util.Vector getCompileList()
public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |