|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.toolforge.karma.core.cmd.DefaultCommand
nl.toolforge.karma.core.cmd.impl.AbstractBuildCommand
Superclass for all commands dealing with building modules. This class provides all basic property mappers and methods
that are required to use the build-module.xml
properly.
Field Summary | |
protected Module |
module
|
Constructor Summary | |
AbstractBuildCommand(CommandDescriptor descriptor)
Creates a command by initializing the command through its CommandDescriptor . |
Method Summary | |
void |
cleanUp()
Called by CommandContext after executing a command. |
void |
execute()
Executes the command. |
void |
executeDelete(java.io.File dir)
|
void |
executeDelete(java.io.File dir,
java.lang.String includes)
Performs a <delete>-task on this commands' Ant project. |
void |
executeMkdir(java.io.File dir)
Performs an <mkdir>-task on this commands' Ant project. |
protected org.apache.tools.ant.Project |
getAntProject(java.lang.String buildFile)
Gets an Ant project initializing the project with buildFile which should be located on the
classpath in the ant subdirectory. |
protected BuildEnvironment |
getBuildEnvironment()
Retrieve the build environment, which is initialized with the current manifest and module. |
protected java.io.File |
getCompileDirectory()
Returns the compile directory for a module, relative to the manifests' build directory. |
protected Manifest |
getCurrentManifest()
Helper method to retrieve the current manifest. |
protected Module |
getCurrentModule()
Helper method to get to the current module. |
protected org.apache.tools.ant.Project |
getProjectInstance()
Gets an Ant Project for a module. |
Methods inherited from class nl.toolforge.karma.core.cmd.DefaultCommand |
deregisterCommandResponseListener, getAlias, getCommandLine, getContext, getDescription, getFrontendMessages, getHelp, getName, getResponseListener, getWorkingContext, registerCommandResponseListener, setCommandLine, setContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface nl.toolforge.karma.core.cmd.Command |
getCommandResponse |
Field Detail |
protected Module module
Constructor Detail |
public AbstractBuildCommand(CommandDescriptor descriptor)
CommandDescriptor
.
descriptor
- The command descriptor instance containing the basic information for this commandMethod Detail |
public void execute() throws CommandException
Command
CommandException
- When execution failed. This exception catches all underlying exceptions and rethrows them
as a CommandException, except for RuntimeException
s.protected final Manifest getCurrentManifest()
protected Module getCurrentModule()
protected BuildEnvironment getBuildEnvironment()
protected final java.io.File getCompileDirectory() throws ModuleTypeException
build
directory.
ModuleTypeException
protected org.apache.tools.ant.Project getAntProject(java.lang.String buildFile) throws CommandException
buildFile
which should be located on the
classpath in the ant
subdirectory.
buildFile
- The build file that should be loaded.
buildFile
.
CommandException
protected org.apache.tools.ant.Project getProjectInstance() throws CommandException
Project
for a module.
CommandException
public void executeMkdir(java.io.File dir) throws CommandException
CommandException
public void executeDelete(java.io.File dir, java.lang.String includes) throws CommandException
CommandException
public void executeDelete(java.io.File dir) throws CommandException
CommandException
public final void cleanUp()
CommandContext
after executing a command.
cleanUp
in interface Command
cleanUp
in class DefaultCommand
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |