Mastering Apache Maven 3

Enhance developer productivity and address exact enterprise build requirements by extending Maven

Mastering Apache Maven 3

This ebook is included in a Mapt subscription
Prabath Siriwardena

2 customer reviews
Enhance developer productivity and address exact enterprise build requirements by extending Maven
$0.00
$13.50
$44.99
$29.99p/m after trial
RRP $26.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781783983865
Paperback298 pages

Book Description

Maven is the number one build tool used by developers for more than a decade. Maven stands out among other build tools due to its extremely extensible architecture, which is built on top of the concept "convention over configuration". This has made Maven the de-facto tool used to manage and build Java projects.

This book is a technical guide to the difficult and complex concepts in Maven and build automation. It starts with the core Maven concepts and its architecture, and then explains how to build extensions such as plugins, archetypes, and lifecycles in depth.

This book is a step-by-step guide that shows you how to use Apache Maven in an optimal way to address your enterprise build requirements.

Table of Contents

Chapter 1: Apache Maven Quick Start
A quick introduction
Installing Apache Maven
Configuring the heap size
Monitoring the build
Remote debugging
Convention over configuration
IDE integration
Troubleshooting
Summary
Chapter 2: Demystifying Project Object Model
Project Object Model
The POM hierarchy
Super POM
POM extending and overriding
Maven coordinates
Parent POM file
Managing POM dependencies
Summary
Chapter 3: Maven Configuration
Maven Wagon
Proxy authentication
Secured repositories
Encrypting credentials in settings.xml
Source Control Management systems
Local repository location
Mirrored repositories
Deploying artifacts
Enabling Maven logging
Summary
Chapter 4: Build Lifecycles
Standard lifecycles in Maven
Lifecycle bindings
Building a custom lifecycle
Lifecycle extensions
Summary
Chapter 5: Maven Plugins
Common Maven plugins
Plugin discovery and execution
Plexus
Maven and Dependency Injection
Developing custom plugins
Summary
Chapter 6: Maven Assemblies
The assembly plugin
The assembly descriptor
Artifact/resource filtering

Assembly help
A runnable, standalone Maven project
Summary
Chapter 7: Maven Archetypes
Archetype quickstart
The batch mode
Archetype catalogues
The archetype plugin goals
Maven plugins with the archetype plugin
Java EE web applications with the archetype plugin
Android mobile applications with the archetype plugin
EJB archives with the archetype plugin
JIRA plugins with the archetype plugin
Spring MVC applications with the archetype plugin
Building a custom archetype
Summary
Chapter 8: Maven Repository Management
Maven repositories
The update policy
Multiple repositories
The Maven repository manager
Creating a proxy repository
Creating a virtual repository
Blocking selected artifacts
Inclusive and exclusive routing
Scheduled tasks
Artifact indexing
Nexus plugins
A repository metadata model
Summary
Chapter 9: Best Practices
Dependency management
Defining a parent module
POM properties
Avoiding repetitive groupId and version tags and inherit from the parent POM
Following naming conventions
Maven profiles
Think twice before you write your own plugin
The Maven release plugin
The Maven enforcer plugin
Avoid using un-versioned plugins
Using exclusive and inclusive routes
Avoid having both release and snapshot repositories in the same group repository
Avoid having both proxy and hosted repositories in the same group repository
Minimizing the number of repositories
Using mirrorOf instead of changing repository URLs
Descriptive parent POM files
Documentation is your friend
Avoid overriding the default directory structure
Using SNAPSHOT versioning during development
Get rid of unused dependencies
Avoid keeping credentials in application POM files
Avoid using deprecated references
Avoid repetition – use archetypes
Avoid using maven.test.skip
Share resources – avoid duplicates
Summary

What You Will Learn

  • Apply Maven best practices in designing a build system to improve developer productivity
  • Customize the build process to suit your enterprise needs by developing custom Maven plugins, lifecycles, and archetypes
  • Implement and deploy a Maven repository manager to manage the build process in a better and smoother way
  • Design the build in a way that prevents any maintenance nightmares with proper dependency management
  • Optimize Maven configuration settings
  • Create your own distribution archive using Maven assemblies
  • Build custom Maven lifecycles and lifecycle extensions

Authors

Table of Contents

Chapter 1: Apache Maven Quick Start
A quick introduction
Installing Apache Maven
Configuring the heap size
Monitoring the build
Remote debugging
Convention over configuration
IDE integration
Troubleshooting
Summary
Chapter 2: Demystifying Project Object Model
Project Object Model
The POM hierarchy
Super POM
POM extending and overriding
Maven coordinates
Parent POM file
Managing POM dependencies
Summary
Chapter 3: Maven Configuration
Maven Wagon
Proxy authentication
Secured repositories
Encrypting credentials in settings.xml
Source Control Management systems
Local repository location
Mirrored repositories
Deploying artifacts
Enabling Maven logging
Summary
Chapter 4: Build Lifecycles
Standard lifecycles in Maven
Lifecycle bindings
Building a custom lifecycle
Lifecycle extensions
Summary
Chapter 5: Maven Plugins
Common Maven plugins
Plugin discovery and execution
Plexus
Maven and Dependency Injection
Developing custom plugins
Summary
Chapter 6: Maven Assemblies
The assembly plugin
The assembly descriptor
Artifact/resource filtering

Assembly help
A runnable, standalone Maven project
Summary
Chapter 7: Maven Archetypes
Archetype quickstart
The batch mode
Archetype catalogues
The archetype plugin goals
Maven plugins with the archetype plugin
Java EE web applications with the archetype plugin
Android mobile applications with the archetype plugin
EJB archives with the archetype plugin
JIRA plugins with the archetype plugin
Spring MVC applications with the archetype plugin
Building a custom archetype
Summary
Chapter 8: Maven Repository Management
Maven repositories
The update policy
Multiple repositories
The Maven repository manager
Creating a proxy repository
Creating a virtual repository
Blocking selected artifacts
Inclusive and exclusive routing
Scheduled tasks
Artifact indexing
Nexus plugins
A repository metadata model
Summary
Chapter 9: Best Practices
Dependency management
Defining a parent module
POM properties
Avoiding repetitive groupId and version tags and inherit from the parent POM
Following naming conventions
Maven profiles
Think twice before you write your own plugin
The Maven release plugin
The Maven enforcer plugin
Avoid using un-versioned plugins
Using exclusive and inclusive routes
Avoid having both release and snapshot repositories in the same group repository
Avoid having both proxy and hosted repositories in the same group repository
Minimizing the number of repositories
Using mirrorOf instead of changing repository URLs
Descriptive parent POM files
Documentation is your friend
Avoid overriding the default directory structure
Using SNAPSHOT versioning during development
Get rid of unused dependencies
Avoid keeping credentials in application POM files
Avoid using deprecated references
Avoid repetition – use archetypes
Avoid using maven.test.skip
Share resources – avoid duplicates
Summary

Book Details

ISBN 139781783983865
Paperback298 pages
Read More
From 2 reviews

Read More Reviews

Recommended for You