ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@antbuild.com>
Subject Re: Stopping and starting a service in Win2000 with Ant.
Date Thu, 24 Jul 2003 11:21:49 GMT
you should rather do

----- Original Message -----
From: "Gian Franco Casula" <Gian.Franco.Casula@topficie.nl>
Sent: Thursday, July 24, 2003 12:09 PM


> <property name="service"  value="Netscape Enterprise Server 3.6
(between)"/>
> ...
> <target name="restart" depends="clean"
>  description="Restarts Netscape Enterprise Server" >
>  <exec executable="cmd.exe">
>   <arg line="net stop ${service}"/>
>  </exec>
> </target>
>
should be better
<exec executable="net.exe">
  <arg value="stop"/>
  <arg value="${service}"/>
</exec>
now if ant stalls, it probably means that stdout or stderr do not close
cleanly at the end of the execution of net.exe, or that the command really
hangs.
There are postings on this list about spawning commands.
See in particular this one :
http://marc.theaimsgroup.com/?l=ant-user&m=104322316306620&w=2
Antoine



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message