ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb BorlandDeploymentTool.java
Date Fri, 20 Jun 2003 11:09:36 GMT
antoine     2003/06/20 04:09:36

  Modified:    .        WHATSNEW
               docs/manual/OptionalTasks BorlandEJBTasks.html
               src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        BorlandDeploymentTool.java
  Log:
  Prevent <ejbjar> Borland implementation
  from being blocked by java2iiop warning messages
  PR: 19385
  Submitted by: Benoit Moussaud (benoit dot moussaud at criltelecom dot com)
  
  Revision  Changes    Path
  1.439     +4 -0      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.438
  retrieving revision 1.439
  diff -u -r1.438 -r1.439
  --- WHATSNEW	19 Jun 2003 22:23:56 -0000	1.438
  +++ WHATSNEW	20 Jun 2003 11:09:35 -0000	1.439
  @@ -161,6 +161,10 @@
     of FileUtils#createTempFile instead of the destination dir of fixcrlf.
     Bugzilla Report 20870.
   
  +* <ejbjar> implementation for Borland.
  +  Prevent the task from being blocked by error messages coming from java2iiop.
  +  Bugzilla Report 19385.
  +
   Other changes:
   --------------
   * Six new Clearcase tasks added.
  
  
  
  1.10      +7 -1      ant/docs/manual/OptionalTasks/BorlandEJBTasks.html
  
  Index: BorlandEJBTasks.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/OptionalTasks/BorlandEJBTasks.html,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- BorlandEJBTasks.html	4 Sep 2002 11:05:18 -0000	1.9
  +++ BorlandEJBTasks.html	20 Jun 2003 11:09:35 -0000	1.10
  @@ -89,6 +89,12 @@
             </td>
       <td align="center" valign="middle" width="62">No, defaults to 4</td>
     </tr>
  +  <tr>
  +    <td valign="top" width="63">java2iiopParams </td>
  +    <td valign="top" width="915">If filled, the params are added to the java2iiop
command (ex: -no_warn_missing_define)</td>
  +    <td align="center" valign="middle" width="62">no</td>
  +  </tr>
  +
   </table>
   
   <h3>Examples</h3>
  @@ -109,7 +115,7 @@
   </pre>
   
   <h3>&nbsp;</h3>
  -<p align="center">Copyright &copy; 2001-2002 Apache Software Foundation. All
rights
  +<p align="center">Copyright &copy; 2001-2003 Apache Software Foundation. All
rights
   Reserved.</p>
   
   </body>
  
  
  
  1.22      +29 -12    ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java
  
  Index: BorlandDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandDeploymentTool.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- BorlandDeploymentTool.java	10 Feb 2003 14:13:49 -0000	1.21
  +++ BorlandDeploymentTool.java	20 Jun 2003 11:09:36 -0000	1.22
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -136,6 +136,9 @@
       /** Instance variable that determines whether the debug mode is on */
       private boolean java2iiopdebug = false;
   
  +    /** store additional param for java2iiop command used to build EJB Stubs */
  +    private String java2iioparams = null;
  +
       /** Instance variable that determines whetger the client jar file is generated */
       private boolean generateclient = false;
   
  @@ -212,6 +215,16 @@
           this.version = version;
       }
   
  +    /**
  +     * If filled, the params are added to the java2iiop command.
  +     * (ex: -no_warn_missing_define)
  +     * @param params additional params for java2iiop
  +     */
  +    public void setJava2iiopParams(String params) {
  +        this.java2iioparams = params;
  +    }
  +
  +
       protected DescriptorHandler getBorlandDescriptorHandler(final File srcDir) {
           DescriptorHandler handler =
               new DescriptorHandler(getTask(), srcDir) {
  @@ -405,7 +418,7 @@
           //debug ?
           if (java2iiopdebug) {
               commandline.createArgument().setValue("-VBJdebug");
  -        } // end of if ()
  +        } 
           //set the classpath
           commandline.createArgument().setValue("-VBJclasspath");
           commandline.createArgument().setPath(getCombinedClasspath());
  @@ -413,6 +426,13 @@
           commandline.createArgument().setValue("-list_files");
           //no TIE classes
           commandline.createArgument().setValue("-no_tie");
  +        
  +        if ( java2iioparams != null) {
  +            log("additional  "+java2iioparams +" to java2iiop " ,0);
  +            commandline.createArgument().setValue(java2iioparams);            
  +        }
  +        
  +
           //root dir
           commandline.createArgument().setValue("-root_dir");
           commandline.createArgument().setValue(getConfig().srcDir.getAbsolutePath());
  @@ -421,7 +441,7 @@
           //add the home class
           while (ithomes.hasNext()) {
               commandline.createArgument().setValue(ithomes.next().toString());
  -        } // end of while ()
  +        } 
   
           try {
               log("Calling java2iiop", Project.MSG_VERBOSE);
  @@ -456,8 +476,8 @@
                   String home = toClass(clazz);
                   homes.add(home);
                   log(" Home " + home, Project.MSG_VERBOSE);
  -            } // end of if ()
  -        } // end of while ()
  +            } 
  +        } 
   
           buildBorlandStubs(homes.iterator());
   
  @@ -513,15 +533,12 @@
               BufferedReader reader = new BufferedReader(new InputStreamReader(is));
               String javafile;
               while ((javafile = reader.readLine()) != null) {
  -                log("buffer:" + javafile, Project.MSG_DEBUG);
                   if (javafile.endsWith(".java")) {
                       String classfile = toClassFile(javafile);
                       String key = classfile.substring(getConfig().srcDir.getAbsolutePath().length()
+ 1);
  -                    log(" generated : " + classfile, Project.MSG_DEBUG);
  -                    log(" key       : " + key, Project.MSG_DEBUG);
                       _genfiles.put(key, new File(classfile));
  -                } // end of if ()
  -            } // end of while ()
  +                } 
  +            } 
               reader.close();
           } catch (Exception e) {
               String msg = "Exception while parsing  java2iiop output. Details: " + e.toString();
  @@ -533,8 +550,8 @@
           BufferedReader reader = new BufferedReader(new InputStreamReader(is));
           String s = reader.readLine();
           if (s != null) {
  -            log("[java2iiop] " + s, Project.MSG_DEBUG);
  -        } // end of if ()
  +            log("[java2iiop] " + s, Project.MSG_ERR);
  +        } 
       }
   }
   
  
  
  

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


Mime
View raw message