ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <rambiusparkisan...@yahoo.com>
Subject Re: Fwd: Problem with exec Windows XP
Date Sun, 14 Nov 2004 17:02:02 GMT
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 <peter.neu@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


Mime
View raw message