Apache Buildr in Action

Similar documents
Java in der Cloud Aktuelle Möglichkeiten und Entwicklungen

Why switch exist-db from Ant to Maven?

MAVEN MOCK TEST MAVEN MOCK TEST I

This tutorial explains how you can use Gradle as a build automation tool for Java as well as Groovy projects.

Gradle Leveraging Groovy for Building Java Applications. Hans Dockter Gradle Project Lead

Build Automation Kurt Christensen

Component based Development. Table of Contents. Notes. Notes. Notes. Web Application Development. Zsolt Tóth

The Workshop. Slides (you have a copy in the zip) Practical labs Ask questions

Maven Introduction to Concepts: POM, Dependencies, Plugins, Phases

Welcome News Notices Getting Started Installing Buildr Linux... 8 OS/X Windows JRuby...

I Got My Mojo Workin'

Quick Start...4. Installing and Running Projects Building Artifacts Packaging Testing Settings & Profiles...

Topics covered. Introduction to Maven Maven for Dependency Management Maven Lifecycles and Plugins Hands on session. Maven 2

MAVEN INTERVIEW QUESTIONS

Hello Maven. TestNG, Eclipse, IntelliJ IDEA. Óbuda University, Java Enterprise Edition John von Neumann Faculty of Informatics Lab 2.

Hello Gradle. TestNG, Eclipse, IntelliJ IDEA. Óbuda University, Java Enterprise Edition John von Neumann Faculty of Informatics Lab 2.

MAVEN MOCK TEST MAVEN MOCK TEST IV

Simplified Build Management with Maven

Package Management and Build Tools

Maven in the wild. An introduction to Maven

JVM Survival Guide. Hadi Hariri

Software Engineering - Development Infrastructure 2. Kristjan Talvar Nortal

Maven. INF5750/ Lecture 2 (Part II)

Sonatype CLM - IDE User Guide. Sonatype CLM - IDE User Guide

OpenECOMP SDC Developer Guide

Repository Management and Sonatype Nexus. Repository Management and Sonatype Nexus

Distributing JavaFX Applications with Java WebStart and Artifactory

Getting Started with Gradle

What is Maven? Apache Maven is a software project management and comprehension tool (build, test, packaging, reporting, site, deploy).

Ruby on Rails. SITC Workshop Series American University of Nigeria FALL 2017

Sonatype CLM Enforcement Points - Nexus. Sonatype CLM Enforcement Points - Nexus

DevOps examples on NonStop Tools Overview. Cor Geboers, ATC Consultant

A Glance Over the Serverless Framework

MAVEN MOCK TEST MAVEN MOCK TEST III

C++ Binary Dependency Management with Gradle. Hugh Greene

Enter the Gradle Hans Dockter CEO, Gradleware Founder Gradle

Tuesday, April 26, 2011

Checking Out and Building Felix with NetBeans

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

Raven: Scripting Java Builds with Ruby MATTHIEU RIOU

Selenium Testing Course Content

Managing Installations and Provisioning of OSGi Applications. Carsten Ziegeler

Gradle. The Basics and Beyond

AntBuilder. Introduction

THIS IS ONLY SAMPLE RESUME - DO NOT COPY AND PASTE INTO YOUR RESUME. WE ARE NOT RESPONSIBLE Name: xxxxxx

REASONS TO USE A BINARY REPOSITORY MANAGER WHEN DEVELOPING WITH. White Paper

Directory structure and development environment set up

IBM. IBM WebSphere Application Server Migration Toolkit. WebSphere Application Server. Version 9.0 Release

Sometimes Tools Matter. John E. Vincent DevOpsDays Goteborg 2011

Chapter 1. Installation and Setup

Setting up a Maven Project

Groovy & Grails Scripting for Modern Web Applications. Rohit Nayak Talentica Software

Migrating traditional Java EE applications to mobile

Fat / Uber jars - Using the Shade Plugin

Bitnami JRuby for Huawei Enterprise Cloud

Content. Development Tools 2(57)

Achieving Continuous Delivery - Micro Services. - Vikram Gadang

Christoph Henrici. Website: Phone: +41(78) Architect, Senior Developer.

Niv Mizrahi. VP github.com/nivm

Dr. Roland Huß, Red

An Application for Monitoring Solr

LSI's VMware vcenter Plug-In: A Study in the Use of Open Source Software Erik Johannes Brian Mason LSI Corp

Full Control and Transparency Advanced Troubleshooting and Testing. Josh West & Andrew Dinn

Administering Apache Geronimo With Custom Server Assemblies and Maven. David Jencks

Who Moved My Module? 1

SpringSource Tool Suite 2.7.1

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

J2EE Development with Apache Geronimo 1.1. Aaron Mulder CTO, Chariot Solutions Committer, Apache Geronimo

CHAPTER 6. Java Project Configuration

Maven POM project modelversion groupid artifactid packaging version name

Portal Application Deployment Scripting

Microservices with Red Hat. JBoss Fuse

Scala Days 2018 You Are a Scala Contributor

Webservices In Java Tutorial For Beginners Using Netbeans Pdf

Eclipse Lyo Overview. Michael Fiedler, Eclipse Lyo committer IBM Corporation

7.1. RELEASE-NOTES-2.0-M1.TXT

Copyright 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12

Introduction to project industrialization using Maven YaJUG 06/10/2009. Copyright Pierre-Antoine Grégoire License Creative Commons 2.

Breaking Apart the Monolith with Modularity and Microservices CON3127

Architekturen für die Cloud

#jenkinsconf. Jenkins user plugin. This time it's. Jenkins User Conference Israel. Shiran JFrog

Improve and Expand JavaServer Faces Technology with JBoss Seam

Unable To The Artifact From Any Repository Maven-clean-plugin

The Script Bowl Featuring Groovy, JRuby, Jython and Scala. Raghavan Rags N. Srinivas CTO, Technology Evangelism

Maven 2 & Continuum. by Trygve Laugstøl

Bitnami JFrog Artifactory for Huawei Enterprise Cloud

TIBCO StreamBase 10.2 Building and Running Applications in Studio, Studio Projects and Project Structure. November 2017

Petr Suchomel Architect, NetBeans Mobility

3 Continuous Integration 3. Automated system finding bugs is better than people

Configuration Store Setup Guide

Chrome if I want to. What that should do, is have my specifications run against four different instances of Chrome, in parallel.

Getting started with Geomajas. Geomajas Developers and Geosparc

9 Reasons To Use a Binary Repository for Front-End Development with Bower

APEX Application Lifecycles > Managing the Change

ArcGIS Runtime SDK for Java: Building Apps. Mark Baird

Installation and Setup Guide Oracle FLEXCUBE Universal Banking Release 12.0 [May] [2012] Oracle Part Number E

CONTINUOUS DELIVERY IN THE ORACLE CLOUD

1 Markus Eisele, Insurance - Strategic IT-Architecture

Continuous Delivery for Cloud Native Applications

Language alone won t pay your bills. Alan Franzoni - EP 2012 twitter: franzeur website:

Transcription:

Apache Buildr in Action A short intro BED 2012 Dr. Halil-Cem Gürsoy, 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 Architect @ adesso AG, Dortmund Main focus on Java Enterprise (Spring, JEE) and integration projects > Build Management > Cloud > NoSQL / BigData Speaker and Author 29.03.12 2 Scala für Enterprise-Applikationen

Agenda Why another Build System? A bit history Buildr catchwords Tasks Dependency management Testing Other languages Extending 3

Any aggressive Maven fanboys here? http://www.flickr.com/photos/bombardier/19428000/ 4

Collected quotes about Maven Maven is such a pain in the ass http://appwriter.com/what-if-maven-was-measured-cost-first-maven-project 5

Maven sucks... Convention over configuration > Inconsistent application of convention rules > High effort needed to configure Documentation > Which documentation? (ok, gets better) Latest and greatest plugins > Maven @now!= Maven @yesterday > Not reproducible builds! Which Bugs are fixed in Maven 3? 6

Other buildsystems Ant > Still good and useful, can do everything... but XML Gradle > Groovy based > Easy extensible > Many plugins, supported by CI-Tools Simple Build Tool > In Scala for Scala (but does it for Java, too) 7

Apache Buildr Entered 2007 Apache Incubator Since 2009 Top-Level Project Coming from Apache Ode as Maven doesn't fit the needs > Like Ant (Tomcat) and Maven (Turbine) before 8

Why Buildr in Apache Ode? ~ 5.500 lines of POM XML ~ 500 Buildr lines 9

Apache Buildr catchwords Why Buildr? > Unmaintainable, inflexible Maven Scripts > Missing loops > Missing DRY > Missing Scripting Using Rake? > Buildsystem for Ruby, now part of standard Ruby Libs > Usage of Ruby code blocks > Knows not enough about Java > Put Buildr on top of Rake 10

Ease of use Simplest project definition: define 'bed-app' A bit more complicated define 'bed-app' do project.version = '0.1.0' package :jar end And now: do it! $> buildr compile 11

Installation You have to install Ruby and some other stuff $ sudo apt-get install ruby-full ruby1.8-dev libopenssl-ruby rubygems And then install Buildr gem: $ sudo gem install buildr For Windows users: > One click install for Ruby > Install buildr gem JRuby supported, too 12

Ruby Buildr is Rake is Ruby based Ruby used as scripting language to extend Buildr Ruby > Lightweight > Easy syntax > Easy file manipulation > Native regular expressions > Already used in many infrastructure projects like Chef 13

Basic Buildr default tasks artifacts build clean compile install package release...and many more: $ buildr -T 14

File Structure File is based on Apache defaults > Known as Maven project structure Can be overridden by own layouts my_layout = Layout.new my_layout[:source, :main, :java] = 'java' define 'bed-app', :layout=>my_layout 15

Multimodule support Multimodule support is out of the box define 'bed-proj' do define 'bed-api' do package :jar end define 'bed-backend' do compile.with projects('bed-api') package :jar end package(:jar).using :libs => projects('bed-api','bed-backend') end 16

Dependency management Built in dependency management Using Maven Repositorys repositories.remote << 'http://repo1.maven.org/maven2' LOG4J = 'log4j:log4j:jar:1.2.15' JUNIT = 'junit:junit:jar:4.7' define 'bed-app' do project.version = '0.1.0' Compile.with LOG4J,JUNIT package :jar end 17

More on dependency management Transitive dependency s supported Compile.with transitive(spring_webmvc) But doesn't support excludes and conflict handling > Try using Log4j w/o exclusions... Many Artifact POMs in awful quality this is the real drawback How to handle? > Take your dependency s under full control > Or use Ivy (via Ivy extension) 18

Last words about DM You can work w/o an repository manager Just pick JAR's from a directory OWN = Dir[File.join(OWN_HOME, '*.jar')] Or download the artifacts url = "http://download.mylib.org/mylib-1.0.0.zip" download(artifact("hgu:mylib:jar:1.0.0")=>url) Prepare for offline mode $ buildr artifacts 19

Library s Library scopes under full control Define yourself which libraries are packaged > By default all which are used to compile Include / exclude Libraries package(:war).libs -= artifacts(javax.servletapi) package(:war).libs += artifacts(jettylibs) 20

Testing 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 test.using :testng Skipping tests $ buildr test=no Excluding tests depending on environment test.exclude '*gui**' unless $stdout.isatty 21

Profies and Environments Profiles supported > Configuration by Yaml files > Selected by current environment $ buildr -e dev01 dev01: db: hsql jdbc: hsqldb:mem:devdb test: db: oracle jdbc: oracle:thin:@localhost:1521:test 22

Other Languages... Scala require 'buildr/scala' scala.version: 2.8.0 Supports Scalatest and Specs > Specs is default test.using(:scalatest) 23

Other Languages Groovy support as like Scala require 'buildr/groovy' Testing > EasyB supported Ruby > May you'll stick with Rake > Good support for JRuby, tight integration > Support for different testing frameworks 24

Languages Buildr supports polyglot projects out of the box define "groovymodule" do compile.using(:groovyc) package(:jar) end define "javamodule" do package(:jar) end define "scalamodule" do compile.using(:scalac) package(:jar) end 25

Extending Extending by writing Rake tasks Extending in Ruby using Ruby Modules > Incorporate 'Extension' > Callback's: first_time, before_define, after_define module MyExtension include Extension first_time do desc 'Do my stuff' # do something end... end 26

Wrap up 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 > But a good active community Lets you code your build like Gradle and SBT Full extensibility using Ruby as scripting language 27

Wir suchen Sie als Software-Architekt (m/w) Projektleiter (m/w) Senior Software Engineer (m/w) jobs@adesso.de www.aaajobs.de 28

Vielen Dank für Ihre Aufmerksamkeit. info@adesso.de www.adesso.de