com.ibm.websphere.ant.tasks

Class WsEjbDeploy

  • java.lang.Object
    • org.apache.tools.ant.ProjectComponent
      • org.apache.tools.ant.Task
        • com.ibm.websphere.ant.tasks.WsEjbDeploy
  • All Implemented Interfaces:
    java.lang.Cloneable


    public class WsEjbDeploy
    extends org.apache.tools.ant.Task
    The wsejbdeploy task executes the WebSphere EJB Deploy tool on the specified Jar file with the specified options. The structure of the wsejbdeploy task is shown below: <wsejbdeploy inputJar="ejb jar file or Ear file" wasHome="WebSphere Installation Directory" workingDirectory="temp directory" outputJar="output ejb jar file or Ear file" classpath="ear classes" classpathref="ear classes element reference" codegen="true | false" dbname="Database name" dbschema="Database Schema Name" dbvendor="Database Vendor" dynamic="Enable Dynamic Query Support" keepGenerated="true | false" quiet="true | false" noValidate="true | false" noWarnings="true | false" noInform="true | false" rmicOptions="rmic options" compatible35="true | false" sqlj="true | false" failonerror="true | false" trace="true | false" jvmMaxMemory="256M" jdkComplianceLevel="1.4 | 5.0 | 6.0"> <systemProperty value=""/> . . . <systemProperty value=""/> <jvmarg value=""/> . . . <jvmarg value=""/> </wsejbdeploy> The wasHome attribute is optional and contains the location of the WebSphere Installation Directory.
    The inputJar attribute is required and contains the undeployed EJB Jar file or EAR file you wish to deploy.
    The workingDirectory attribute is optional. It normally contains a temporary directory for the deploy tool to use. If not set, the Java System Property user.home is used.
    The outputJar attribute is required and specifies the name of the deployed EJB Jar or EAR file to create.
    The classpath attribute is optional. It allows the specification of ear classes to be added to the classpath of the deploy tool.
    The classpathref attribute is optional. It does the same thing as the classpath attribute, but allows the use of the Ant reference mechanism for the specification of the path.
    The codegen attribute is optional and is set to true to keep the generated Java files
    The dbname attribute is optional and specifies the name of the database to create
    The dbschema attribute is optional and specifies the name of the database schema to create
    The dbvendor attribute is optional and specifies the type of database the EJBs will use
    The dynamic attribute is optional and specifies to enable dynamic query support
    The keepGenerated attribute is optional and is set to true to prevent the workingDirectory from being deleted
    The quiet attribute is optional and is set to true to only output error messages, surpressing informational messages
    The noValidate attribute is optional and set to true to disable validation messages
    The noWarnings attribute is optional and set to true to disable warning and informational messages
    The noInform attribute is optional and set to true to disable informational messages
    The rmicOptions attribute is optional allows additional arguments to be passed to the rmic command
    The compatible35 attribute is optional and set to true to use WebSphere 3.5 compatible mapping rules
    The sqlj attribute is optional and set to true to generate SQL/J persistor code
    The trace attribute is optional and set to true to enable internal deploy tool tracing
    The failonerror attribute is optional and set to true to cause your build to stop on deploy errors
    The jvmMaxMemory attribute is optional and sets maximum size of the memory for the underlying VM. Defaults to 256M
    The systemProperty attribute is optional and it adds the value as the java system properties when java get called
    The jvmarg attribute is optional and it adds arguments to the jvm used to execute the wsejbdeploy task
    The jdkComplianceLevel attribute is optional and sets the JDK level for compiler compliance. Valid values are 1.4, 5.0, 6.0.

    To use this task, add the following to your Ant build.xml <taskdef name="wsejbdeploy" classname="com.ibm.websphere.ant.tasks.WsEjbDeploy"/>
    • Property Summary

      Properties 
      Type Property and Description
      org.apache.tools.ant.types.Commandline.Argument createSystem
      Creates a nested arg element.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      protected com.ibm.ws.ant.utils.WasUtils wasUtils 
      • 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

      Constructors 
      Constructor and Description
      WsEjbDeploy()
      Constructor for WsEjbDeploy
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      org.apache.tools.ant.types.Path createClasspath()
      Maybe creates a nested classpath element.
      org.apache.tools.ant.types.Commandline.Argument createJvmarg()
      Creates a nested jvmArg element.
      org.apache.tools.ant.types.Commandline.Argument createSystemProperty()
      Creates a nested arg element.
      void execute() 
      boolean isDebug()
      Is debugging enabled?
      void setClasspath(org.apache.tools.ant.types.Path classpath)
      Sets the classpath
      void setClasspathRef(org.apache.tools.ant.types.Reference r)
      Adds a reference to a CLASSPATH defined elsewhere.
      void setCodegen(boolean codegen)
      Sets the codegen
      void setCompatible35(boolean compatible35)
      Sets the compatible35
      void setDbname(java.lang.String dbname)
      Sets the dbname
      void setDbschema(java.lang.String dbschema)
      Sets the dbschema
      void setDbvendor(java.lang.String dbvendor)
      Sets the dbvendor
      void setDebug(boolean debug)
      Setter for enabling debugging
      void setDynamic(boolean dynamic)
      Sets the dynamic
      void setFailonerror(boolean failonerror)
      Sets the failonerror.
      void setIgnoreErrors(boolean ignoreErrors)
      Sets the ignoreErrors
      void setInputJar(java.io.File inputJar)
      Sets the inputJar
      void setJdkComplianceLevel(java.lang.String complianceLevel)
      Sets the jdk compliance level for ejbdeploy
      void setJvmMaxMemory(java.lang.String jvmMaxMemory)
      Sets the jvmMaxMemory.
      void setKeepGenerated(boolean keepGenerated)
      Sets the keepGenerated
      void setLog(boolean log) 
      void setNoInform(boolean noInform)
      Sets the noInform
      void setNoValidate(boolean noValidate)
      Sets the noValidate
      void setNoWarnings(boolean noWarnings)
      Sets the noWarnings
      void setOutputJar(java.io.File outputJar)
      Sets the outputJar
      void setQuiet(boolean quiet)
      Sets the quiet
      void setRmicOptions(java.lang.String rmicOptions)
      Sets the rmicOptions
      void setSqlj(boolean sqlj)
      Sets the sqlj
      void setTrace(boolean trace)
      Sets the trace
      void setWasHome(java.lang.String wasHome)
      Sets the wasHome.
      void setWorkingDirectory(java.io.File workingDirectory)
      Sets the workingDirectory
      • Methods inherited from class org.apache.tools.ant.Task

        bindToOwner, 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
    • Property Detail

      • createSystem

        Creates a nested arg element.
    • Field Detail

      • wasUtils

        protected final com.ibm.ws.ant.utils.WasUtils wasUtils
    • Constructor Detail

      • WsEjbDeploy

        public WsEjbDeploy()
        Constructor for WsEjbDeploy
    • Method Detail

      • createClasspath

        public org.apache.tools.ant.types.Path createClasspath()
        Maybe creates a nested classpath element.
      • setClasspathRef

        public void setClasspathRef(org.apache.tools.ant.types.Reference r)
        Adds a reference to a CLASSPATH defined elsewhere.
      • setClasspath

        public void setClasspath(org.apache.tools.ant.types.Path classpath)
        Sets the classpath
        Parameters:
        classpath - The classpath to set
      • setCodegen

        public void setCodegen(boolean codegen)
        Sets the codegen
        Parameters:
        codegen - The codegen to set
      • setCompatible35

        public void setCompatible35(boolean compatible35)
        Sets the compatible35
        Parameters:
        compatible35 - The compatible35 to set
      • setSqlj

        public void setSqlj(boolean sqlj)
        Sets the sqlj
        Parameters:
        sqlj - The sqlj to set
      • setDbname

        public void setDbname(java.lang.String dbname)
        Sets the dbname
        Parameters:
        dbname - The dbname to set
      • setDbschema

        public void setDbschema(java.lang.String dbschema)
        Sets the dbschema
        Parameters:
        dbschema - The dbschema to set
      • setDbvendor

        public void setDbvendor(java.lang.String dbvendor)
        Sets the dbvendor
        Parameters:
        dbvendor - The dbvendor to set
      • setIgnoreErrors

        public void setIgnoreErrors(boolean ignoreErrors)
        Sets the ignoreErrors
        Parameters:
        ignoreErrors - The ignoreErrors to set
      • setInputJar

        public void setInputJar(java.io.File inputJar)
        Sets the inputJar
        Parameters:
        inputJar - The inputJar to set
      • setKeepGenerated

        public void setKeepGenerated(boolean keepGenerated)
        Sets the keepGenerated
        Parameters:
        keepGenerated - The keepGenerated to set
      • setDynamic

        public void setDynamic(boolean dynamic)
        Sets the dynamic
        Parameters:
        dynamic - The dynamic to set
      • setNoInform

        public void setNoInform(boolean noInform)
        Sets the noInform
        Parameters:
        noInform - The noInform to set
      • setNoValidate

        public void setNoValidate(boolean noValidate)
        Sets the noValidate
        Parameters:
        noValidate - The noValidate to set
      • setNoWarnings

        public void setNoWarnings(boolean noWarnings)
        Sets the noWarnings
        Parameters:
        noWarnings - The noWarnings to set
      • setOutputJar

        public void setOutputJar(java.io.File outputJar)
        Sets the outputJar
        Parameters:
        outputJar - The outputJar to set
      • setQuiet

        public void setQuiet(boolean quiet)
        Sets the quiet
        Parameters:
        quiet - The quiet to set
      • setRmicOptions

        public void setRmicOptions(java.lang.String rmicOptions)
        Sets the rmicOptions
        Parameters:
        rmicOptions - The rmicOptions to set
      • setTrace

        public void setTrace(boolean trace)
        Sets the trace
        Parameters:
        trace - The trace to set
      • setLog

        public void setLog(boolean log)
      • setJdkComplianceLevel

        public void setJdkComplianceLevel(java.lang.String complianceLevel)
        Sets the jdk compliance level for ejbdeploy
        Parameters:
        complianceLevel -
      • setWorkingDirectory

        public void setWorkingDirectory(java.io.File workingDirectory)
        Sets the workingDirectory
        Parameters:
        workingDirectory - The workingDirectory to set
      • setWasHome

        public void setWasHome(java.lang.String wasHome)
        Sets the wasHome.
        Parameters:
        wasHome - The wasHome to set
      • setFailonerror

        public void setFailonerror(boolean failonerror)
        Sets the failonerror.
        Parameters:
        failonerror - The failonerror to set
      • setJvmMaxMemory

        public void setJvmMaxMemory(java.lang.String jvmMaxMemory)
        Sets the jvmMaxMemory.
        Parameters:
        jvmMaxMemory - The JVM MaxMemory to set
      • isDebug

        public boolean isDebug()
        Is debugging enabled?
        Returns:
      • setDebug

        public void setDebug(boolean debug)
        Setter for enabling debugging
        Parameters:
        debug -
      • execute

        public void execute()
                     throws org.apache.tools.ant.BuildException
        Overrides:
        execute in class org.apache.tools.ant.Task
        Throws:
        org.apache.tools.ant.BuildException
      • createSystemProperty

        public org.apache.tools.ant.types.Commandline.Argument createSystemProperty()
        Creates a nested arg element.
      • createJvmarg

        public org.apache.tools.ant.types.Commandline.Argument createJvmarg()
        Creates a nested jvmArg element.
IBM WebSphere Application ServerTM
Release 8.5