bodewig     2002/09/27 01:18:51

  Modified:    .        WHATSNEW
               docs/manual/CoreTasks conditions.html
               src/main/org/apache/tools/ant/taskdefs Execute.java
               src/main/org/apache/tools/ant/taskdefs/condition Os.java
  Log:
  Add <os> and <exec> support for OS/400.
  
  PR: 13047
  Submitted by: Brian Farrar <brian_farrar at countrywide.com>
  
  Revision  Changes    Path
  1.293     +7 -0      jakarta-ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
  retrieving revision 1.292
  retrieving revision 1.293
  diff -u -r1.292 -r1.293
  --- WHATSNEW  27 Sep 2002 06:18:20 -0000      1.292
  +++ WHATSNEW  27 Sep 2002 08:18:51 -0000      1.293
  @@ -37,6 +37,11 @@
   * <junitreport> created an empty junit-noframes.html if no format had
     been specified.
   
  +* <basename> would remove more than it should if the file name
  +  contained more than one dot.
  +
  +* <property environment=... /> now works on OS/400.
  +
   Other changes:
   --------------
   
  @@ -80,6 +85,8 @@
   
   * The SOS and VSS tasks will no longer unconditionally prepend a $ to
     vsspath or projectpath.
  +
  +* OS/400 now gets detected by the os condition.
   
   Changes from Ant 1.5beta3 to Ant 1.5
   ====================================
  
  
  
  1.14      +1 -0      jakarta-ant/docs/manual/CoreTasks/conditions.html
  
  Index: conditions.html
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/conditions.html,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- conditions.html   9 Sep 2002 08:21:39 -0000       1.13
  +++ conditions.html   27 Sep 2002 08:18:51 -0000      1.14
  @@ -94,6 +94,7 @@
     <li>os/2 (for OS/2)</li>
     <li>win9x for Microsoft Windows 95 and 98</li>
     <li>z/os for z/OS and OS/390</li>
  +  <li>os/400 for OS/400</li>
   </ul>
   
   <h4>equals</h4>
  
  
  
  1.48      +8 -3      
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java
  
  Index: Execute.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- Execute.java      25 Jul 2002 15:21:04 -0000      1.47
  +++ Execute.java      27 Sep 2002 08:18:51 -0000      1.48
  @@ -238,7 +238,7 @@
               // Alternatively one could use: /bin/sh -c env
               String[] cmd = {"/usr/bin/env"};
               return cmd;
  -        } else if (Os.isFamily("netware")) {
  +        } else if (Os.isFamily("netware") || Os.isFamily("os/400")) {
               String[] cmd = {"env"};
               return cmd;
           } else {
  @@ -259,7 +259,12 @@
       public static String toString(ByteArrayOutputStream bos) {
           if (Os.isFamily("z/os")) {
               try {
  -                bos.toString("Cp1047");
  +                return bos.toString("Cp1047");
  +            } catch (java.io.UnsupportedEncodingException e) {
  +            }
  +        } else if (Os.isFamily("os/400")) {
  +            try {
  +                return bos.toString("Cp500");
               } catch (java.io.UnsupportedEncodingException e) {
               }
           }
  
  
  
  1.19      +4 -1      
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Os.java
  
  Index: Os.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/condition/Os.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Os.java   25 Jul 2002 15:21:10 -0000      1.18
  +++ Os.java   27 Sep 2002 08:18:51 -0000      1.19
  @@ -99,6 +99,7 @@
        *               <li>windows</li>
        *               <li>win9x</li>
        *               <li>z/os</li>
  +     *               <li>os/400</li>
        *               </ul>
        */
       public void setFamily(String f) {family = f.toLowerCase(Locale.US);}
  @@ -224,6 +225,8 @@
                   } else if (family.equals("z/os")) {
                       isFamily = osName.indexOf("z/os") > -1
                           || osName.indexOf("os/390") > -1;
  +                } else if (family.equals("os/400")) {
  +                    isFamily = osName.indexOf("os/400") > -1;
                   } else {
                       throw new BuildException(
                           "Don\'t know how to detect os family \""
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to