ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs Execute.java
Date Fri, 28 Jan 2005 22:51:56 GMT
Oh, yeah, I also removed the 1.1 stuff.  Does anybody
have access to an OpenVMS system so they can test
whether the command file is deleted at the appropriate
time?

-Matt

--- mbenson@apache.org wrote:

> mbenson     2005/01/28 14:23:30
> 
>   Modified:   
> src/main/org/apache/tools/ant/taskdefs Execute.java
>   Log:
>   javadoc, some refactorings,
>   attempt to delete VMS command file when process
> completes.
>   
>   Revision  Changes    Path
>   1.88      +164 -187 
>
ant/src/main/org/apache/tools/ant/taskdefs/Execute.java
>   
>   Index: Execute.java
>  
>
===================================================================
>   RCS file:
>
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v
>   retrieving revision 1.87
>   retrieving revision 1.88
>   diff -u -r1.87 -r1.88
>   --- Execute.java	6 Jan 2005 12:05:05 -0000	1.87
>   +++ Execute.java	28 Jan 2005 22:23:30 -0000	1.88
>   @@ -63,7 +63,7 @@
>        private boolean spawn = false;
>    
>    
>   -    /** Controls whether the VM is used to launch
> commands, where possible */
>   +    /** Controls whether the VM is used to launch
> commands, where possible. */
>        private boolean useVMLauncher = true;
>    
>        private static String antWorkingDirectory =
> System.getProperty("user.dir");
>   @@ -74,8 +74,8 @@
>        /** Used to destroy processes when the VM
> exits. */
>        private static ProcessDestroyer
> processDestroyer = new ProcessDestroyer();
>    
>   -    /**
>   -     * Builds a command launcher for the OS and
> JVM we are running under
>   +    /*
>   +     * Builds a command launcher for the OS and
> JVM we are running under.
>         */
>        static {
>            // Try using a JDK 1.3 launcher
>   @@ -86,7 +86,6 @@
>            } catch (NoSuchMethodException exc) {
>                // Ignore and keep trying
>            }
>   -
>            if (Os.isFamily("mac") &&
> !Os.isFamily("unix")) {
>                // Mac
>                shellLauncher = new
> MacCommandLauncher(new CommandLauncher());
>   @@ -94,16 +93,8 @@
>                // OS/2
>                shellLauncher = new
> OS2CommandLauncher(new CommandLauncher());
>            } else if (Os.isFamily("windows")) {
>   -            // Windows.  Need to determine which
> JDK we're running in
>    
>   -            CommandLauncher baseLauncher;
>   -            if
>
(System.getProperty("java.version").startsWith("1.1"))
> {
>   -                // JDK 1.1
>   -                baseLauncher = new
> Java11CommandLauncher();
>   -            } else {
>   -                // JDK 1.2
>   -                baseLauncher = new
> CommandLauncher();
>   -            }
>   +            CommandLauncher baseLauncher = new
> CommandLauncher();
>    
>                if (!Os.isFamily("win9x")) {
>                    // Windows XP/2000/NT
>   @@ -114,15 +105,8 @@
>                        = new
> ScriptCommandLauncher("bin/antRun.bat",
> baseLauncher);
>                }
>            } else if (Os.isFamily("netware")) {
>   -            // NetWare.  Need to determine which
> JDK we're running in
>   -            CommandLauncher baseLauncher;
>   -            if
>
(System.getProperty("java.version").startsWith("1.1"))
> {
>   -                // JDK 1.1
>   -                baseLauncher = new
> Java11CommandLauncher();
>   -            } else {
>   -                // JDK 1.2
>   -                baseLauncher = new
> CommandLauncher();
>   -            }
>   +
>   +            CommandLauncher baseLauncher = new
> CommandLauncher();
>    
>                shellLauncher
>                    = new
> PerlScriptCommandLauncher("bin/antRun.pl",
> baseLauncher);
>   @@ -141,12 +125,13 @@
>        }
>    
>        /**
>   -     * set whether or not you want the process to
> be spawned
>   -     * default is not spawned
>   +     * Set whether or not you want the process to
> be spawned.
>   +     * Default is not spawned.
>         *
>   -     * @param spawn if true you do not want ant
> to wait for the end of the process
>   +     * @param spawn if true you do not want Ant
>   +     *              to wait for the end of the
> process.
>         *
>   -     * @since ant 1.6
>   +     * @since Ant 1.6
>         */
>        public void setSpawn(boolean spawn) {
>            this.spawn = spawn;
>   @@ -155,14 +140,13 @@
>        /**
>         * Find the list of environment variables for
> this process.
>         *
>   -     * @return a vector containing the
> environment variables
>   -     * the vector elements are strings formatted
> like variable = value
>   +     * @return a vector containing the
> environment variables.
>   +     * The vector elements are strings formatted
> like variable = value.
>         */
>        public static synchronized Vector
> getProcEnvironment() {
>            if (procEnvironment != null) {
>                return procEnvironment;
>            }
>   -
>            procEnvironment = new Vector();
>            try {
>                ByteArrayOutputStream out = new
> ByteArrayOutputStream();
>   @@ -174,7 +158,6 @@
>                if (retval != 0) {
>                    // Just try to use what we got
>                }
>   -
>                BufferedReader in =
>                    new BufferedReader(new
> StringReader(toString(out)));
>    
>   @@ -182,7 +165,6 @@
>                    procEnvironment =
> addVMSLogicals(procEnvironment, in);
>                    return procEnvironment;
>                }
>   -
>                String var = null;
>                String line, lineSep =
> System.getProperty("line.separator");
>                while ((line = in.readLine()) !=
> null) {
>   @@ -257,9 +239,9 @@
>         * OS/390, at least not the way we use it in
> the execution
>         * context.
>         *
>   -     * @param bos the output stream that one
> wants to read
>   +     * @param bos the output stream that one
> wants to read.
>         * @return the output stream as a string,
> read with
>   -     * special encodings in the case of z/os and
> os/400
>   +     * special encodings in the case of z/os and
> os/400.
>         *
>         * @since Ant 1.5
>         */
>   @@ -288,7 +270,6 @@
>            this(new PumpStreamHandler(), null);
>        }
>    
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message