ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gardner, Chris" <>
Subject RE: Killing Forked JVMs (was RE: Killing Forked Jams)
Date Fri, 12 Sep 2003 21:10:20 GMT
I actually use parallel and sequential.  wlstop gives you the capability
to stop the server.  Unfortunately, the server that I'm using
( does not provide an ant means to start and stop it.
I have to start it using the <java> task.  The only way that I can see
to do exactly what I want is to write a custom ant task or require the
developers to always have the fitnesse server running on their machines.
Here is my script:

<!-- Allows users to run the server by itself without having to run the
tests from ant. --> 
  <target name="run-fitnesse-server" description="Runs the FitNesse
    <java classname="fitnesse.Fitnesse" fork="true" 
         <fileset refid="fitnesse.jars" /> 
       <arg line="-p ${accept-test-server.port}" /> 

  <target name="accept-test" description="Runs the acceptance tests."> 
      <antcall target="run-fitnesse-server" /> 

        <waitfor maxwait="5" maxwaitunit="minute"> 
          <socket server="${}" 
                  port="${accept-test-server.port}" /> 

        <java classname="fitnesse.TestRunner" failonerror="true"
            <fileset refid="fitnesse.jars" /> 
          <arg line="-v ${accept-tests-to-run}" /> 


-----Original Message----- 
From: Antoine Lévy-Lambert [
<> ] 
Sent: Friday, September 12, 2003 3:40 PM 
To: Ant Users List 
Subject: AW: Killing Forked JVMs (was RE: Killing Forked Jams) 

The parallel task might be useful for you : 

from the documentation : (
<>  ) 
  <wlrun ... > 
    <sleep seconds="30"/> 
    <junit ... > 

This example represents a typical pattern for testing a server
In one thread the server is started (the wlrun task). The other thread 
consists of a three tasks which are performed in sequence. The sleep
task is 
used to give the server time to come up. Another task which is capable
validating that the server is available could be used in place of the
task. The test harness is then run. Once the tests are complete, the
is stopped (using wlstop in this example), allowing both threads to 
complete. The parallel task will also complete at this time and the
will then continue. 


-----Urspr√ľngliche Nachricht----- 
Von: Gardner, Chris [
<> ] 
Gesendet: Freitag, 12. September 2003 15:24 
An: 'Ant Users List' 
Betreff: Killing Forked JVMs (was RE: Killing Forked Jams) 

My spell checker changed JVM to JAM.  Sorry. 

-----Original Message----- 
From: Gardner, Chris [
< <>
> ] 
Sent: Friday, September 12, 2003 9:21 AM 
To: '' 
Subject: Killing Forked Jams 

Is there a built-in mechanism in ant to kill forked Jams?  In my case, 
I'm using <java fork="true"> to launch a server process that I run tests

against.  This server process is a small, specialized http server 
( that has no accompanying ant tasks.  I have to fork 
the JAM because the server process depends on the value of the dir 
attribute of <java>.  When the tests are finished, the build does not 
finish because it is waiting on the forked JAM to complete. 

I don't want to use the <java> timeout attribute because I have no way 
of knowing how long those tests will take. 

Any suggestions? 



To unsubscribe, e-mail: 
For additional commands, e-mail: 

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