Buildr, a simple, powerful and efficient build tool
Show me your build, I'll tell you how healthy your project is
maven | buildr |
---|---|
mvn eclipse:eclipse | buildr eclipse |
mvn package -Dmaven.test.skip=true | buildr package test=no |
mvn test -Dtest=MyTest | buildr test=MyTest |
maven test:match -Dmaven.test.match="*MyTest*" |
maven 1 | buildr | |
---|---|---|
Condor : SLOC | 1053 | 750 |
Condor : number of files | 43 | 1 |
Condor : total build time | 12 min | 2 min 30 |
AVSP : SLOC | 19183 | 878 |
AVSP : number of files | 188 | 1 |
AVSP : total build time | around 1/2h | 7 min |
AVSP : releasing | two people binome 1/2 day (unsafe) | 5 min (safe) |
Testimonies found on the Internet : SLOC
maven2 or ant | buildr |
---|---|
4652 | 698 |
768 | 28 |
VERSION_NUMBER = "1.0.0-SNAPSHOT" GROUP = 'barreverte.fr' COPYRIGHT = 'Barre Verte !' repositories.remote << 'http://www.ibiblio.org/maven2/' desc 'buildr session' define 'example' do project.version = VERSION_NUMBER project.group = GROUP compile.using :target=>'1.5', :other=>['-encoding', 'ISO8859_1'], :deprecation=>false, :debug=>true desc 'A lib' define 'A' do package :jar end desc 'B lib' define 'B' do compile.with project('A') package :jar end desc 'D lib' define 'D' do package :jar end desc 'final deliverable' define 'C' do compile.with projects('A', 'B', 'D') package :war end end
desc 'common infrastructure' define 'commons' do compile.with LOG4J, MYSQL, SERVLET_API, COMMONS_LANG, XSTREAM test.with JDOM, 'jspapi:jsp-api:jar:2.0', MOCKRUNNER, SPRING, SPRING_MOCK, MOCKITO, FEST package :jar end
SPRING_DAO = Buildr::group('spring-beans', 'spring-core', 'spring-dao', 'spring-jdbc', :under=>'org.springframework', :version=>'1.2.6')
test.resources.from _(:src, :test, :data)
generated_lib = package :jar deliverable = package :tgz deliverable.include _('src/main/batch'), :as=>'batch' deliverable.path('batch/lib').include generated_lib, compile.dependencies
check deliverable, "scala-library jar should be included, please check that your $SCALA_HOME points to a valid folder" do it.should contain('batch/lib/scala-library.jar') end
chmod 0755, Dir[_('src/main/avsp-batch/bin/*')] chmod 0644, FileList[_('src/main/avsp-batch/etc/**/*.properties')]
task :fitnesse => [:prerequis_fitnesse, :fitnesse_wiki]
task :fitnesse_wiki do |t| ant(t.name) do |ant| ant.taskdef :name=>'start_fitnesse', :classname=>'fitnesse.ant.StartFitnesseTask', :classpath=>FITNESSE_JAR ant.start_fitnesse :wikidirectoryrootpath=>_('src/main'), :fitnesseport=>8082 end end
stubs = package :jar, :file=>_('target/stubs.jar') stubs.merge artifacts(COMMONS_HTTPCLIENT, COMMONS_LANG, LOG4J, project('commons-test'))
compile.enhance ['my_pretty_ant_task']
test.setup { Rake::Task['a_nice_rake_task'].execute }
manifest['Implementation-Version'] = project.version manifest['Copyright'] = COPYRIGHT manifest['My-Custom-Field'] = ANY_VALUE
repositories.remote << 'http://www.ibiblio.org/maven2/' repositories.remote << 'http://mirrors.ibiblio.org/pub/mirrors/maven2' repositories.remote << 'http://maven01b.serveur:8081/nexus/content/groups/public' repositories.release_to = { :url=>'sftp://maven01b.serveur:/var/maven-projets/maven', :username=>'robert.johnson', :password=>'Xroads' }
buildr, build like you code