Maven and Continuum - building an ecosystem for Agile builds and testing

room: Sheraton Hall A, LC — time: Tuesday 14:00-15:30, Tuesday 16:00-17:30
Average Rating: -

Getting a build system right can set the tone of development for years, and yet teams constantly re-invent wheel over and over. The application of a few key tools, such as Maven and Continuum in a sane ecosystem can provide a solid base for project growth and developer sanity, and can encourage the mature use of Agile practices and processes. Well designed automation of building, testing, and reporting can provide invaluable developer ease and fast feedback to developers and and other stakeholders. While most build and automation tools can be coerced into “good behaviour,” Maven and Continuum were developed with a sane life-cycle to start with. When properly configured, they can help shorten builds, reduce waste, manage project complexity, ease developer ramp-up, and reduce the cost of re-configuring project layout, which in turn encourages fearless re-factoring, continual testing, and testable design.

This session is a four part tutorial with an introduction. The introduction will look at principles and ingredients of a sane build infrastructure and its impact on Agile development. Part 1 will work through a Maven 2 multi-project setup, including basic java, web-app, enterprise-app, parent metadata, and packaging project types. It will also cover the basic architecture, lifecycle, and dependency management capabilities of Maven 2. Part 2 will cover Maven-based reports, including code coverage, auto-documentation, etc. Part 3 covers the setup of Continuum 1.1, including import of Maven 2 projects, setting appropriate build schedules, securing multiple projects and users, and generating notifications based on build events. Finally, Part 4 will (optionally) cover advanced subjects, such as non-Java projects in Maven (Adobe Flex and C) and non-Maven (Ant, Make, etc.) projects in Continuum, as well as using Maven 2 Ant tags to provide Ant-driven builds with Maven-driven dependency management. During the sessions, the impact of these tools on Agile practices and processes will be highlighted.

Process/Mechanics

This will be a straight up tutorial. While everything will be projected, attendees will be able to follow along on their own laptops should they wish to. Source and config files for all examples will be available at each step, and the steps will be documented and available after the session in PDF. At each step some limited Q&A will be offered, but most Q&A will be deferred to the end of each of the four parts (Maven 2, Maven reports, Continuum, and Advanced subjects).

This is a formalization of tutorials I have given on-site to clients, and the three hours is aggressive. If appropriate, Parts 1-3 could be given as a three hour (with more time for Q&A) and part 4 could be given as a separate 90 minute advanced session. The timing is somewhat scalable. It can be stretched, which provides more Q&A and more concrete examples, or squeezed, resulting in fewer specific cases and less Q&A. 180 minutes is probably the least you can do without having the attendees need a followup session.

The basic layout of the session is:

Introduction

  • 10 Min: Introduction and discussion of the effects of good and bad builds on developer efficiency, and its second-order effects on things like test execution frequency, fearless refactoring, sufficiency of unit testing, frequency of SCM commits (batching), etc.

Part 1 - Maven 2

  • 15 Min: Basic introduction to Maven 2, including Maven lifecycle, the plugin approach, and one or two simple Maven stand-alone projects. Also covers artifact concept and unique ID (groupId, artifactId, version), as well as packaging type and classifiers and maven repositories.

  • 15 Min: Covers dependency management through metadata, pure-metadata Maven projects (metadata inheritence), multi-project builds through modules, and build order. Actions include specifying custom repositories, adding sub-projects to build, a re-factoring of a project into two sub-projects.

  • 10 Min: Covers several approaches to Maven 2 project layout and adds in more types. Also shows how to lock down build environment

    At this point, a full maven multi-module and multi-type project should be up and buildable.

  • 5 Min: Q&A

  • 10 Min: Break

Part 2 - Maven 2 reports

  • 15 Min: Introduction to Maven 2 “site” plugin, including the basic approach to automatically generating site documentation, configuring basic reports.

  • 15 Min: Configuring additional reports and plugins, adding custom documentation (Almost Plain Text and XDoc) and resources.

  • 5 Min: Q&A

  • 10 Min: Break

Part 3 - Continuum 1.1

  • 5 Min: Introduction to Continuum

  • 10 Min: Setup of Continuum, including key basic tips to a default install and adding users.

  • 10 Min: Adding Maven 2 projects to continuum. Examine build order and dependency evaluation. Setting basic schedules and build definitions for continuous integration.

  • 15 Min: More advanced config. This includes setting alternate schedules for nightly builds, or documentation builds, etc. Also includes some user management and environment management.

    This period can be shortened or omitted if other sections go over-time.

  • 5 Min: Q&A

Part 4 - Advanced Topics

  • 25 Min: Advanced topics can be discussed here, or general questions and answers. Topics can may include expansions on any topic above, or issues like non-java build plugins (Flex and native C are ready examples). Also, using the maven ant plugins to script a build with ant, but still use the maven dependency and repository capabilities.