You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Peter Neu <pe...@gmx.net> on 2004/11/14 17:31:30 UTC
Fwd: Problem with exec Windows XP
Hello everybody,
I'm having difficulties using <exec> with Windows XP. When I'm trying
to run an Ant Script with a command like this :
<exec dir="C:/Programme/Apache Software Foundation/Tomcat 5.0/bin"
executable="startup.bat"
os="WindowsXP">
</exec>
simply nothing happens. I don't even get a warning. Can anybody tell me
what
I did wrong ?
Best Regards,
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Fwd: Problem with exec Windows XP
Posted by Peter Neu <pe...@gmx.net>.
Hello Alexey,
could you just post the correct command ? This would help a lot.
Regards,
Peter
> To launch batch files you need to execute cmd.exe with correct
> parameters ("/c" and "startup.bat"). You cannot execute the batch
> files themselves.
>
> - Alexey.
>
> Peter Neu wrote:
>
>> Hello everybody,
>>
>> I'm having difficulties using <exec> with Windows XP. When I'm trying
>> to run an Ant Script with a command like this :
>>
>> <exec dir="C:/Programme/Apache Software Foundation/Tomcat 5.0/bin"
>> executable="startup.bat"
>> os="WindowsXP">
>>
>> </exec>
>>
>> simply nothing happens. I don't even get a warning. Can anybody tell
>> me what
>> I did wrong ?
>>
>> Best Regards,
>>
>> Peter
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Fwd: Problem with exec Windows XP
Posted by "Alexey N. Solofnenko" <A....@mdl.com>.
To launch batch files you need to execute cmd.exe with correct
parameters ("/c" and "startup.bat"). You cannot execute the batch files
themselves.
- Alexey.
Peter Neu wrote:
> Hello everybody,
>
> I'm having difficulties using <exec> with Windows XP. When I'm trying
> to run an Ant Script with a command like this :
>
> <exec dir="C:/Programme/Apache Software Foundation/Tomcat 5.0/bin"
> executable="startup.bat"
> os="WindowsXP">
>
> </exec>
>
> simply nothing happens. I don't even get a warning. Can anybody tell
> me what
> I did wrong ?
>
> Best Regards,
>
> Peter
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
Re: Fwd: Problem with exec Windows XP
Posted by Peter Neu <pe...@gmx.net>.
Thanks Ivan. I will try this one.
Regards.
Peter
Ivan Ivanov schrieb:
>Hello Peter,
>
>I do not know why you exec does now work, but assuming
>that you are trying to start Tomcat, why do not invoke
>it via <java> & <macrodef> tasks like this:
>
><macrodef name="tomcat.utils" description="Macrodef
>for starting/stopping Tomcat">
> <!-- the action passed to tomcat bootstrap process
>-->
> <attribute name="action"/>
> <sequential>
> <java
>classname="org.apache.catalina.startup.Bootstrap"
>fork="yes" failonerror="yes">
> <classpath>
> <pathelement
>location="${catalina.home}/bin/bootstrap.jar"/>
> </classpath>
> <arg value="@{action}"/>
> <sysproperty key="catalina.home"
>value="${catalina.home}"/>
> </java>
> </sequential>
></macrodef>
>
>You can later invoke the macordef like this:
>
> <target name="start-tomcat" depends="-init"
>description="Starts Tomcat" unless="tomcat.up">
> <tomcat.utils action="start"/>
> </target>
>
> <target name="stop-tomcat" depends="-init"
>description="Stops Tomcat">
> <tomcat.utils action="stop"/>
> </target>
>
>HTH Ivan
>
>--- Peter Neu <pe...@gmx.net> wrote:
>
>
>
>>Hello everybody,
>>
>>I'm having difficulties using <exec> with Windows
>>XP. When I'm trying
>>to run an Ant Script with a command like this :
>>
>> <exec dir="C:/Programme/Apache Software
>>Foundation/Tomcat 5.0/bin"
>>executable="startup.bat"
>> os="WindowsXP">
>>
>> </exec>
>>
>>simply nothing happens. I don't even get a warning.
>>Can anybody tell me
>>what
>>I did wrong ?
>>
>>Best Regards,
>>
>>Peter
>>
>>
>>
>>
>>
>>
>---------------------------------------------------------------------
>
>
>>To unsubscribe, e-mail:
>>user-unsubscribe@ant.apache.org
>>For additional commands, e-mail:
>>user-help@ant.apache.org
>>
>>
>>
>>
>
>
>
>
>__________________________________
>Do you Yahoo!?
>Check out the new Yahoo! Front Page.
>www.yahoo.com
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Fwd: Problem with exec Windows XP
Posted by Ivan Ivanov <ra...@yahoo.com>.
Hello Peter,
I do not know why you exec does now work, but assuming
that you are trying to start Tomcat, why do not invoke
it via <java> & <macrodef> tasks like this:
<macrodef name="tomcat.utils" description="Macrodef
for starting/stopping Tomcat">
<!-- the action passed to tomcat bootstrap process
-->
<attribute name="action"/>
<sequential>
<java
classname="org.apache.catalina.startup.Bootstrap"
fork="yes" failonerror="yes">
<classpath>
<pathelement
location="${catalina.home}/bin/bootstrap.jar"/>
</classpath>
<arg value="@{action}"/>
<sysproperty key="catalina.home"
value="${catalina.home}"/>
</java>
</sequential>
</macrodef>
You can later invoke the macordef like this:
<target name="start-tomcat" depends="-init"
description="Starts Tomcat" unless="tomcat.up">
<tomcat.utils action="start"/>
</target>
<target name="stop-tomcat" depends="-init"
description="Stops Tomcat">
<tomcat.utils action="stop"/>
</target>
HTH Ivan
--- Peter Neu <pe...@gmx.net> wrote:
> Hello everybody,
>
> I'm having difficulties using <exec> with Windows
> XP. When I'm trying
> to run an Ant Script with a command like this :
>
> <exec dir="C:/Programme/Apache Software
> Foundation/Tomcat 5.0/bin"
> executable="startup.bat"
> os="WindowsXP">
>
> </exec>
>
> simply nothing happens. I don't even get a warning.
> Can anybody tell me
> what
> I did wrong ?
>
> Best Regards,
>
> Peter
>
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>
>
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org