Package net.sf.jasperreports.ant
Class JRAntDecompileTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.MatchingTask
net.sf.jasperreports.ant.JRBaseAntTask
net.sf.jasperreports.ant.JRAntDecompileTask
- All Implemented Interfaces:
Cloneable,org.apache.tools.ant.types.selectors.SelectorContainer
Ant task for batch-generating the source JRXML report design files, from compiled report template files.
Works like the built-in
javac Ant task.
This task can take the following arguments:
- src
- destdir
src and destdir are required.
When this task executes, it will recursively scan the src and
destdir looking for compiled report template files and it will recreate
the source JRXML file for each of them.
This task makes its file creation decision based on timestamp and only input files
that have no corresponding file in the target directory or where the destination JRXML file
is older than the input file will be processed.- Author:
- Teodor Danciu (teodord@users.sourceforge.net)
-
Field Summary
Fields inherited from class net.sf.jasperreports.ant.JRBaseAntTask
jasperReportsContextFields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
filesetFields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidChecks that all required attributes have been set and that the supplied values are valid.org.apache.tools.ant.types.PathAdds a path to the classpath.org.apache.tools.ant.types.PathAdds a path for decompilation source.protected voidPerforms the decompilation of the selected report design files.voidexecute()Executes the task.protected voidScans the directory looking for source files to be decompiled.protected voidscanSrc()Scans the source directories looking for source files to be decompiled.voidsetDestdir(File destdir) Sets the destination directory into which the report design files should be decompilated.voidsetSrcdir(org.apache.tools.ant.types.Path srcdir) Sets the source directories to find the compiled report design files.Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItemsMethods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation
-
Constructor Details
-
JRAntDecompileTask
public JRAntDecompileTask()
-
-
Method Details
-
setSrcdir
public void setSrcdir(org.apache.tools.ant.types.Path srcdir) Sets the source directories to find the compiled report design files.- Parameters:
srcdir- source path
-
createSrc
public org.apache.tools.ant.types.Path createSrc()Adds a path for decompilation source.- Returns:
- source path
-
setDestdir
Sets the destination directory into which the report design files should be decompilated.- Parameters:
destdir- destination directory
-
createClasspath
public org.apache.tools.ant.types.Path createClasspath()Adds a path to the classpath.- Returns:
- classpath to use when decompiling the report
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionExecutes the task.- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException
-
checkParameters
protected void checkParameters() throws org.apache.tools.ant.BuildExceptionChecks that all required attributes have been set and that the supplied values are valid.- Throws:
org.apache.tools.ant.BuildException
-
scanSrc
protected void scanSrc() throws org.apache.tools.ant.BuildExceptionScans the source directories looking for source files to be decompiled.- Throws:
org.apache.tools.ant.BuildException
-
scanDir
Scans the directory looking for source files to be decompiled. The results are returned in the instance variablereportFilesMap.- Parameters:
srcdir- source directorydestdir- destination directoryfiles- included file names
-
decompile
protected void decompile() throws org.apache.tools.ant.BuildExceptionPerforms the decompilation of the selected report design files.- Throws:
org.apache.tools.ant.BuildException
-