ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb EjbJar.java
Date Fri, 14 Jun 2002 15:15:01 GMT
conor       2002/06/14 08:15:01

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/ejb Tag:
                        ANT_15_BRANCH EjbJar.java
  Log:
  Make ejbjar more esily extended by allowing subclasses to add new
  deployment tool instances.
  
  PR:	7548
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.34.2.1  +44 -37    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java
  
  Index: EjbJar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/EjbJar.java,v
  retrieving revision 1.34
  retrieving revision 1.34.2.1
  diff -u -w -u -r1.34 -r1.34.2.1
  --- EjbJar.java	14 Apr 2002 11:16:17 -0000	1.34
  +++ EjbJar.java	14 Jun 2002 15:15:01 -0000	1.34.2.1
  @@ -225,6 +225,19 @@
       /** The list of deployment tools we are going to run. */
       private ArrayList deploymentTools = new ArrayList();
   
  +
  +    /**
  +     * Add a deployment tool to the list of deployment tools that will be
  +     * processed
  +     *
  +     * @param deploymentTool a deployment tool instance to which descriptors
  +     *        will be passed for processing.
  +     */
  +    protected void addDeploymentTool(EJBDeploymentTool deploymentTool) {
  +        deploymentTool.setTask(this);
  +        deploymentTools.add(deploymentTool);
  +    }
  +
       /**
        * Create a weblogic nested element used to configure a
        * deployment tool for Weblogic server.
  @@ -233,8 +246,7 @@
        */
       public WeblogicDeploymentTool createWeblogic() {
           WeblogicDeploymentTool tool = new WeblogicDeploymentTool();
  -        tool.setTask(this);
  -        deploymentTools.add(tool);
  +        addDeploymentTool(tool);
           return tool;
       }
   
  @@ -246,8 +258,7 @@
        */
       public WebsphereDeploymentTool createWebsphere() {
           WebsphereDeploymentTool tool = new WebsphereDeploymentTool();
  -        tool.setTask(this);
  -        deploymentTools.add(tool);
  +        addDeploymentTool(tool);
           return tool;
       }
   
  @@ -276,8 +287,7 @@
           log("iPlanet Application Server deployment tools", Project.MSG_VERBOSE);
   
           IPlanetDeploymentTool tool = new IPlanetDeploymentTool();
  -        tool.setTask(this);
  -        deploymentTools.add(tool);
  +        addDeploymentTool(tool);
           return tool;
       }
   
  @@ -289,8 +299,7 @@
        */
       public JbossDeploymentTool createJboss() {
           JbossDeploymentTool tool = new JbossDeploymentTool();
  -        tool.setTask(this);
  -        deploymentTools.add(tool);
  +        addDeploymentTool(tool);
           return tool;
       }
   
  @@ -304,8 +313,7 @@
           log("JOnAS deployment tools",  Project.MSG_VERBOSE);
           
           JonasDeploymentTool tool = new JonasDeploymentTool();
  -        tool.setTask(this);
  -        deploymentTools.add(tool);
  +        addDeploymentTool(tool);
           return tool;
       }    
       
  @@ -321,8 +329,7 @@
               Project.MSG_INFO); 
           WeblogicTOPLinkDeploymentTool tool 
               = new WeblogicTOPLinkDeploymentTool();
  -        tool.setTask(this);
  -        deploymentTools.add(tool);
  +        addDeploymentTool(tool);
           return tool;
       }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message