Copyright © 2010 Sonatype. All Rights Reserved.
Abstract
Maven: The Complete Reference is a book about Apache Maven.
- Copyright
- Foreword: 0.6
- Preface
- 1. Introducing Apache Maven
- 2. Installing Maven
- 3. The Project Object Model
- 4. The Build Lifecycle
- 5. Build Profiles
- 6. Running Maven
-
- 6.1. Maven Command Line Options
-
- 6.1.1. Defining Properties
- 6.1.2. Getting Help
- 6.1.3. Using Build Profiles
- 6.1.4. Displaying Version Information
- 6.1.5. Running in Offline Mode
- 6.1.6. Using a Custom POM or Custom Settings File
- 6.1.7. Encrypting Passwords
- 6.1.8. Dealing with Failure
- 6.1.9. Controlling Maven's Verbosity
- 6.1.10. Running Maven in Batch Mode
- 6.1.11. Downloading and Verifying Dependencies
- 6.1.12. Controlling Plugin Updates
- 6.1.13. Non-recursive Builds
- 6.2. Using Advanced Reactor Options
- 6.3. Using the Maven Help Plugin
- 7. Maven Configuration
- 8. Maven Assemblies
-
- 8.1. Introduction
- 8.2. Assembly Basics
- 8.3. Overview of the Assembly Descriptor
- 8.4. The Assembly Descriptor
- 8.5. Controlling the Contents of an Assembly
-
- 8.5.1.
FilesSection - 8.5.2.
FileSetsSection - 8.5.3. Default Exclusion Patterns for
fileSets - 8.5.4.
dependencySetsSection -
- 8.5.4.1. Customizing Dependency Output Location
- 8.5.4.2. Interpolation of Properties in Dependency Output Location
- 8.5.4.3. Including and Excluding Dependencies by Scope
- 8.5.4.4. Fine Tuning: Dependency Includes and Excludes
- 8.5.4.5. Transitive Dependencies, Project Attachments, and Project Artifacts
- 8.5.4.6. Advanced Unpacking Options
- 8.5.4.7. Summarizing Dependency Sets
- 8.5.5.
moduleSetsSections - 8.5.6. Repositories Section
- 8.5.7. Managing the Assembly’s Root Directory
- 8.5.8.
componentDescriptorsandcontainerDescriptorHandlers
- 8.5.1.
- 8.6. Best Practices
- 8.7. Summary
- 9. Properties and Resource Filtering
- 10. Site Generation
- 11. Writing Plugins
- 12. Using Maven Archetypes
- 13. Developing with Flexmojos
-
- 13.1. Introduction
- 13.2. Configuring Build Environment for Flexmojos
- 13.3. Creating a Flex Mojos Project from an Archetype
- 13.4. The FlexMojos Lifecycle
- 13.5. FlexMojos Plugin Goals
- 13.6. FlexMojos Plugin Reports
- 13.7. Developing and Customizing Flexmojos
- 14. Android Application Development with Maven
- A. Appendix: Settings Details
- B. Appendix: Sun Specification Alternatives
- C. Creative Commons License
- D. Book Revision History
- Index
List of Figures
- 3.1. The Project Object Model
- 3.2. The Super POM is always the base Parent
- 3.3. Project Inheritance for a-parent and project-a
- 3.4. maven-book Multi-module vs. Inheritance
- 3.5. Enterprise Multi-module vs. Inheritance
- 6.1. Directory Structure of Sample Multi-module Project
- 6.2. Dependencies within Sample Multi-module Project
- 10.1. Simple Generated Maven Site
- 10.2. Customized Sample Project Web Site
- 13.1. Adding a Proxy Repository to Sonatype Nexus
- 13.2. Configuring the Sonatype Flexmojos Proxy Repository
- 13.3. Adding the Sonatype Flexmojos Proxy to the Public Repositories Group
- 13.4. Flexmojo Library Archetype File Structure
- 13.5. Directory Structure for Flex Application Archetype
- 13.6. Directory Structure for Flex Multimodule Archetype
- 13.7. The FlexMojos SWC Lifecycle
- 13.8. The FlexMojos SWF Lifecycle
- 13.9. Actionscript Documentation Generated by the FlexMojos Plugin
- 13.10. Actionscript Documentation Report on Maven Site
- 13.11. Flexmojos Subversion Repository
- A.1. Storing Unencrypted Passwords in Maven Settings
- A.2. Storing Encrypted Passwords in Maven Settings
List of Examples
- 1.1. A Simple Ant build.xml file
- 1.2. A Sample Maven pom.xml
- 3.1. The Super POM
- 3.2. The Simplest POM
- 3.3. Project Dependencies
- 3.4. Declaring Optional Dependencies
- 3.5. Specifying a Dependency Range: JUnit 3.8 - JUnit 4.0
- 3.6. Specifying a Dependency Range: JUnit <= 3.8.1
- 3.7. Excluding a Transitive Dependency
- 3.8. Excluding and Replacing a Transitive Dependency
- 3.9. Defining Dependency Versions in a Top-level POM
- 3.10. Project Inheritance
- 3.11. Consolidating Dependencies in a Single POM Project
- 3.12. Declaring a Dependency on a POM
- 4.1. Triggering a Goal on pre-clean
- 4.2. Customizing Behavior of the Clean Plugin
- 4.3. Custom Packaging Type for Adobe Flex (SWF)
- 4.4. Using Properties in Project Resources
- 4.5. default.properties in src/main/filters
- 4.6. Filter Resources (Replacing Properties)
- 4.7. Configuring Additional Resource Directories
- 4.8. Filtering Script Resources
- 4.9. Setting the Source and Target Versions for the Compiler Plugin
- 4.10. Overriding the Default Source Directory
- 4.11. Overriding the Location of Test Source and Output
- 4.12. Configuring Surefire to Ignore Test Failures
- 5.1. Using a Maven Profile to Override Production Compiler Settings
- 5.2. Elements Allowed in a Profile
- 5.3. Dynamic Inclusion of Submodules Using Profile Activation
- 5.4. Profile Activation Parameters: JDK Version, OS Parameters, and Properties
- 5.5. Activating Profiles in the Absence of a Property
- 5.6. Project Profile Activated by setting environment.type to 'dev'
- 5.7. Storing Secrets in a User-specific Settings Profile
- 5.8. Qualifying Artifacts with Platform Activated Project Profiles
- 5.9. Qualifying Artifacts with Platform Activated Project Profiles and Variable Substitution
- 5.10. Depending on a Qualified Artifact
- 6.1. Maven Version Information
- 6.2. Order of Project Builds in Maven Reactor
- 7.1. Adding Dependencies to a Plugin
- Configuring a Maven Plugin
- 7.3. Setting Configuration Parameters in an Execution
- Configuring Plugin Parameters for Command Line Execution
- Setting a Parameter for a Default Goal Execution
- 7.6. Setting Two Default Goal Plugin Configuration Parameters
- 8.1. Assembly Descriptor for Executable JAR
- 8.2. Configuring the project assembly in top-level POM
- 8.3. Activating the Assembly Plugin Configuration in Child Projects
- 8.4. POM for the Assembly Bundling Project
- 8.5. Required Assembly Descriptor Elements
- 8.6. Including a JAR file in an Assembly using
files - 8.7. Including Files with
fileSet - 8.8. Definition of Default Exclusion Patterns from Plexus Utils
- 8.9. Defining Dependency Sets Using Scope
- 8.10. Using Dependency Excludes and Includes in
dependencySets - 8.11. Excluding Files from a Dependency Unpack
- 8.12. Includes and Excluding Modules with a
moduleSet - 8.13. Including JavaDoc from Modules in an Assembly
- 8.14. Including Module Artifacts and Dependencies in an Assembly
- 9.1. User-defined Properties in a POM
- 9.2. User-defined Properties in a Profile in a POM
- 9.3. Referencing Maven Properties from a Resource
- 9.4. Defining Variables and Activating Resource Filtering
- 10.1. An Initial Site Descriptor
- 10.2. Adding a Banner Left and Banner Right to Site Descriptor
- 10.3. Creating Menu Items in a Site Descriptor
- 10.4. Adding a Link to the Site Menu
- 10.5. APT Document
- 10.6. FAQ Markup Language Document
- 10.7. Configuring Site Deployment
- 10.8. Storing Server Authentication in User-specific Settings
- 10.9. Configuring File and Directory Modes on Remote Servers
- 10.10. Customizing the Page Template in a Project's POM
- 10.11. Adding a Menu Item to a Site Descriptor
- 10.12. Configuring a Custom Site Skin in Site Descriptor
- 10.13. Injecting HTML into the HEAD element
- 10.14. Adding Links Under Your Site Logo
- 10.15. Configuring the Site's Breadcrumbs
- 10.16. Positioning the Version Information
- 10.17. Positioning the Publish Date
- 10.18. Configuring the Publish Date Format
- 10.19. Output of the Snippet Macro in XHTML
- 11.1. Plugin Descriptor
- 11.2. A Plugin Project's POM
- 11.3. A Simple EchoMojo
- 11.4. Maven Metadata for the Maven Plugin Group
- 11.5. Customizing the Plugin Groups in Maven Settings
- 11.6. Configuring a Plugin Prefix
- 11.7. A Plugin with Multi-valued Parameters
- 11.8. Depending on a Plexus Component
- 11.9. Define a Custom Lifecycle in lifecycles.xml
- 11.10. Forking a Custom Lifecycle from a Mojo
- 11.11. Overriding the Default Lifecycle
- 11.12. Configuring a Plugin as an Extension
- 12.1. Archetype Catalog for the Apache Cocoon Project
- 13.1. Adding a Reference to Sonatype's FlexMojos Repository in a POM
- 13.2. Settings XML for Local Nexus Instance
- 13.3. Adding Sonatype Plugins to Maven Settings
- 13.4. Project Object Model for Flex Library Archetype
- 13.5. Flex Library Archetype's Sample App Class
- 13.6. Unit Test for Library Archetype's App Class
- 13.7. POM for Flex Application Archetype
- 13.8. Sample Application Main.mxml
- 13.9. Unit Test for Main.mxml
- 13.10. Top-level POM Created by Modular Web Application Archetype
- 13.11. swc Module POM
- 13.12. swf module POM
- 13.13. war module POM
- 13.14. Setting Plugin Extensions to True for Custom Flex Lifecycle
- 13.15. Customizing the Compiler Plugin
- 13.16. Configuring the Actionscript Documentation Report
- 13.17. Configuring the asdoc-report
- 14.1. Snippet for settings.xml for the repository server access credentials
- 14.2. Snippet for settings.xml to enable short plugin name usage
- 14.3. The HelloFlashlight pom.xml file
- 14.4. Adding the test folder to the build configuration
- 14.5. The dependency to the Google Maps API
- A.1. Overview of top-level elements in settings.xml
- A.2. Simple top-level elements in settings.xml
- A.3. Server configuration in settings.xml
- A.4. Mirror configuration in settings.xml
- A.5. Proxy configuration in settings.xml
- A.6. Defining Activation Parameters in settings.xml
- A.7. Setting the ${user.install} property in settings.xml
- A.8. Repository Configuration in settings.xml
- A.9. Plugin Repositories in settings.xml
- A.10. Setting active profiles in settings.xml
- A.11. settings-security.xml with Master Password
- A.12. Storing an Encrypted Password in Maven Settings (~/.m2/settings.xml)
- A.13. Configuring Relocation of the Master Password
- B.1. Adding JTA 1.0.1B to a Maven Project
