java.lang.Object
org.apache.lenya.cms.task.AbstractTask
org.apache.lenya.cms.task.AntTask
- All Implemented Interfaces:
- Task
- public class AntTask
- extends AbstractTask
An object of this class is used to execute Ant tasks.
The task parameters are:
publication-id: the publication ID
buildfile (optional): the location of the build file
relative to the publication directory. If this parameter is
not provided, the file is loaded from DEFAULT_BUILDFILE 55 .
target (optional): the build target. If this parameter
is not provided, the default target is executed.
ant.*: the command-line parameters for Ant (not implemented yet!)
properties.*: the project properties
| Fields inherited from class org.apache.lenya.cms.task.AbstractTask |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dateFormat
public static final java.text.DateFormat dateFormat
PUBLICATION_DIRECTORY
public static final java.lang.String PUBLICATION_DIRECTORY
- See Also:
- Constant Field Values
PUBLICATION_ID
public static final java.lang.String PUBLICATION_ID
- See Also:
- Constant Field Values
SERVLET_CONTEXT_PATH
public static final java.lang.String SERVLET_CONTEXT_PATH
- See Also:
- Constant Field Values
CONTEXT_PREFIX
public static final java.lang.String CONTEXT_PREFIX
- See Also:
- Constant Field Values
BUILDFILE
public static final java.lang.String BUILDFILE
- See Also:
- Constant Field Values
TARGET
public static final java.lang.String TARGET
- See Also:
- Constant Field Values
ANT_PREFIX
public static final java.lang.String ANT_PREFIX
- See Also:
- Constant Field Values
PROPERTIES_PREFIX
public static final java.lang.String PROPERTIES_PREFIX
- See Also:
- Constant Field Values
DEFAULT_BUILDFILE
public static final java.lang.String DEFAULT_BUILDFILE
- See Also:
- Constant Field Values
LOG_PATH
public static final java.lang.String LOG_PATH
PARAMETER_LOGFILE
public static final java.lang.String PARAMETER_LOGFILE
- See Also:
- Constant Field Values
AntTask
public AntTask()
executeAntTarget
public void executeAntTarget(java.lang.String servletContextPath,
java.lang.String contextPrefix,
java.lang.String publicationId,
java.io.File publicationDirectory,
java.io.File buildFile,
java.lang.String target,
java.util.Map arguments,
java.util.Map properties,
java.io.File logFile)
throws ExecutionException
- Executes an Ant target.
getDefaultLogFile
protected java.io.File getDefaultLogFile(java.io.File publicationDirectory)
- Returns the filename of the logfile to write.
execute
public void execute(java.lang.String servletContextPath)
throws ExecutionException
- Execute the task. All parameters must have been set with parameterize().