ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Watkins" <>
Subject Bug with exec under Windows 2000
Date Tue, 01 Aug 2000 01:25:01 GMT
The exec task doesn't work correctly under Windows 2000, when using a
directory that is not the local one.

Reading the code, it is clear that for Windows NT, it expects to use the cmd
command to execute commands, and for other Windows (presumably 9x), it uses
the antRun.bat file.

The code does not identify Win2K as a variant of WinNT, and so tries to use
the antRun.bat file.

The problem with this is that the antRun.bat file doesn't work when you are
using commands that (for example) require property definitions (e.g. a
command like: doStuff name=value). This appears to be a problem with the
pattern matching rules used in the batch file, but I'm not familar enough
with the DOS batch file syntax to work out what the solution at that level

Given a sample target like this:
<target name="sample">
  <exec os="Windows 2000" command="echo doStuff name=value" />
  <exec os="Windows 2000" dir="otherDir" command="echo doStuff name=value"

You get this output:

Buildfile: sample.xml

     [exec] doStuff name=value
     [exec] doStuff name value
                        ^ <- notice the lack of the = sign.


  /\\\   Robert Watkins                      |   Email:
 (  )))  Software Engineer - Technology Dev. |      ph: +61 7 3303 3432
  \///   Mincom Limited                      |     fax: +61 7 3303 3257

This transmission is for the intended addressee only and is confidential
information. If you have received this transmission in error, please delete
it and notify the sender. The contents of this E-mail are the opinion of the
writer only and are not endorsed by Mincom Limited unless expressly stated

View raw message