Copyright © 2010 Sonatype, Inc. All Rights Reserved.
Abstract
Maven: By Example is an introduction to Apache Maven.
- Copyright
- Foreword: 0.5
- 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
- A. Creative Commons License
- B. Book Revision History
- Index
List of Figures
- 3.1. A Plugin Contains Goals
- 3.2. A Goal Binds to a Phase
- 3.3. Bound Goals are Run when Their Phases Execute
- 3.4. A Maven Project's Coordinates
- 3.5. Maven Space is a coordinate system of projects
- 3.6. Maven Resolves Transitive Dependencies
- 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
List of Examples
- 1.1. A Simple Ant build.xml file
- 1.2. A Sample Maven pom.xml
- 3.1. Simple project's
pom.xmlfile - 4.1. Initial POM for the simple-weather project
- 4.2. POM for the simple-weather project with compiler configuration
- 4.3. Adding Organizational, Legal, and Developer Information to the pom.xml
- 4.4. Adding Dom4J, Jaxen, Velocity, and Log4J as Dependencies
- 4.5. Simple Weather's Weather Model Object
- 4.6. Simple Weather's Main Class
- 4.7. Simple Weather's YahooRetriever Class
- 4.8. Simple Weather's YahooParser Class
- 4.9. Simple Weather's WeatherFormatter Class
- 4.10. Simple Weather's Log4J Configuration File
- 4.11. Simple Weather's Output Velocity Template
- 4.12. Simple Weather's YahooParserTest Unit Test
- 4.13. Simple Weather's WeatherFormatterTest Unit Test
- 4.14. Adding a Test-scoped Dependency
- 4.15. Simple Weather's WeatherFormatterTest Expected Output
- 4.16. Simple Weather's YahooParserTest XML Input
- 4.17. Ignoring Unit Test Failures
- 4.18. Plugin Parameter Expressions
- 4.19. Skipping Unit Tests
- 4.20. Configuring the Maven Assembly Descriptor
- 4.21. Configuring attached Goal Execution during the package Lifecycle Phase
- 5.1. Initial POM for the simple-webapp project
- 5.2. POM for the simple-webapp project with compiler configuration
- 5.3. Configuring the Jetty Plugin
- 5.4. Contents of src/main/webapp/index.jsp
- 5.5. Contents of src/main/webapp/WEB-INF/web.xml
- 5.6. SimpleServlet Class
- 5.7. Mapping the Simple Servlet
- 5.8. Add the Servlet 2.4 Specification as a Dependency
- 5.9. Adding the JSP 2.0 Specification as a Dependency
- 6.1. simple-parent Project POM
- 6.2. simple-weather Module POM
- 6.3. The WeatherService class
- 6.4. simple-webapp Module POM
- 6.5. simple-webapp WeatherServlet
- 6.6. simple-webapp web.xml
- 7.1. simple-parent Project POM
- 7.2. simple-model pom.xml
- 7.3. Annotated Weather Model Object
- 7.4. simple-model's Condition model object.
- 7.5. simple-weather Module POM
- 7.6. WeatherService Class
- 7.7. Spring Application Context for the simple-weather Module
- 7.8. simple-persist POM
- 7.9. simple-persist's WeatherDAO Class
- 7.10. Spring Application Context for simple-persist
- 7.11. simple-persist hibernate.cfg.xml
- 7.12. POM for simple-webapp
- 7.13. simple-webapp WeatherController
- 7.14. weather.vm template rendered by WeatherController
- 7.15. simple-web HistoryController
- 7.16. history.vm rendered by the HistoryController
- 7.17. Spring Controller configuration weather-servlet.xml
- 7.18. web.xml for simple-webapp
- 7.19. POM for simple-command
- 7.20. The Main class for simple-command
- 7.21. WeatherFormatter renders weather data using a Velocity template
- 7.22. The weather.vm Velocity template
- 7.23. The history.vm Velocity template
- 8.1. Final POM for simple-parent
- 8.2. Final POM for simple-command
- 8.3. Final POM for simple-model
- 8.4. Final POM for simple-persist
- 8.5. Final POM for simple-weather
- 8.6. Final POM for simple-webapp
