ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Bromley" <>
Subject ant 1.8.0 exec issue
Date Thu, 15 Apr 2010 15:45:05 GMT
Hi All,
I've found the issue below with 1.8.0 that worked in 1.8.0RC1. This
seems to have been fixed in the latest build - 1.8.1alpha compiled on
April 15 2010 built locally, so I'm not reporting in on bugzilla,
however what is the process for rolling out bug fixes - I'm reluctant to
use the latest build in case other issues arise with this build.
Ideally some sort of branched version with this bug fix in would be best
but can you advise what's the best course of action?
Details of the os are below. This only seems to be on Windows XP
Using ant 1.8.0 - create a target that uses the exec task that calls cmd
then passes command line parameters "/c ant -f test.xml test-output"
which will call an ant target on another build file.
ant reports a build failure because the target (the target from the
first build file) does not exist in the build file - which it doesn't
have to - but seems like its ignoring the command line parameters of
which target to run.
here are the examples
*****file1 - testingoutput.xml *****
<project name="testingoutput">
<target name="test-output-file1">
        <echo message="here1" />
        <exec executable="cmd"
                <arg value="/c"/>
                <arg value="ant -f test.xml test-output"/>
        <echo message="here2" />
*****file2 - test.xml *****
<project name="testing-output">
<target name="test-output">
    <echo message="hello testing"/>

****here is the output of running "ant -v -f testingoutput.xml
Apache Ant version 1.8.0 compiled on February 1 2010
Buildfile: C:\test\testingoutput.xml
Detected Java version: 1.6 in: C:\Program Files\Java\jdk1.6.0_12\jre
Detected OS: Windows XP
parsing buildfile C:\test\testingoutput.xml with URI =
Project base dir set to: C:\test
Build sequence for target(s) `test-output-file1' is [test-output-file1]
Complete build sequence is [test-output-file1, ]
parsing buildfile
ols/ant/antlib.xml with URI =
rg/apache/tools/ant/antlib.xml from a zip file
     [echo] here1
     [exec] Current OS is Windows XP
     [exec] Output appended to C:\test\test.output
     [exec] Executing 'cmd' with arguments:
     [exec] '/c'
     [exec] 'ant -f test.xml test-output'
     [exec] The ' characters around the executable and arguments are
     [exec] not part of the command.
     [echo] here2
Total time: 1 second

******here is the EXPECTED output in test.output******
Buildfile: c:\test\test.xml
     [echo] hello testing
Total time: 0 seconds

******here is the actual output******
Apache Ant version 1.8.0 compiled on February 1 2010
Buildfile: C:\test\test.xml
Detected Java version: 1.6 in: C:\Program Files\Java\jdk1.6.0_12\jre
Detected OS: Windows XP
Target "test-output-file1" does not exist in the project
Total time: 0 seconds
parsing buildfile C:\test\test.xml with URI = file:/C:/test/test.xml
Project base dir set to: C:\test
Kind Regards
Philip Bromley
<p style="font-family:'Arial';font-size:8pt">
Please consider the environment - do you really need to print this email?<br>
This email is intended only for the person(s) named above and may contain private and confidential
information. If it has come to you in error, please destroy and permanently delete any copy
in your possession and contact us on +44 (0) 161 480 4420. The information in this email is
copyright © CDL Group Holdings Limited. We cannot accept any liability for any loss or damage
sustained as a result of software viruses. It is your responsibility to carry out such virus
checking as is necessary before opening any attachment.<br>
CDL Internet Services Limited uses software which automatically screens incoming emails for
inappropriate content and attachments. If the software identifies such content or attachment,
the email will be forwarded to our Technology Department for checking. You should be aware
that any email which you send to CDL Internet Services Limited is subject to this procedure.
CDL Internet Services Limited, Strata House, Kings Reach Road, Stockport SK4 2HD<br>
Registered in England and Wales with Company Number 3871928</p>
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message