1. Introducing Apache Maven
1.1 Maven… What is it?
1.2 Convention Over Configuration
1.3 A Common Interface
1.4 Universal Reuse through Maven Plugins
1.5 Conceptual Model of a “Project”
1.6 Is Maven an alternative to XYZ?
1.7 Comparing Maven with Ant
2. Installing Maven
2.1 Verify your Java Installation
2.2 Downloading Maven
2.3 Downloading Maven 2
2.4 Downloading Maven 3
2.5 Installing Maven
2.6 Installing Maven on Mac OSX
2.7 Installing Maven on Microsoft Windows
2.8 Installing Maven on Linux
2.9 Installing Maven on FreeBSD or OpenBSD
2.10 Testing a Maven Installation
2.11 Maven Installation Details
2.12 User-specific Configuration and Repository
2.13 Upgrading a Maven Installation
2.14 Upgrading from Maven 1.x to Maven 2.x
2.15 Uninstalling Maven
2.16 Getting Help with Maven
3. The Project Object Model
3.1 Introduction
3.2 The POM
3.3 The Super POM
3.4 The Simplest POM
3.5 The Effective POM
3.6 Real POMs
3.7 POM Syntax
3.8 Project Versions
3.9 Property References
3.10 Project Dependencies
3.11 Dependency Scope
3.12 Optional Dependencies
3.13 DependencyVersionRanges
3.14 Transitive Dependencies
3.15 Conflict Resolution
3.16 Project Relationships
3.17 More on Coordinates
3.18 Project Inheritance
3.19 POM Best Practices
3.20 Grouping Dependencies
3.21 Multi-module vs. Inheritance
4. The Build Lifecycle
4.1 Introduction
4.2 Clean Lifecycle (clean)
4.3 Default Lifecycle (default)
4.4 Site Lifecycle (site)
4.5 Package-specific Lifecycles
4.6 JAR
4.7 POM
4.8 Maven Plugin
4.9 EJB
4.10 WAR
4.11 EAR
4.12 Other Packaging Types
4.13 Common Lifecycle Goals
4.14 Process Resources
4.15 Compile
4.16 Process Test Resources
4.17 Test Compile
4.18 Test
4.19 Install
4.20 Deploy
5. Build Profiles
5.1 What Are They For?
5.2 What is Build Portability
5.3 Selecting an Appropriate Level of Portability
5.4 Portability through Maven Profiles
5.5 Overriding a Project Object Model
5.6 Profile Activation
5.7 Activation Configuration
5.8 Activation by the Absence of a Property
5.9 Listing Active Profiles
5.10 Tips and Tricks
5.11 Common Environments
5.12 Protecting Secrets
5.13 Platform Classifiers
6. Running Maven
6.1 Maven Command Line Options
6.2 Defining Properties
6.3 Getting Help
6.4 Using Build Profiles
6.5 Displaying Version Information
6.6 Running in Offline Mode
6.7 Using a Custom POM or Custom Settings File
6.8 Encrypting Passwords
6.9 Dealing with Failure
6.10 Controlling Maven’s Verbosity
6.11 Running Maven in Batch Mode
6.12 Downloading and Verifying Dependencies
6.13 Non-recursive Builds
6.14 Using Advanced Reactor Options
6.15 Advanced Reactor Options Example Project
6.16 Resuming Builds
6.17 Specifying a Subset of Projects
6.18 Making a Subset of Projects
6.19 Making Project Dependents
6.20 Resuming a “make” build
6.21 Using the Maven Help Plugin
6.22 Describing a Maven Plugin
7. Maven Configuration
7.1 Configuring Maven Plugins
7.2 Plugin Configuration Parameters
7.3 Adding Plugin Dependencies
7.4 Setting Global Plugin Parameters
7.5 Setting Execution Specific Parameters
7.6 Setting Default Command Line Execution Parameters
7.7 Setting Parameters for Goals Bound to Default Lifecycle
8. Maven Assemblies
8.1 Introduction
8.2 Assembly Basics
8.3 Predefined Assembly Descriptors
8.4 Building an Assembly
8.5 Assemblies as Dependencies
8.6 Assembling Assemblies via Assembly Dependencies
8.7 Overview of the Assembly Descriptor
8.8 The Assembly Descriptor
8.9 Property References in Assembly Descriptors
8.10 Required Assembly Information
8.11 Controlling the Contents of an Assembly
8.12 Files Section
8.13 FileSets Section
8.14 Default Exclusion Patterns for
8.15 dependencySets Section
8.16 moduleSets Sections
8.17 Repositories Section
8.18 Managing the Assembly’s Root Directory
8.19 componentDescriptors and
8.20 Best Practices
8.21 Standard, Reusable Assembly Descriptors
8.22 Distribution (Aggregating) Assemblies
9. Properties and Resource Filtering
9.1 Introduction
9.2 Maven Properties
9.3 Maven Project Properties
9.4 Maven Settings Properties
9.5 Environment Variable Properties
9.6 Java System Properties
9.7 User-defined Properties
9.8 Resource Filtering
10. Site Generation
10.1 Introduction
10.2 Building a Project Site with Maven
10.3 Customizing the Site Descriptor
10.4 Customizing the Header Graphics
10.5 Customizing the Navigation Menu
10.6 Site Directory Structure
10.7 Writing Project Documentation
10.8 APT Example
10.9 FML Example
10.10 Deploying Your Project Website
10.11 Configuring Server Authentication
10.12 Configuring File and Directory Modes
10.13 Customizing Site Appearance
10.14 Customizing the Site CSS
10.15 Create a Custom Site Template
10.16 Reusable Website Skins
10.17 Creating a Custom Theme CSS
10.18 Tips and Tricks
10.19 Inject XHTML into HEAD
10.20 Add Links under Your Site Logo
10.21 Add Breadcrumbs to Your Site
10.22 Add the Project Version
10.23 Modify the Publication Date Format and Location
10.24 Using Doxia Macros
11. Writing Plugins
11.1 Introduction
11.2 Programming Maven
11.3 What is Inversion of Control?
11.4 Introduction to Plexus
11.5 Why Plexus?
11.6 What is a Plugin?
11.7 Plugin Descriptor
11.8 Top-level Plugin Descriptor Elements
11.9 Mojo Configuration
11.10 Plugin Dependencies
11.11 Writing a Custom Plugin
11.12 Creating a Plugin Project
11.13 A Simple Java Mojo
11.14 Configuring a Plugin Prefix
11.15 Logging from a Plugin
11.16 Mojo Class Annotations
11.17 When a Mojo Fails
11.18 Mojo Parameters
11.19 Supplying Values for Mojo Parameters
11.20 Multi-valued Mojo Parameters
11.21 Depending on Plexus Components
11.22 Mojo Parameter Annotations
11.23 Plugins and the Maven Lifecycle
11.24 Executing a Parallel Lifecycle
11.25 Creating a Custom Lifecycle
11.26 Overriding the Default Lifecycle
12. Using Maven Archetypes
12.1 Introduction to Maven Archetypes
12.2 Using Archetypes
12.3 Using an Archetype from the Command Line
12.4 Using the Interactive generate Goal
12.5 Using an Archetype from m2eclipse
12.6 Available Archetypes
12.7 Common Maven Archetypes
12.8 Notable Third-Party Archetypes
12.9 Publishing Archetypes
13. Developing with Flexmojos
13.1 Introduction
13.2 Configuring Build Environment for Flexmojos
13.3 Referencing a Repository with the Flex Framework
13.4 Configure a Flexmojos Proxy Repository in Nexus
13.5 Configuring Environment to Support Flex Unit Tests
13.6 Adding FlexMojos to Your Maven Settings’ Plugin Groups
13.7 Creating a Flex Mojos Project from an Archetype
13.8 Creating a Flex Library
13.9 Creating a Flex Application
13.10 Creating a Multi-module Project: Web Application with a Flex
13.11 The FlexMojos Lifecycle
13.12 The SWC Lifecycle
13.13 The SWF Lifecycle
13.14 FlexMojos Plugin Goals
13.15 Generating Actionscript Documentation
13.16 Compiling Flex Source
13.17 Generating Flex Builder Project Files
13.18 FlexMojos Plugin Reports
13.19 Generating Actionscript Documentation Report
13.20 Developing and Customizing Flexmojos
13.21 Get the Flexmojos Source Code
14. Android Application Development with Maven
14.1 Introduction
14.2 Configuring Build Environment for Android Development
14.3 Installing the Android SDK
14.4 Android artifact install into Maven repository
14.5 Getting Started
14.6 Creating New Projects with the Android Maven Archetypes
14.7 Using Add-Ons
14.8 Multi Module Android Projects
14.9 Using external dependencies
14.10 The Custom Lifecycle from the Android Maven Plugin
14.11 Plugin Configuration Parameters
14.12 Device Interaction
14.13 Emulator Interaction
14.14 Other Useful Android Maven Plugin Goals
14.15 Manifest-update
14.16 Zipalign
14.17 Help
14.18 Internal Android Maven Plugin Goals
14.19 Testing Android Application Code
14.20 Unit tests
14.21 Instrumentation tests
14.22 Native Application Builds
14.23 Tips and Tricks
14.24 Other Maven Plugins
14.25 Performing a Release Build
14.26 Configuring command line usage