Book Details

About This Book

Follow a sample application which will help you to get started quickly with Apache Maven

Learn how to use Apache Archiva - an extensible repository manager - with Maven to take care of your build artifact repository

Leverage the power of Continuum - Apache's continuous integration and build server - to improve the quality and maintain the consistency of your build

Guidance on how to use Maven in a team environment to maximise its potential

Who This Book Is For

This book is for Java developers who want to get started with Apache Maven. If you are tasked with build automation in your company, this book will help you to quickly and easily get started with Maven in order to improve the efficiency of your builds.

Table of Contents

Chapter 1: Maven in a Nutshell

A whirlwind tour

Summary

Chapter 2: Staying in Control with Archiva

Importance of a repository manager

Installing Archiva

Separating your repositories

Hooking up Maven with Archiva

Searching for artifacts in Archiva

Deploying from Maven

Deploying via web form

Summary

Chapter 3: Building an Application Using Maven

Introducing the sample project

Setting up a multi-module build

Creating an organization POM

Configuring basic reports

Preparing for non-code modules

Adding a documentation module

Distributing the application

Summary

Chapter 4: Application Testing with Maven

Types of testing in Maven

Working with tests

Integration, functional, and other testing

Summary

Chapter 5: Reporting and Checks

Review: Example application

Constructing the developer's site

Maven reports

Setting up quality checks

Reporting and quality tools

Reporting best practices

Tying it all together

Summary

Chapter 6: Useful Maven Plugins

The Remote Resources plugin

The Build Number plugin

The Shade plugin

The Build Helper plugin

The AntRun plugin and scripting languages

The Exec plugin

Summary

Chapter 7: Maven Best Practices

Preparing the development environment

Keeping it simple

Build portability

Build reproducibility

Summary

Chapter 8: Continuum: Ensuring the Health of your Source Code

Knowing when your build breaks

Setting up Continuum

Using Continuum

Summary

Chapter 9: Continuum in Depth

Releasing projects

Build pipelining and multiple build definitions

Parallel builds

Distributed builds

Maintenance

Summary

Chapter 10: Archiva in a Team

Roles and permissions

Introducing repository groups

RSS feeds—discovering new artifacts in your repository

Deleting artifacts in your repository

The Archiva reports

The Archiva consumers

Summary

Chapter 11: Archetypes

What are Maven archetypes?

Generating projects

Common archetypes

Writing a new archetype

Managing catalogs

Summary

Chapter 12: Maven, Archiva, and Continuum in the Enterprise

Configuring security

Interfacing with other tools in the enterprise

Summary

What You Will Learn

Install Apache Maven and follow the sample application to build up your project as quickly as possible

Use Maven's report and checking tools to ensure the health of your projects

Explore Apache Continuum which will help you to ensure the health of your source code

Improve your team builds with the powerful combination of Maven, Archiva and Continuum

Install and run the repository manager Apache Archiva

In Detail

By building up a sample application, this book guides developers painlessly through building a project with Maven. This book shows you how to combine Maven with Continuum and Archiva, which will allow you to build an efficient, secure application and make developing in a team easy.

You may already be aware of the pitfalls of 'integration hell' caused by changed code being submitted to repositories by a number of developers. When you implement Continuum in your build, you can easily perform continuous integration, avoiding timely rework and reducing cost and valuable time. You will be able to use Maven more efficiently in a team after you learn how to set up Archiva, Apache's repository manager.

It's easy to quickly get to work with Maven and get the most out of its related tools when you follow the sequential coverage of the sample application in this book. A focus on team environments ensures that you will avoid the pitfalls that are all too common when working in a team. Soon, by learning the best practices of working with Maven, you will have built an effective, secure Java application.

Authors

Brett Porter

Brett Porter is a software developer from Sydney, Australia with a passion for development tooling, and automation. Seeking a more standardized and reproducible solution to organize, build, and deploy a number of software projects across teams, he discovered an early beta of Maven 1.0 in 2003, and has been heavily involved in the development of the project since. He is a member of the Apache Maven Project Management Committee, and has conducted presentations and training on Maven and related tooling at several conferences and events. He founded the Archiva project in 2005. Brett is also a member of the Apache Software Foundation.

Brett is currently VP, Product Development at G2iX, in charge of the Maestro division. He and his team seek to make developers more efficient by offering support and services for development and automation tools including Apache Maven, Apache Continuum, Apache Archiva, and Selenium.

Brett was co-author of the book Better Builds with Maven, the first book to be written about the Maven 2.0 release in 2005, and has been involved in reviewing Maven: A Developer's Notebook and Java Power Tools.

Maria Odea Ching

Maria Ching grew up in a small town called Daet, then moved to Manila when she went to college. She took up Computer Studies at De La Salle University and graduated in 2005. She started using open source tools from her first job after graduating and from then on, got interested in everything open source. When she came to work for Exist, she got assigned in a project doing a lot of development work in open source projects, specifically Maven, Continuum, and Archiva. Back then, Continuum and Archiva (formerly named Maven Repository Manager) were still sub-projects of Maven. Eventually, she became a committer, then a PMC member of Maven. In 2008, Continuum and Archiva became top-level projects at the ASF and Deng was elected as PMC Chair of Archiva. She is still currently serving as PMC Chair of the project and as PMC members of Continuum and Maven.

Alerts & Offers

Series & Level

We understand your time is important. Uniquely amongst the major publishers, we seek to develop and publish the broadest range of learning and information products on each technology. Every Packt product delivers a specific learning pathway, broadly defined by the Series type. This structured approach enables you to select the pathway which best suits your knowledge level, learning style and task objectives.

Learning

As a new user, these step-by-step tutorial guides will give you all the practical skills necessary to become competent and efficient.

Beginner's Guide

Friendly, informal tutorials that provide a practical introduction using examples, activities, and challenges.

Essentials

Fast paced, concentrated introductions showing the quickest way to put the tool to work in the real world.

Cookbook

A collection of practical self-contained recipes that all users of the technology will find useful for building more powerful and reliable systems.

Blueprints

Guides you through the most common types of project you'll encounter, giving you end-to-end guidance on how to build your specific solution quickly and reliably.

Mastering

Take your skills to the next level with advanced tutorials that will give you confidence to master the tool's most powerful features.

Starting

Accessible to readers adopting the topic, these titles get you into the tool or technology so that you can become an effective user.

Progressing

Building on core skills you already have, these titles share solutions and expertise so you become a highly productive power user.