Bug 57264 - Exec arg/line parser removes dash symbol from command line arguments
Summary: Exec arg/line parser removes dash symbol from command line arguments
Status: NEEDINFO
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-26 10:10 UTC by muryshkin
Modified: 2014-11-26 10:28 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description muryshkin 2014-11-26 10:10:38 UTC
Test setup: Ant 1.9.4 on Debian Jessie, JRE 1.7.0

Need to pass argument "-f" or "--file" to command line via exec task.

All this is not working (called tool reports that an argument without dash, "f" or "file" was called.

<arg value="-f"/>
<arg value="--file"/>

<arg line="-f"/>
<arg line="--file"/>
Comment 1 Stefan Bodewig 2014-11-26 10:28:32 UTC
Hmm, seems to work for me.

$ cat /tmp/exec.xml 
<project>
  <exec executable="uname">
    <arg value="-a"/>
  </exec>
</project>
$ ant -f /tmp/exec.xml 
Buildfile: /tmp/exec.xml
     [exec] Linux brick 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Can you please run "ant -v" to see what's going on?  For me it says

     [exec] Current OS is Linux
     [exec] Executing 'uname' with arguments:
     [exec] '-a'
     [exec] 
     [exec] The ' characters around the executable and arguments are
     [exec] not part of the command.

and the dash is there (obviously not only inside the logs) as "uname a" would cause an error.