0
<exec dir="." executable="osc" failonerror="true" failifexecutionfails="true">  
    <arg line="-A ${obs.apiurl}/>
</exec>

Ant executes the following osc which requires user to enter usename and password if user runs the osc command for the first time. According to ant's documentation, any user input in exec task should end with EOF(-1).

So, how to pass username and password to the executable.

TonySalimi
  • 8,257
  • 4
  • 33
  • 62
deimus
  • 9,565
  • 12
  • 63
  • 107
  • 1
    see = http://stackoverflow.com/questions/4176305/ant-exec-task-how-can-i-read-input-from-console-stdin/4177216#4177216
    for similar question and possible solution
    – Rebse Aug 22 '11 at 20:04
  • see = http://stackoverflow.com/questions/4176305/ant-exec-task-how-can-i-read-input-from-console-stdin/4177216#4177216
    for similar question and possible solution
    – Rebse Aug 22 '11 at 20:05

1 Answers1

1
<input message="Username : " addproperty="account">
</input>
<exec dir="." executable="/bin/sh" inputstring="${account}" failonerror="true" failifexecutionfails="true">
    <arg line="-c osc"/>
</exec>

Here is the solution.

deimus
  • 9,565
  • 12
  • 63
  • 107
  • which is exactly what the answer i referred to in my comment to your question suggested.. – Rebse Aug 23 '11 at 19:12