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 WeblogicDeploymentTool.java
Date Sun, 08 Jul 2001 00:00:39 GMT
conor       01/07/07 17:00:39

  Modified:    docs/manual/OptionalTasks ejb.html
               src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        WeblogicDeploymentTool.java
  Log:
  Add noEJBC attribute to <ejbjar>'s weblogic element to skip ejbc.
  
  PR:	1654
  
  Revision  Changes    Path
  1.5       +7 -1      jakarta-ant/docs/manual/OptionalTasks/ejb.html
  
  Index: ejb.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/OptionalTasks/ejb.html,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ejb.html	2001/06/27 12:48:33	1.4
  +++ ejb.html	2001/07/08 00:00:38	1.5
  @@ -19,7 +19,7 @@
   </ul>
   
   <p>Version @VERSION@<br>
  -$Id: ejb.html,v 1.4 2001/06/27 12:48:33 conor Exp $
  +$Id: ejb.html,v 1.5 2001/07/08 00:00:38 conor Exp $
   </p>
   <hr>
   <h2>Table of Contents</h2>
  @@ -845,6 +845,12 @@
     <tr>
       <td valign="top">oldCMP</td>
       <td valign="top"><b>Deprecated</b> This is an antonym for newCMP
which should be used instead.</td>
  +    <td valign="top" align="center">No.</td>
  +  </tr>
  +  <tr>
  +    <td valign="top">noEJBC</td>
  +    <td valign="top">If this attribute is set to true, Weblogic's ejbc will not be
run on the EJB jar.
  +                     Use this if you prefer to run ejbc at deployment time.</td>
       <td valign="top" align="center">No.</td>
     </tr>
   </table>
  
  
  
  1.26      +26 -2     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
  
  Index: WeblogicDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- WeblogicDeploymentTool.java	2001/06/29 09:55:33	1.25
  +++ WeblogicDeploymentTool.java	2001/07/08 00:00:38	1.26
  @@ -119,6 +119,9 @@
   
       private boolean alwaysRebuild = true;
   
  +    /** controls whether ejbc is run on the generated jar */
  +    private boolean noEJBC = false;
  +    
       /**
        * Indicates if the old CMP location convention is to be used.
        */
  @@ -254,7 +257,15 @@
       public void setNewCMP(boolean newCMP) {
           this.newCMP = newCMP;
       }
  -    
  +
  +    /**
  +     * Do not EJBC the jar after it has been put together.
  +     *
  +     */
  +    public void setNoEJBC(boolean noEJBC) {
  +        this.noEJBC = noEJBC;
  +    }
  +   
       protected void registerKnownDTDs(DescriptorHandler handler) {
           // register all the known DTDs
           handler.registerDTD(PUBLICID_EJB11, DEFAULT_WL51_EJB11_DTD_LOCATION);
  @@ -372,7 +383,20 @@
        */
       private void buildWeblogicJar(File sourceJar, File destJar, String publicId) {
           org.apache.tools.ant.taskdefs.Java javaTask = null;
  -        
  +
  +        if (noEJBC) {
  +            try {
  +                getTask().getProject().copyFile(sourceJar, destJar);
  +                if (!keepgenerated) {
  +                    sourceJar.delete();
  +                }
  +                return;
  +            }
  +            catch (IOException e) {
  +                throw new BuildException("Unable to write EJB jar", e);
  +            }
  +        }
  +
           String ejbcClassName = ejbcClass;
           
           try {
  
  
  

Mime
View raw message