buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Odelya <ode...@alicanto.com>
Subject Re: Problem with running buildr on ubuntu
Date Mon, 13 Aug 2012 20:03:31 GMT
Yes. 
My structure looks like this:
/var/lib/jenkins
      buildfile
/var/lib/jenkins/jobs/Backend/workspace
     My
     Common

Please see the full file:


VERSION_NUMBER = "1.0.0"

GROUP = " "
COPYRIGHT = "My MARKETING LTD"G

ACTIVATION 			= 'javax.activation:activation:jar:1.1'
AMAZON				= 'com.amazonaws:aws-java-sdk:jar:1.3.14'
ANTLR 				= 'antlr:antlr:jar:2.7.6'
AOPALLIANCE			= 'aopalliance:aopalliance:jar:1.0'
ASM 				= 'asm:asm:jar:3.1'
AXIS				= 'org.apache.axis:axis:jar:1.4'
AXIS_SAAJ			= 'org.apache.axis:axis-saaj:jar:1.4'
ASPECTJ 			= 'org.aspectj:aspectjweaver:jar:1.6.8'
BEANUTILS 			= 'commons-beanutils:commons-beanutils:jar:1.8.3'
BRAINTREE			= 'com.braintreegateway:braintree-java:jar:2.15.0'
C3P0 				= 'c3p0:c3p0:jar:0.9.1.2'
CGLIB				= 'cglib:cglib-nodep:jar:2.2.2'
COMMONS_CODEC		= 'commons-codec:commons-codec:jar:1.6'
COMMONS_HIBRENATE	=
'org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final'
COLLECTIONS 		= 'commons-collections:commons-collections:jar:3.2.1'
HTML_CLEANER 		= 'net.sourceforge.htmlcleaner:htmlcleaner:jar:2.2'
DISCOVERY			= 'commons-discovery:commons-discovery:jar:0.5'
HTTPCLIENT 			= 'commons-httpclient:commons-httpclient:jar:3.1'
COMMONS_IO 			= 'commons-io:commons-io:jar:2.1'
LANG 				= 'org.apache.commons:commons-lang3:jar:3.1'
LOGGING 			= 'commons-logging:commons-logging:jar:1.1.1'
VALIDATOR 			= 'commons-validator:commons-validator:jar:1.4.0'
DAO 				= 'com.googlecode.genericdao:dao:jar:1.0.0'
DAOHIBERNATE 		= 'com.googlecode.genericdao:dao-hibernate:jar:1.0.0'
DOM4J 				= 'dom4j:dom4j:jar:1.6.1'
EHCAHCE 			= 'net.sf.ehcache:ehcache:pom:2.5.3'
GEARMAN 			= 'gearman-java:gearman:jar:0.04'
GUAVA 				= 'com.google.guava:guava:jar:12.0.1'
HIBERNATE_JPA 		=
'org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final'
HIBERNATE  			= 'org.hibernate:hibernate-core:jar:3.6.10.Final'
IM4JAVA				= 'org.im4java:im4java:jar:1.2.0'
JACKSON_MAPPER 		= 'org.codehaus.jackson:jackson-mapper-asl:jar:1.9.8'
JACKSON_CORE 		= 'org.codehaus.jackson:jackson-core-asl:jar:1.9.8'
JACKSON_JAXRS		= 'org.codehaus.jackson:jackson-jaxrs:jar:1.9.8'
JACKSON_XC 			= 'org.codehaus.jackson:jackson-xc:jar:1.9.8'
JACKSON_MAPPER_LGPL = 'org.codehaus.jackson:jackson-mapper-lgpl:jar:1.9.8'
JACKSON_SMILE 		= 'org.codehaus.jackson:jackson-smile:jar:1.9.8'
JACKSON_ASL 		= 'org.codehaus.jackson:jackson-asl:jar:0.9.5'
JACKSON_LGPL 		= 'org.codehaus.jackson:jackson-lgpl:jar:0.9.5'
JACKSON_MRBEAN 		= 'org.codehaus.jackson:jackson-mrbean:jar:1.9.8'
JAVASSIST 			= 'javassist:javassist:jar:3.3'
JAXB_API 			= 'javax.xml.bind:jaxb-api:jar:2.2.6'
JAXB_IMPL 			= 'com.sun.xml.bind:jaxb-impl:jar:2.2.4'
JAXRPC_API 			= 'javax.xml:jaxrpc-api:jar:1.1'
JAX_RPC				= 'org.apache.axis:axis-jaxrpc:jar:1.4'
JDOM 				= 'org.jdom:jdom:jar:2.0.2'
JERSEY_CLIENT 		= 'com.sun.jersey:jersey-client:jar:1.13'
JERSEY_CORE 		= 'com.sun.jersey:jersey-core:jar:1.13'
JERSEY_JSON 		= 'com.sun.jersey:jersey-json:jar:1.13'
JERSEY_SERVER		= 'com.sun.jersey:jersey-server:jar:1.13'
JERSEY_SERVLET		= 'com.sun.jersey:jersey-servlet:jar:1.13'
JERSEY_SPRING		= 'com.sun.jersey:jersey-servlet:jar:1.13'
JETTISON			= 'org.codehaus.jettison:jettison:jar:1.2'
JSOUP				= 'org.jsoup:jsoup:jar:1.6.3'
JODA_TIME 			= 'joda-time:joda-time:jar:2.1'
JTA 				= 'javax.transaction:jta:jar:1.1'
LIB_PHONE_NUMBER	= 'com.googlecode.libphonenumber:libphonenumber:jar:5.0'
LOGBACK_ACCESS 		= 'ch.qos.logback:logback-access:jar:1.0.6'
LOGBACK_CLASSIC 	= 'ch.qos.logback:logback-classic:jar:1.0.6'
LOGBACK_CORE 		= 'ch.qos.logback:logback-core:jar:1.0.6'
MAIL			 	= 'javax.mail:mail:jar:1.4.5'
MYSQL 				= 'mysql:mysql-connector-java:jar:5.1.21'
OFF_GEOCODER 		= 'com.googlecode.libphonenumber:geocoder:jar:2.1'
OPEN_CSV			= 'net.sf.opencsv:opencsv:jar:2.3'
RESTFB				= 'com.restfb:restfb:jar:1.6.9'
SPRING_AOP 			= 'org.springframework:spring-aop:jar:3.1.2.RELEASE'
SPRING_ASM 			= 'org.springframework:spring-asm:jar:3.1.2.RELEASE'
SPRING_BEANS 		= 'org.springframework:spring-beans:jar:3.1.2.RELEASE'
SPRING_CONTEXT 		= 'org.springframework:spring-context:jar:3.1.2.RELEASE'
SPRING_EXPRESSION 	=
'org.springframework:spring-expression:jar:3.1.2.RELEASE'
SPRING_JDBC 		= 'org.springframework:spring-jdbc:jar:3.1.2.RELEASE'
SPRING_ORM 			= 'org.springframework:spring-orm:jar:3.1.2.RELEASE'
SPRING_TEST 		= 'org.springframework:spring-test:jar:3.1.2.RELEASE'
SPRING_TRANSACTION 	= 'org.springframework:spring-tx:jar:3.1.2.RELEASE'
SPRING_WEB 			= 'org.springframework:spring-web:jar:3.1.2.RELEASE'
SPRING_CORE			= 'org.springframework:spring-core:jar:3.1.2.RELEASE'
SEARCH 				= 'com.googlecode.genericdao:search:jar:1.0.0'
SEARCH_HIBERNATE 	= 'com.googlecode.genericdao:search-hibernate:jar:1.0.0'
SLF4J 				= 'org.slf4j:slf4j-api:jar:1.6.6'
SLF4J_LOG4J			= 'org.slf4j:slf4j-log4j12:jar:1.6.6'
STAX_API			= 'stax:stax-api:jar:1.0.1'
TOMCAT_SERVLET		= 'org.apache.tomcat:tomcat-servlet-api:jar:7.0.29'
TOMCAT_COYOTE		= 'org.apache.tomcat:tomcat-coyote:jar:7.0.29'
TWITTER4J_CORE		= 'org.twitter4j:twitter4j-core:jar:2.2.6'
WSDL4J				= 'wsdl4j:wsdl4j:jar:1.6.2'

download artifact(GEARMAN) =>
'https://launchpad.net/gearman-java/trunk/0.04/+download/gearman-java-0.04.jar'

repositories.remote << "http://repo1.maven.org/maven2"
repositories.remote << "http://braintree.github.com/braintree_java/releases"

desc "Compiling backend of   team"

define "alicento-BE" do
    
    project.version = VERSION_NUMBER
	project.group = GROUP
	manifest['Copyright'] = COPYRIGHT
  
	desc 'Building common project for engine and API'
	define 'Common' do
		compile.with SPRING_CORE,COMMONS_CODEC, COMMONS_IO,
LANG,DAOHIBERNATE,GUAVA,HIBERNATE_JPA,HIBERNATE,HTML_CLEANER,JERSEY_CLIENT,JDOM,JERSEY_CORE,JERSEY_JSON,JERSEY_SERVER,JERSEY_SERVLET,JERSEY_SPRING,JETTISON,JODA_TIME,LIB_PHONE_NUMBER,LOGBACK_ACCESS,LOGBACK_CLASSIC,LOGBACK_CORE,OFF_GEOCODER,SPRING_AOP,SPRING_ASM,SPRING_BEANS,SPRING_CONTEXT,SPRING_EXPRESSION,SPRING_JDBC,SPRING_ORM,SPRING_TEST,SPRING_TRANSACTION,SPRING_WEB,SEARCH,SEARCH_HIBERNATE,SLF4J
		package :jar
	end
	
	desc 'Building API (My) project'
	define 'My' do
		info "starting My project"
		# 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
		compile.with projects('Common'),plimus, twilio, floristone, TOMCAT_COYOTE,
TOMCAT_SERVLET,
AMAZON,ACTIVATION,ANTLR,AOPALLIANCE,ASM,ASPECTJ,AXIS,BRAINTREE,C3P0,BEANUTILS,COLLECTIONS,COMMONS_CODEC,DISCOVERY,HTTPCLIENT,COMMONS_IO,LANG,LOGGING,VALIDATOR,DAO,DAOHIBERNATE,DOM4J,EHCAHCE,GUAVA,GEARMAN,HIBERNATE_JPA,HIBERNATE,HTML_CLEANER,IM4JAVA,JACKSON_MAPPER,JACKSON_CORE,JACKSON_JAXRS,JACKSON_XC,JACKSON_CORE,JACKSON_MAPPER_LGPL,JACKSON_SMILE,JACKSON_ASL,JACKSON_LGPL,JACKSON_MRBEAN,JAVASSIST,JAXB_API,JAXB_IMPL,JAX_RPC,JDOM,JERSEY_CLIENT,JDOM,JERSEY_CORE,JERSEY_JSON,JERSEY_SERVER,JERSEY_SERVLET,JERSEY_SPRING,JETTISON,JODA_TIME,JSOUP,JTA,LIB_PHONE_NUMBER,LOGBACK_ACCESS,LOGBACK_CLASSIC,LOGBACK_CORE,MAIL,MYSQL,OFF_GEOCODER,OPEN_CSV,SPRING_AOP,SPRING_ASM,SPRING_BEANS,SPRING_CONTEXT,SPRING_CORE,
SPRING_EXPRESSION,SPRING_JDBC,SPRING_ORM,SPRING_TEST,SPRING_TRANSACTION,SPRING_WEB,RESTFB,AXIS_SAAJ,RESTFB,SEARCH,SEARCH_HIBERNATE,SLF4J,SLF4J_LOG4J,STAX_API,TWITTER4J_CORE,WSDL4J
		war = package(:war, :id => "MyBuild") 
		war.with :libs => project('Common') 
		war.enhance do |war| 
		    info "war was created ok"
			sh "$CATALINA_HOME/bin/shutdown.sh" 
			cp war.to_s, _(ENV['CATALINA_HOME'], 'webapps') 
			sh "$CATALINA_HOME/bin/startup.sh" 
		end
		info "end of build My"
	end
 
	desc 'Building the engine project based on common'
	define 'Engine' do
		compile.with  projects('Common'),SPRING_CORE,
ACTIVATION,ANTLR,AOPALLIANCE,ASM,ASPECTJ,C3P0,BEANUTILS,COLLECTIONS,DISCOVERY,HTTPCLIENT,COMMONS_IO,LANG,LOGGING,VALIDATOR,DAO,DAOHIBERNATE,DOM4J,EHCAHCE,GUAVA,HIBERNATE_JPA,HIBERNATE,JAVASSIST,JAXB_API,JAXB_IMPL,JAXRPC_API,JDOM,JERSEY_CLIENT,JERSEY_CORE,JERSEY_JSON,JODA_TIME,JTA,LOGBACK_ACCESS,LOGBACK_CLASSIC,LOGBACK_CORE,MAIL,MYSQL,SPRING_AOP,SPRING_ASM,SPRING_BEANS,SPRING_CONTEXT,SPRING_EXPRESSION,SPRING_JDBC,SPRING_ORM,SPRING_TEST,SPRING_TRANSACTION,SPRING_WEB,SEARCH,SEARCH_HIBERNATE,SLF4J,JACKSON_MAPPER,JACKSON_CORE,JACKSON_JAXRS,JACKSON_XC,JACKSON_CORE,JACKSON_MAPPER_LGPL,JACKSON_SMILE,JACKSON_ASL,JACKSON_LGPL,JACKSON_MRBEAN,AXIS_SAAJ
		test.with CGLIB,COMMONS_HIBRENATE,LIB_PHONE_NUMBER,HTML_CLEANER
		package :jar
		#run.using :main => "com.My.engine.main.EngineMain"
	end
	
	test.using :fail_on_failure=>true
	#extending the test task if everything worked fine: 
	build do |test_task|
		info "extending test task #{test_task.inspect}"
		#stop tomcat on port 8081 to copy the new version
		sh('$CATALINA_HOME/bin/shutdown.sh')
		rm_rf '$CATALINA_HOME/webapps/My'
		rm_rf '$CATALINA_HOME/webapps/My.war'
		cp 'MyBuild.war', '$CATALINA_HOME/webapps/My.war'
		#rm_rf '$CATALINA_HOME/webapps/MyBuild'
		#rm '$CATALINA_HOME/webapps/MyBuild.war'
		# start tomcat 
		sh('$CATALINA_HOME/bin/startup.sh')
		#wait for the application to go up
		sh "while ! wget -q -O /dev/null http://api1.dev. .com/ ; do echo waiting
; sleep 3 ; done"
		sh('$CATALINA_COPY/bin/shutdown.sh')
		rm_rf '$CATALINA_COPY/webapps/My'
		rm_rf '$CATALINA_COPY/webapps/My.war'
		cp 'MyBuild.war', '$CATALINA_COPY/webapps/My.war'
		# start tomcat 
		sh('$CATALINA_COPY/bin/startup.sh')
	end	 
end

Thanks

In windows it works fine. I am not sure why it doesn't work in ubuntu



--
View this message in context: http://buildr-users.1056619.n5.nabble.com/Problem-with-running-buildr-on-ubuntu-tp5706549p5706554.html
Sent from the Buildr Users mailing list archive at Nabble.com.

Mime
View raw message