ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Higginbotham" <>
Subject RE: [JBoss-user] Starting JBoss from ANT
Date Tue, 01 Oct 2002 13:40:32 GMT
Right.. What we did was spawn the jboss process, then create an internal
custom ant tag to watch the jboss log for the microkernel started (since
it releases the blocking after its initial startup but before deployment
has occurred. Once the log says that things are ok, we then launch
junit. Here is a snippt of what we did, but you may have to do your own
log watcher or similiar check, as I can't release the code (sorry). 
  <spawn executable="${bmiRoot}/BuildTools/apache/ant/bin/ant.bat">
   <arg line="-buildfile ${processAntFile}"/>
   <arg line="java.start.jboss"/>
  <WatchLog filename="${jboss.home}/server/default/log/server.log"
pattern="Started in" lines="5" timeout="360"/>
  <echo message="JBoss is up."/>


	-----Original Message-----
	From: Dushyant Shrivastava [] 
	Sent: Monday, September 30, 2002 11:01 PM
	Subject: [JBoss-user] Starting JBoss from ANT

	I had posted a message earlier about running JUnit tests inside
the same VM as JBoss so as to enable the testing of local interfaces and
I did get a few responses back. Thanks everyone!

	Now one of the most common response was to start Jboss
environment from within my tests.Hence i started by adding the following
lines in my build.xml to start JBoss server

=================================================================== --> 
	   <!-- Starts up JBoss
=================================================================== --> 
	     <target name="runjboss" depends="init"> 
	          <exec dir = "${jboss.home}/bin" 
	         executable = "${jboss.home}/bin/run.bat" 
	           os = "Windows 2000"> 

	However, now it starts JBoss but then does not execute any tasks
after this one as JBoss just holds on to the VM. Exec task does not
support the FORK option either, but in any case I do not wish to use the
fork option as it will beat the whole purpose of running the tests
inside the same JVM as JBoss. Does anyone has any idea how to get around
this problem?

	P.S I know Cactus is one of the way out but at the moment, my
project team is not too keen on trialling out another new tool and Junit
would be the easiest way for our implementation.

	In short I would apprecate if anyone has already done this and
could give me specific directions or advise me on how to run the JUnit
tests inside the same VM as JBoss so that I can test my local interfaces
as well!

	Also attached is my build.xml file for anyone who wants to
investigate this further, 

	Thanks a lot in advance, 

	Software Engineer
	tel      +61 (0) 8 9323 6999
	mob  +61 (0) 402 902 652
	fax     +61 (0) 8 9325 2688
	Yambay Technologies Pty Ltd
	7th Floor, The Victoria, 14-16 Victoria Ave, Perth. WA, 6000,
	This message and any files transmitted with it are confidential
and are intended solely for the use of those persons to
	whom the message is addressed. If you have received this message
in error, please destroy and delete this
	message from your computer. Any unauthorised form of
reproduction of this message or any files transmitted with
	it is strictly prohibited. yambay does not make any warranty
concerning the security of any information electronically
	transmitted and disclaims all liability for the proper and
complete transmission of any information contained or purportedly
	contained in this message, nor for any delay in its receipt. If
you receive this message in error please notify the sender.

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