ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harold Putman <hput...@lexmark.com>
Subject Re: [SPAM] Problems with exec task on Windows machine
Date Tue, 10 Apr 2012 11:46:31 GMT
Try invoking with -d and ant will show you exactly the command line it is
running. This may reveal your issue.

In this particular case you might want to consider using the <ant> task
instead of exec.

<project name="test" default="run">
>
>     <target name="run">
>        <ant antfile="${ant.file}" target="clean"/>
>     </target>
>
>     <target name="clean">
>        <echo message="CLEAN"/>
>     </target>
>
> </project>
>

Harold

On Tue, Apr 10, 2012 at 2:54 AM, Jarek Czekalski
<jarekczek@poczta.onet.pl>wrote:

> On 1.8.2 and same windows it runs fine.
>
> W dniu 2012-04-09 16:54, ivadim pisze:
>
>  Hello.
>> I have some problems with exec task.
>>
>> I have build.xml:
>> <project name="test">
>>
>>     <target name="run">
>>        <exec executable="cmd">
>>                <arg value="/c"/>
>>                <arg value="${ant.home}/bin/ant"/>
>>                <arg value="-f"/>
>>                <arg value="${ant.file}"/>
>>                <arg value="clean"/>
>>        </exec>
>>     </target>
>>
>>     <target name="clean">
>>        <echo message="CLEAN"/>
>>     </target>
>>
>> </project>
>>
>> When I run "ant run" command I expected to see CLEAN message. But actualy
>> this is recursively execute task "run".
>>
>> run:
>>      [exec] Buildfile: C:\Users\dmivanov\Projects\**tmp\build.xml
>>      [exec]
>>      [exec] run:
>>      [exec]      [exec] Buildfile: C:\Users\dmivanov\Projects\**
>> tmp\build.xml
>>      [exec]      [exec]
>>      [exec]      [exec] run:
>>
>> My OS is Windows 7x64
>> Ant version is 1.8.0
>>
>> Anybody know why it is happens?
>>
>>
>> --
>> View this message in context: http://ant.1045680.n5.nabble.**
>> com/Problems-with-exec-task-**on-Windows-machine-**tp5627489p5627489.html<http://ant.1045680.n5.nabble.com/Problems-with-exec-task-on-Windows-machine-tp5627489p5627489.html>
>> Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.**org<user-unsubscribe@ant.apache.org>
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.**org<user-unsubscribe@ant.apache.org>
> For additional commands, e-mail: user-help@ant.apache.org
>
>


-- 
Harold PUTMAN
Web Technology Specialist
*Lexmark International, Inc. <http://www.lexmark.com>*
740 W New Circle Rd.
Lexington, KY 40550
+1(859) 232-2839
hputman@lexmark.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message