buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Odelya Holiday <ode...@alicanto.com>
Subject packaging one project before testing
Date Thu, 16 Aug 2012 14:06:27 GMT
Hi!

I realized, that in buildr by default the order is like this:

build all the projects
run tests on all the projects
package all the proejcts

The thing is that I need to package the war before running the tests -
since they call my api war.

My buildfile is as follows:

         desc 'Building engine project for engine and API'
	define 'Engine' do	
		compile.with  SPRING_CORE, ACTIVATION,ANTLR,AOPALLIANCE,ASM,ASPECTJ
		info "package engine jar"
		package(:jar, :id=>"Engine")
	end
	
	desc 'Building API project'
	define 'MyBuild' do
		# specify the artifact for plimus, twilio and floristone since I
created it locally
		plimus = artifact('plimus.com:plimus:jar:1.0').from('/var/lib/selfdep/wsintegration.jar')
		floristone = artifact('floristone.com:floristone:jar:1.0').from('/var/lib/selfdep/floristone.jar')
		twilio =  artifact('twilio.com:twilio:jar:1.0').from('/var/lib/selfdep/twilio.jar')
		# install the artifact locally
		install plimus
		install floristone
		install twilio
		libs = AXIS_SAAJ,RESTFB,SEARCH,SEARCH_HIBERNATE,SLF4J,SLF4J_LOG4J,STAX_API,TWITTER4J_CORE,WSDL4J
		compile.with libs
		war = package(:war, :id=>"MyBuild")
		war.with :libs => libs
		package.enhance do
			  sh "sudo " + tomcatlocation + "/bin/shutdown.sh" rescue nil
			  cp war.to_s, buildrwar
			  sh "sudo " + tomcatlocation + "/bin/startup.sh"
		 end
	end

I would like the package.enhance to happen before invoking the tests
of Engine and the tests of the MyBuild (the api) so it could check it
while tomcat is running.

How can I do it?
-- 
Odelya

Mime
View raw message