Build management & Continuous integration. with Maven & Hudson



Similar documents
Maven or how to automate java builds, tests and version management with open source tools

Continuous Integration Multi-Stage Builds for Quality Assurance

Software project management. and. Maven

Content. Development Tools 2(63)

Software infrastructure for Java development projects

GECKO Software. Introducing FACTORY SCHEMES. Adaptable software factory Patterns

Maven2. Configuration and Build Management. Robert Reiz

Software project management. and. Maven

Jenkins Continuous Build System. Jesse Bowes CSCI-5828 Spring 2012

Jenkins: The Definitive Guide

Sonatype CLM for Maven. Sonatype CLM for Maven

Meister Going Beyond Maven

Maven 2 in the real world

Continuous Integration with Jenkins. Coaching of Programming Teams (EDA270) J. Hembrink and P-G. Stenberg [dt08jh8

Continuous integration in OSGi projects using Maven (v:0.1) Sergio Blanco Diez

Introduction to Programming Tools. Anjana & Shankar September,2010

Continuous Integration The Full Monty Artifactory and Gradle. Yoav Landman & Frederic Simon

Practicing Continuous Delivery using Hudson. Winston Prakash Oracle Corporation

Hands on exercise for

Delivering Quality Software with Continuous Integration

Improving Software Quality with the Continuous Integration Server Hudson. Dr. Ullrich Hafner Avaloq Evolution AG 8911

Sonatype CLM Enforcement Points - Continuous Integration (CI) Sonatype CLM Enforcement Points - Continuous Integration (CI)

Java Power Tools. John Ferguson Smart. ULB Darmstadt 1 PI. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo

Continuous Integration

Java Software Quality Tools and techniques

Beginners guide to continuous integration. Gilles QUERRET Riverside Software

Software Construction

Continuous Delivery. Alejandro Ruiz

Maven2 Reference. Invoking Maven General Syntax: Prints help debugging output, very useful to diagnose. Creating a new Project (jar) Example:

Continuous Integration in Kieker

Maven the Beautiful City. Healthy, Viable, and Productive Build Infrastructures

Teaming Up for Software Development

Java Forum Nord Dirk Mahler

Coding in Industry. David Berry Director of Engineering Qualcomm Cambridge Ltd

Software Quality Exercise 2

SMZ. SocialMedia. Z olutions

Continuous Integration: Put it at the heart of your development

TeamCity A Professional Solution for Delivering Quality Software, on Time

Upping the game. Improving your software development process

Continuous Integration and Bamboo. Ryan Cutter CSCI Spring Semester

Continuous Delivery for Alfresco Solutions. Satisfied customers and happy developers with!! Continuous Delivery!

Continuous Integration. CSC 440: Software Engineering Slide #1

How To Use An Orgsync With Anorgfusion Middleware

SA4 Software Developer Survey Survey Specification v2.2

CI/CD Cheatsheet. Lars Fabian Tuchel Date: 18.March 2014 DOC:

SOA-14: Continuous Integration in SOA Projects Andreas Gies

Nexus Professional Whitepaper. Repository Management: Stages of Adoption

Developing Applications Using Continuous Integration 12c (12.2.1)

SOFTWARE DEVELOPMENT BASICS SED

Hudson Continous Integration Server. Stefan Saasen,

PHP vs. Java. In this paper, I am not discussing following two issues since each is currently hotly debated in various communities:

JavaScript Applications for the Enterprise: From Empty Folders to Managed Deployments. George Bochenek Randy Jones

Jenkins on Windows with StreamBase

Kohsuke Kawaguchi Sun Microsystems, Inc. hk2.dev.java.net, glassfish.dev.java.net. Session ID

Rapid Application Development. and Application Generation Tools. Walter Knesel

Contents. Apache Log4j. What is logging. Disadvantages 15/01/2013. What are the advantages of logging? Enterprise Systems Log4j and Maven

Hudson configuration manual

Automated performance testing using Maven & JMeter. George Barnett, Atlassian Software

Continuous Integration For Real: The Perforce Java Platform. Hamish Reid Perforce Software Inc.

Modulo II Qualidade de Software com Maven

Continuous Integration

Leveraging Rational Team Concert's build capabilities for Continuous Integration

IKAN ALM Architecture. Closing the Gap Enterprise-wide Application Lifecycle Management

Repository Management with Nexus

Builder User Guide. Version Visual Rules Suite - Builder. Bosch Software Innovations

Continuous Integration

SDK Code Examples Version 2.4.2

Maven 3 New Features. Stefan Scheidt Solution Architect OPITZ CONSULTING GmbH

SOFTWARE TESTING TRAINING COURSES CONTENTS

Beginning POJOs. From Novice to Professional. Brian Sam-Bodden

<Insert Picture Here> Introducing Hudson. Winston Prakash. Click to edit Master subtitle style

CONTINUOUS INTEGRATION

Beginner s guide to continuous integration. Gilles QUERRET Riverside Software

MSWL Development & Tool. Eclipse IDE

Case Study: Using Jenkins to Build WebSphere Portal Applications for the Enterprise. #jenkinsconf. Jenkins User Conference Boston #jenkinsconf

Integration in Practice

by Charles Souillard CTO and co-founder, BonitaSoft

Continuous Integration: Improving Software Quality and Reducing Risk. Preetam Palwe Aftek Limited

Introduction and Agenda

GlassFish v3. Building an ex tensible modular Java EE application server. Jerome Dochez and Ludovic Champenois Sun Microsystems, Inc.

The Unix-like Build Pattern

GENiC. Deliverable D5.1 Development & Integration guidelines including integration environment & means. Dissemination Level: Public

ALM: Continuous Integration. José Almeida, Microsoft

Developer Guide: Smartphone Mobiliser Applications. Sybase Mobiliser Platform 5.1 SP03

BEST WEB PROGRAMMING LANGUAGES TO LEARN ON YOUR OWN TIME

Continuous integration with Jenkins CI

Software Continuous Integration & Delivery

The Benefits of Utilizing a Repository Manager

Continuous Integration: A case study

Continuous Integration For Fusion Middleware

Integration with Other Tools

Repository Management with Nexus

NXTware Remote. Advanced Development and Maintenance Environment for OpenVMS and other Strategic Platforms

Mind The Gap! Setting Up A Code Structure Building Bridges

Developing Web Services with Eclipse and Open Source. Claire Rogers Developer Resources and Partner Enablement, HP February, 2004

Jukka Kokko SOFTWARE BUILD AND RELEASE MANAGEMENT FOR A WIRELESS PRODUCT WITH OPEN SOURCE TOOLS

Integrating your Maven Build and Tomcat Deployment

"Build and Test in the Cloud "

Agile ALM. Lightweight tools and Agile strategies MANNING MICHAEL HUTTERMANN. Shelter Island

Continuous Integration and Delivery at NSIDC

Transcription:

Build management & Continuous integration with Maven & Hudson

About me Tim te Beek tim.te.beek@nbic.nl Computer science student Bioinformatics Research Support

Overview Build automation with Maven Repository management with Nexus Continuous Integration with Hudson Discussion

Goals At the end of this talk... you can start using Maven find artifacts with Nexus create jobs in Hudson you will know why you need a One-Step-Build what Continuous Integration is how you can benefit from CI there is room for discussion

Build automation One-step-build Compile Test Package Deploy Documentation

Advantages of build automation Eliminate redundant tasks Speed up build Shared build knowledge Improve product quality Reproducable, portable builds Enables Continuous Integration

Java development problems Find a library Go to website Download Jar Add to classpath RSS / mailing list for updates After a while Where did this jar come from? Still using this jar? Using what version? How to update?

Solution Apache Maven: Opensource and Free http://maven.apache.org/ Software project management tool Dependency management Standardized build Project Object Model (POM) manage project builds, resources, dependencies, binaries, reporting and documentation Extensively used in Java Command line tool with IDE integrations

Build Lifecycle Standardized phases (subset) validate compile test package integration-test verify install deploy Plugins attach to any phase generate-sources process-sources

Conventions 1 project = 1 artifact (pom, jar, war, ear,...) Standardized directory structure project descriptor (POM) build lifecycle

POM XML file (pom.xml) Describing Project name Project version Description Build settings Dependencies... <?xml version="1.0"?> <project> <modelversion>4.0.0</modelversion> <groupid>nl.ru.cmbi.mrs</groupid> <artifactid>mrs-ws-client</artifactid> <version>0.0.1-snapshot</version> <name>maarten's Retrieval System Client</name> <dependencies> <!-- tostring --> <dependency> <groupid>commons-lang</groupid> <artifactid>commons-lang</artifactid> <version>2.3</version> </dependency>... </dependencies> <build> <plugins> <plugin> <groupid>commons-lang</groupid> <artifactid>commons-lang</artifactid> <version>2.3</version> </plugin>... </project>

Dependencies Without: With:

Dependencies Declare groupid artifactid version <dependency> <groupid>commons-lang</groupid> <artifactid>commons-lang</artifactid> <version>2.3</version> </dependency> Transitive YourProject needs Hibernate Hibernate needs CGLib YourProject needs CGLib

Dependencies Scope compile (default) runtime required to run <dependency> provided container test only for tests system local library with absolute path <!-- Testing --> <groupid>junit</groupid> <artifactid>junit</artifactid> <version>4.8.1</version> <scope>test</scope> </dependency>

Repositories Maven central http://repo1.maven.org/maven2 GigaBytes of OSS libraries Local repository ${user.home}/.m2/repository Artifacts used by maven and its plugins dependencies for your project produced by your projects Artifacts are automatically downloaded to local repository

Versions Project and dependency versions Release 0.0.1 0.2.1 3.0.1 binaries won't change Snapshot 0.0.1-SNAPSHOT overridden after each build updated on release

Inheritance & Modules Super POM Share settings between projects/modules Sub-modules of parent POM are build in automatic order Incourages modularity & code reuse

Demo Maven mvn scm:bootstrap bootstrap application from revision control using POM mvn clean remove artifacts from previous build mvn install generate sources, compile, test, package, install

Plugins & Reporting Rich ecosystem of plugins Code generation (Groovy, wsdl2java) Static code analysis Javadoc License management Deploy to application server Easy to write your own plugin..

Competitors IDEs Eclipse Netbeans IntelliJ Ant Ant + Ivy, GAnt, Gradle, Buildr Scripting solutions Reuse Maven standards Don't enforce them

Summary One-Step-Build Standardized build Dependency management Release management Reporting Plugins

Repository managers http://nexus.sonatype.org/ Search artifacts Browse repositories Proxy external repositories Host internal repositories Share internal snapshots & releases Alternatively: Artifactory

Demo Nexus Search artifact Search class

Recommendations Department / Company wide install Prevent external downloads Speed up build through caching Facilitates easy sharing

Non-CI development problems Programmers run tests Tests pass, time passes, attention slips Integration problems as work diverges from trunk Bugs can go unnoticed for days/weeks No clean builds

Continuous integration practices Maintain single source repository Automate the build Make build self-testing Everyone commits every day Every commit builds the mainline Keep the build fast Easy access to latest executable Everyone can see progress Automate deployment -- Martin Fowler

Continuous integration Better testing practices Detect errors as quickly as possible Find & revert bugs as they're introduced Better visibility Quality metrics

Solution CI web engine Written in Java Opensource (MIT) and Free Easy to use Lots of plugins Plays well with others http://hudson-ci.org/

Works for Build tools Native Ant, Maven, shell scripts, windows batch Plugin Gant, Grails, Groovy, Jython, Python, Ruby, Phing... Source code management Native CVS, Subversion Plugin Git, Mercurial, Perforce, ClearCase,...

Architecture

Jobs Check out source code Run One-Step-Build Report on result Example: Get latest source from the SCM, build code, generate install packages and run test on several platforms, generate documentation, generate code coverage and code quality reports

Build reports Native JUnit Javadoc FindBugs Plugin CheckStyle Emma PMD Task scanner many more...

External Jobs Run commands outside of Hudson Check exit code for success/failure Report back into Hudson for overview Example Track periodic maintenance builds Run a script to check some status node$ export HUDSON_HOME=http://server.example.com/path/to/hudson/ node$ java -jar hudson.jar "job name" <program> <arg1> <arg2> <...>

Nodes Distribute load Multi-platform testing Speed up build Detects inter build dependencies

Integrations Trac Eclipse NetBeans IntelliJ Sonar

Not just for teams! Hudson is like another team member Eliminates tedious manual tasks Cuts turnaround time Graph / view build results Offers peace of mind

Demo Hudson Create a Job Run Job View statistics

Example Project Overview

Summary 1. Use source code management 2. Automate your builds 3. Setup continuous integration 4. Integrate and test frequently 5. Use code quality metrics

Questions?