29.03.12
Apache Buildr in Action
A short intro BED 2012
- Dr. Halil-Cem Gürsoy, adesso AG
Apache Buildr in Action A short intro BED 2012 Dr. Halil-Cem - - PowerPoint PPT Presentation
Apache Buildr in Action A short intro BED 2012 Dr. Halil-Cem Grsoy, adesso AG 29.03.12 About me Round about 12 Years in the IT, Development and Consulting Before that development in research (RNA secondary structures) Software
29.03.12
► Round about 12 Years in the IT, Development and Consulting ► Before that development in research (RNA secondary structures) ► Software Architect @ adesso AG, Dortmund ► Main focus on Java Enterprise (Spring, JEE) and integration projects
► Speaker and Author
29.03.12 Scala für Enterprise-Applikationen 2
Apache Buildr in Action – BED-Con 2012 3
► Why another Build System? ► A bit history ► Buildr catchwords ► Tasks ► Dependency management ► Testing ► Other languages ► Extending
Apache Buildr in Action – BED-Con 2012 4
http://www.flickr.com/photos/bombardier/19428000/
Apache Buildr in Action – BED-Con 2012 5
http://appwriter.com/what-if-maven-was-measured-cost-first-maven-project
Apache Buildr in Action – BED-Con 2012 6
► Convention over configuration
► Documentation
► “Latest and greatest” plugins
► Which Bugs are fixed in Maven 3?
Apache Buildr in Action – BED-Con 2012 7
► Ant
► Gradle
► Simple Build Tool
Apache Buildr in Action – BED-Con 2012 8
► Entered 2007 Apache Incubator ► Since 2009 Top-Level Project ► Coming from Apache Ode as Maven doesn't fit the needs
Apache Buildr in Action – BED-Con 2012 9
Apache Buildr in Action – BED-Con 2012 10
► Why Buildr?
► Using Rake?
Apache Buildr in Action – BED-Con 2012 11
► Simplest project definition:
► A bit more complicated
► And now: do it!
Apache Buildr in Action – BED-Con 2012 12
► You have to install Ruby and some other stuff
► And then install Buildr gem:
► For Windows users:
► JRuby supported, too
Apache Buildr in Action – BED-Con 2012 13
► Buildr is Rake is Ruby based ► Ruby used as scripting language to extend Buildr ► Ruby
Apache Buildr in Action – BED-Con 2012 14
► artifacts ► build ► clean ► compile ► install ► package ► release ► ...and many more:
Apache Buildr in Action – BED-Con 2012 15
► File is based on Apache defaults
► Can be overridden by own layouts
Apache Buildr in Action – BED-Con 2012 16
► Multimodule support is out of the box
Apache Buildr in Action – BED-Con 2012 17
► Built in dependency management ► Using Maven Repositorys
Apache Buildr in Action – BED-Con 2012 18
► Transitive dependency’s supported
► But doesn't support excludes and conflict handling
► Many Artifact POMs in awful quality → this is the real drawback ► How to handle?
Apache Buildr in Action – BED-Con 2012 19
► You can work w/o an repository manager ► Just pick JAR's from a directory
► Or download the artifacts
► Prepare for offline mode
Apache Buildr in Action – BED-Con 2012 20
► Library scopes under full control ► Define yourself which libraries are packaged
► Include / exclude Libraries
Apache Buildr in Action – BED-Con 2012 21
► By default, JUnit is assumed to be used as test framework ► Dependency’s same as compile plus testframework plus JMock ► Using TestNG instead of JUnit
► Skipping tests
► Excluding tests depending on environment
Apache Buildr in Action – BED-Con 2012 22
► Profiles supported
Apache Buildr in Action – BED-Con 2012 23
► Scala
► Supports Scalatest and Specs
Apache Buildr in Action – BED-Con 2012 24
► Groovy support as like Scala
► Testing
► Ruby
Apache Buildr in Action – BED-Con 2012 25
► Buildr supports polyglot projects out of the box
Apache Buildr in Action – BED-Con 2012 26
► Extending by writing Rake tasks ► Extending in Ruby using Ruby Modules
Apache Buildr in Action – BED-Con 2012 27
► Apache Buildr is mature ► The dependency management is a bit different as in Maven ► IDE integration is limited ► Documentation is limited, you need to look into the code
► Lets you “code” your build like Gradle and SBT ► Full extensibility using Ruby as scripting language
Apache Buildr in Action – BED-Con 2012 28