As developers, we understand that you don't want to spend years reading documentation about your build tool. We get it. You just want to get to work. On the other hand, if you don't take a little bit of time to understand what Maven can do and what it was designed for, there's a good possibility you'll be needlessly reinventing wheels. Take an hour or two and walk through Maven by Example, it's a gentle introduction to Maven and we promise it will save you time. Sonatype maintains two books focused on Maven: an example-driven introduction to Maven, "Maven by Example" and Maven: The Complete Reference. If you already understand how to use Maven and are just looking for a reference, go read the other book.
- Preface
- 1. Introducing Apache Maven
- 2. Installing Maven
- 3. A Simple Maven Project
- 4. Customizing a Maven Project
-
- 4.1. Introduction
- 4.2. Defining the Simple Weather Project
- 4.3. Creating the Simple Weather Project
- 4.4. Customize Project Information
- 4.5. Add New Dependencies
- 4.6. Simple Weather Source Code
- 4.7. Add Resources
- 4.8. Running the Simple Weather Program
- 4.9. Writing Unit Tests
- 4.10. Adding Test-scoped Dependencies
- 4.11. Adding Unit Test Resources
- 4.12. Executing Unit Tests
- 4.13. Building a Packaged Command Line Application
- 5. A Simple Web Application
- 6. A Multi-module Project
- 7. Multi-module Enterprise Project
- 8. Optimizing and Refactoring POMs
- 9. Creative Commons License
- 10. Copyright
List of Figures
- 3.1. A Plugin Contains Goals
- 3.2. A Goal Binds to a Phase
- 3.3. Bound Goals are Run when Phases Execute
- 3.4. A Maven Project’s Coordinates
- 3.5. Maven Space is a Coordinate System of Projects
- 7.1. Multi-module Enterprise Application Module Relationships
- 7.2. Simple Object Model for Weather Data
- 7.3. Spring MVC Controllers Referencing Components in simple-weather and simple-persist.
- 7.4. Command Line Application Referencing simple-weather and simple-persist
- 7.5. Programming to Interface Projects