com.bea.control.assembly
Class AssembleTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
com.bea.control.assembly.AssembleTask
public class AssembleTask
- extends org.apache.tools.ant.Task
Defines a custom ant task to perform control assembly.
The core assembly algorithm is documented and implemented in Assembler
.
Required attributes:
moduleDir: path to the root of J2EE module on which to perform assembly.
Optional attributes:
moduleName: name of J2EE module.
srcOutputDir: path to the dir where control assemblers may output source files.
It may be necessary to run additional build steps in order to process such files (for example,
if an assembler outputs Java source code, that code may need to be compiled).
Supported nested elements:
classpath: specifies the classpath that will be searched for control interfaces/implementations,
control clients and control assemblers.
fileset: specifies the control client manifests that should be processed by this assembly call.
assemblyContextType: You can have multiple occurrences of this element. This specifies a fully
qualified classname of a factory class that implements
ControlAssemblyContext.Factory
. Typically this
would depend on the type of module on which assembly is being run (EJB, webapp, etc). Different
contexts will expose different APIs to control assemblers (making different descriptors available,
etc).
An example usage of the AssembleTask in an ant build script (build.xml):
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_appRootDir
protected File _appRootDir
_moduleDir
protected File _moduleDir
_moduleName
protected String _moduleName
_srcOutputDir
protected File _srcOutputDir
_echoToConsole
protected boolean _echoToConsole
_clientManifestFileSet
protected org.apache.tools.ant.types.FileSet _clientManifestFileSet
_classPath
protected org.apache.tools.ant.types.Path _classPath
_assemblyContexts
protected List<AssemblyContext> _assemblyContexts
AssembleTask
public AssembleTask()
setAppRootDir
public void setAppRootDir(File appRootDir)
setModuleDir
public void setModuleDir(File moduleDir)
setModuleName
public void setModuleName(String moduleName)
setSrcOutputDir
public void setSrcOutputDir(File srcOutputDir)
setEchoToConsole
public void setEchoToConsole(boolean echoToConsole)
createFileset
public org.apache.tools.ant.types.FileSet createFileset()
setClasspath
public void setClasspath(org.apache.tools.ant.types.Path classpath)
createClasspath
public org.apache.tools.ant.types.Path createClasspath()
createAssemblyContext
public AssemblyContext createAssemblyContext()
execute
public void execute()
- Overrides:
execute
in class org.apache.tools.ant.Task
assemble
protected void assemble(List<File> clientManifestFiles,
List<String> contextFactories,
List<String> classPaths)
throws IOException,
ControlAssemblyException
- Throws:
IOException
ControlAssemblyException
validateAttributeSettings
protected void validateAttributeSettings()
throws org.apache.tools.ant.BuildException
- Throws:
org.apache.tools.ant.BuildException