org.ow2.jonas.ant
Class EjbJarDeprecated

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.ow2.jonas.ant.AbstractAntDeprecated
              extended by org.ow2.jonas.ant.EjbJarDeprecated
All Implemented Interfaces:
java.lang.Cloneable

public class EjbJarDeprecated
extends AbstractAntDeprecated

Class only used for compatibility with previous version of JOnAS

Author:
Jeremy Cazaux

Field Summary
 
Fields inherited from class org.ow2.jonas.ant.AbstractAntDeprecated
logger
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
EjbJarDeprecated()
           
 
Method Summary
 java.lang.Object createClasspath()
          Adds to the classpath used to locate the super classes and interfaces of the classes that will make up the EJB JAR.
protected  java.lang.Object createDeploymentTool(org.apache.tools.ant.taskdefs.optional.ejb.EJBDeploymentTool deploymentTool)
          Add a deployment tool to the list of deployment tools that will be processed
 java.lang.Object createDTD()
          Create a DTD location record.
 java.lang.Object createJonas()
          Adds a deployment tool for JOnAS server.
 java.lang.Object createSupport()
          Adds a fileset for support elements.
 void setBasejarname(java.lang.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(java.lang.String inValue)
          The string which terminates the bean name.
 void setClasspath(org.apache.tools.ant.types.Path classpath)
          Set the classpath to use when resolving classes for inclusion in the jar.
 void setCmpversion(org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.CMPVersion version)
          Sets the CMP version.
 void setDependency(java.lang.String analyzer)
          Set the analyzer to use when adding in dependencies to the JAR.
 void setDescriptordir(java.io.File inDir)
          Set the descriptor directory.
 void setDestdir(java.io.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(java.lang.String inString)
          Set the suffix for the generated jar file.
 void setManifest(java.io.File manifest)
          Set the Manifest file to use when jarring.
 void setNaming(org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.NamingScheme namingScheme)
          Set the naming scheme used to determine the name of the generated jars from the deployment descriptor
 void setSrcdir(java.io.File inDir)
          Sets the source directory, which is the directory that contains the classes that will be added to the EJB jar.
 
Methods inherited from class org.ow2.jonas.ant.AbstractAntDeprecated
deprecated
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, execute, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EjbJarDeprecated

public EjbJarDeprecated()
Method Detail

setManifest

public void setManifest(java.io.File manifest)
                 throws java.lang.Exception
Set the Manifest file to use when jarring. As of EJB 1.1, manifest files are no longer used to configure the EJB. However, they still have a vital importance if the EJB is intended to be packaged in an EAR file. By adding "Class-Path" settings to a Manifest file, the EJB can look for classes inside the EAR file itself, allowing for easier deployment. This is outlined in the J2EE specification, and all J2EE components are meant to support it.

Parameters:
manifest - the manifest to be used in the EJB jar
Throws:
java.lang.Exception

setSrcdir

public void setSrcdir(java.io.File inDir)
               throws java.lang.Exception
Sets the source directory, which is the directory that contains the classes that will be added to the EJB jar. Typically this will include the home and remote interfaces and the bean class.

Parameters:
inDir - the source directory.
Throws:
java.lang.Exception

setDescriptordir

public void setDescriptordir(java.io.File inDir)
                      throws java.lang.Exception
Set the descriptor directory. The descriptor directory contains the EJB deployment descriptors. These are XML files that declare the properties of a bean in a particular deployment scenario. Such properties include, for example, the transactional nature of the bean and the security access control to the bean's methods.

Parameters:
inDir - the directory containing the deployment descriptors.
Throws:
java.lang.Exception

setDependency

public void setDependency(java.lang.String analyzer)
                   throws java.lang.Exception
Set the analyzer to use when adding in dependencies to the JAR.

Parameters:
analyzer - the name of the dependency analyzer or a class.
Throws:
java.lang.Exception

setBasejarname

public void setBasejarname(java.lang.String inValue)
                    throws java.lang.Exception
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.

Parameters:
inValue - the basename that will be used when writing the jar file containing the EJB
Throws:
java.lang.Exception

setNaming

public void setNaming(org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.NamingScheme namingScheme)
               throws java.lang.Exception
Set the naming scheme used to determine the name of the generated jars from the deployment descriptor

Parameters:
namingScheme - the naming scheme to be used
Throws:
java.lang.Exception

setDestdir

public void setDestdir(java.io.File inDir)
                throws java.lang.Exception
Set the destination directory. The EJB jar files will be written into this directory. The jar files that exist in this directory are also used when determining if the contents of the jar file have changed. Note that this parameter is only used if no deployment tools are specified. Typically each deployment tool will specify its own destination directory.

Parameters:
inDir - the destination directory in which to generate jars
Throws:
java.lang.Exception

setCmpversion

public void setCmpversion(org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.CMPVersion version)
                   throws java.lang.Exception
Sets the CMP version.

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.
Throws:
java.lang.Exception
Since:
ant 1.6

setClasspath

public void setClasspath(org.apache.tools.ant.types.Path classpath)
                  throws java.lang.Exception
Set the classpath to use when resolving classes for inclusion in the jar.

Parameters:
classpath - the classpath to use.
Throws:
java.lang.Exception

setFlatdestdir

public void setFlatdestdir(boolean inValue)
                    throws java.lang.Exception
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. If this is set to true the generated EJB jars are written into the root of the destination directory, otherwise they are written out in the same relative position as the deployment descriptors in the descriptor directory.

Parameters:
inValue - the new value of the flatdestdir flag.
Throws:
java.lang.Exception

setGenericjarsuffix

public void setGenericjarsuffix(java.lang.String inString)
                         throws java.lang.Exception
Set the suffix for the generated jar file. When generic jars are generated, they have a suffix which is appended to the the bean name to create the name of the jar file. Note that this suffix includes the extension fo te jar file and should therefore end with an appropriate extension such as .jar or .ear

Parameters:
inString - the string to use as the suffix.
Throws:
java.lang.Exception

setBasenameterminator

public void setBasenameterminator(java.lang.String inValue)
                           throws java.lang.Exception
The string which terminates the bean name. The convention used by this task is that bean descriptors are named as the BeanName with some suffix. The baseNameTerminator string separates the bean name and the suffix and is used to determine the bean name.

Parameters:
inValue - a string which marks the end of the basename.
Throws:
java.lang.Exception

createJonas

public java.lang.Object createJonas()
                             throws java.lang.Exception
Adds a deployment tool for JOnAS server.

Returns:
the deployment tool instance to be configured.
Throws:
java.lang.Exception

createClasspath

public java.lang.Object createClasspath()
                                 throws java.lang.Exception
Adds to the classpath used to locate the super classes and interfaces of the classes that will make up the EJB JAR.

Returns:
the path to be configured.
Throws:
java.lang.Exception

createDTD

public java.lang.Object createDTD()
                           throws java.lang.Exception
Create a DTD location record. This stores the location of a DTD. The DTD is identified by its public Id. The location may either be a file location or a resource location.

Returns:
the DTD location object to be configured by Ant
Throws:
java.lang.Exception

createSupport

public java.lang.Object createSupport()
                               throws java.lang.Exception
Adds a fileset for support elements.

Returns:
a fileset which can be populated with support files.
Throws:
java.lang.Exception

createDeploymentTool

protected java.lang.Object createDeploymentTool(org.apache.tools.ant.taskdefs.optional.ejb.EJBDeploymentTool deploymentTool)
                                         throws java.lang.Exception
Add a deployment tool to the list of deployment tools that will be processed

Parameters:
deploymentTool - a deployment tool instance to which descriptors will be passed for processing.
Throws:
java.lang.Exception


Copyright © 2012 OW2 Consortium. All Rights Reserved.