org.apache.tools.ant.taskdefs.optional.ejb
public class EjbJar extends MatchingTask
Extends the MatchingTask class provided in the default ant distribution to provide a directory scanning EJB jarfile generator.
The task works by taking the deployment descriptors one at a time and parsing them to locate the names of the classes which should be placed in the jar. The classnames are translated to java.io.Files by replacing periods with File.separatorChar and resolving the generated filename as a relative path under the srcDir attribute. All necessary files are then assembled into a jarfile. One jarfile is constructed for each deployment descriptor found.
Nested Class Summary | |
---|---|
static class | EjbJar.CMPVersion
CMP versions supported
valid CMP versions are 1.0 and 2.0 |
static class | EjbJar.DTDLocation
Inner class used to record information about the location of a local DTD |
static class | EjbJar.NamingScheme
An EnumeratedAttribute class for handling different EJB jar naming
schemes |
Method Summary | |
---|---|
protected void | addDeploymentTool(EJBDeploymentTool deploymentTool)
Add a deployment tool to the list of deployment tools that will be
processed
|
BorlandDeploymentTool | createBorland()
Adds a deployment tool for Borland server.
|
Path | createClasspath()
Adds to the classpath used to locate the super classes and
interfaces of the classes that will make up the EJB JAR.
|
EjbJar.DTDLocation | createDTD()
Create a DTD location record. |
IPlanetDeploymentTool | createIplanet()
Adds a deployment tool for iPlanet Application Server.
|
JbossDeploymentTool | createJboss()
Adds a deployment tool for JBoss server.
|
JonasDeploymentTool | createJonas()
Adds a deployment tool for JOnAS server.
|
FileSet | createSupport()
Adds a fileset for support elements.
|
WeblogicDeploymentTool | createWeblogic()
Adds a deployment tool for Weblogic server.
|
WeblogicTOPLinkDeploymentTool | createWeblogictoplink()
Adds a deployment tool for Weblogic when using the Toplink
Object-Relational mapping.
|
WebsphereDeploymentTool | createWebsphere()
Adds a deployment tool for Websphere 4.0 server.
|
void | execute()
Invoked by Ant after the task is prepared, when it is ready to execute
this task.
|
String | getCmpversion()
Gets the CMP version.
|
File | getDestdir()
Gets the destination directory.
|
void | setBasejarname(String inValue)
Set the base name of the EJB JAR that is to be created if it is not
to be determined from the name of the deployment descriptor files.
|
void | setBasenameterminator(String inValue)
The string which terminates the bean name.
|
void | setClasspath(Path classpath)
Set the classpath to use when resolving classes for inclusion in the jar.
|
void | setCmpversion(EjbJar.CMPVersion version)
Sets the CMP version.
|
void | setDependency(String analyzer)
Set the analyzer to use when adding in dependencies to the JAR.
|
void | setDescriptordir(File inDir)
Set the descriptor directory. |
void | setDestdir(File inDir)
Set the destination directory. |
void | setFlatdestdir(boolean inValue)
Controls whether the
destination JARs are written out in the destination directory with
the same hierarchical structure from which the deployment descriptors
have been read. |
void | setGenericjarsuffix(String inString)
Set the suffix for the generated jar file. |
void | setManifest(File manifest)
Set the Manifest file to use when jarring. |
void | setNaming(EjbJar.NamingScheme namingScheme)
Set the naming scheme used to determine the name of the generated jars
from the deployment descriptor
|
void | setSrcdir(File inDir)
Sets the source directory, which is the directory that
contains the classes that will be added to the EJB jar. |
Parameters: deploymentTool a deployment tool instance to which descriptors will be passed for processing.
Returns: the deployment tool instance to be configured.
Returns: the path to be configured.
Returns: the DTD location object to be configured by Ant
Returns: the deployment tool instance to be configured.
Returns: the deployment tool instance to be configured.
Returns: the deployment tool instance to be configured.
Returns: a fileset which can be populated with support files.
Returns: the deployment tool instance to be configured.
Returns: the deployment tool instance to be configured.
Returns: the deployment tool instance to be configured.
Throws: BuildException thrown whenever a problem is encountered that cannot be recovered from, to signal to ant that a major problem occurred within this task.
Returns: CMP version
Since: ant 1.6
Returns: destination directory
Since: ant 1.6
Parameters: inValue the basename that will be used when writing the jar file containing the EJB
Parameters: inValue a string which marks the end of the basename.
Parameters: classpath the classpath to use.
Parameters: version CMP version.
Must be either 1.0
or 2.0
.
Default is 1.0
.
Initially, only the JBoss implementation does something specific for CMP 2.0.
Since: ant 1.6
Parameters: analyzer the name of the dependency analyzer or a class.
Parameters: inDir the directory containing the deployment descriptors.
Parameters: inDir the destination directory in which to generate jars
Parameters: inValue the new value of the flatdestdir flag.
Parameters: inString the string to use as the suffix.
Parameters: manifest the manifest to be used in the EJB jar
Parameters: namingScheme the naming scheme to be used
Parameters: inDir the source directory.