Maven 3 in practice
Application requirements need to become clear, maintainable code. Use Maven to structure your development approach and connect technical decisions to expected behaviour. Strengthen your ability to design, test and evolve applications independently.
- Duration
- 3 days 21 hours
- Code
- MAV01FR Code
Presentation
Maven is open-source software for managing the entire lifecycle of a Java project, from creation to implementation and automation. This course teaches the concepts and tools of Maven 3. Practical exercises give you a concrete understanding of how Maven supports the creation and development of J2EE projects.
Objectives
- Understand Maven 3 fundamentals.
- Quickly create, read and understand any Maven 3 pom.xml file.
- Create a project skeleton from Maven templates and archetypes.
- Add an external dependency to your project.
- Create multi-module Maven 3 applications.
- Use dependencyManagement and pluginManagement elements.
- Automate recurring tasks such as compilation, testing and deployment.
- Master inheritance and application composition concepts.
- Apply Maven best practices, including centralising version and dependency properties.
- Implement Maven resource filtering.
Program
Introduction to the concepts
- Introduction.
- Build tool fundamentals.
- Build tools and continuous integration.
- Ant versus Maven.
- Maven versus Gradle.
- Why use Maven in a development project?
- Installing Maven and good practices.
- Demonstration: Hello Maven!
- Summary.
- Lab: installing and configuring Maven with Vagrant to create a virtual development environment.
Maven structure
- Introduction.
- Directory structure.
- The Maven POM model and coordinates.
- Maven dependencies.
- The super POM and Maven inheritance mechanisms.
- Goals.
- Demonstration.
- Maven repositories.
- Local .m2/repository directory structure.
- Defaults.
- Demonstration: the build section.
- Summary.
- Quiz and labs.
Maven dependencies
- Introduction.
- Dependencies.
- Versions.
- Package types.
- Understanding Maven phases, goals and lifecycles.
- Transitive dependencies.
- Scopes: compile, provided, runtime, test, system and import.
- Demonstration.
- dependencyManagement elements.
- Summary.
- Quiz and labs.
Maven repositories
- Introduction.
- What is a repository?
- Repositories.
- Adding a repository.
- Demonstration.
- Plugin repositories.
- Releases and snapshots.
- Summary.
- Quiz and labs.
Maven plugins
- Introduction.
- Goals and phases.
- Configuring a plugin.
- The compiler plugin.
- The jar plugin.
- Demonstration.
- The source plugin.
- The Javadoc plugin.
- The site plugin and Maven sites.
- Developing your own plugin.
- Summary.
- Quiz and labs.
Maven profiles
- What Maven profiles are and why they matter.
- Configuring and implementing Maven profiles.
- Resource filtering.
- Maven best practices.
- Summary.
- Quiz and labs.
Archetypes and assemblies
- Definition and range of available archetypes.
- Generating deliverables on demand.
- Configuration management in Maven.
- Communicating with a source control system.
- Building a deliverable and understanding prerequisites.
- Summary.
- Quiz and labs.
Maven integration with Eclipse STS
- Introduction.
- Integration with Spring STS.
- Installation and configuration.
- Demonstration: installation.
- Importing projects.
- Demonstration.
- The POM viewer.
- The Dependencies Viewer.
- The Dependency Hierarchy Viewer.
- Demonstration.
- Debugging POMs.
- Quiz and labs.
Running tests
- Organising Maven for integration and functional testing.
- Debugging tests in Eclipse.
- Integration tests with a web application started by Maven.
- Quiz and labs.
Advanced topics
- Repository managers.
- Integrating Maven 3 with the Nexus repository.
- Integration with other Agile tools.
- Quiz and demonstrations.
Audience
This course is for application developers and project managers.
Prerequisites
Knowledge of Java and JEE is an advantage for this course.
Teaching and assessment methods
- Initial skills assessment
- Training materials provided to participants
- Continuous assessment throughout the course
- End-of-course feedback questionnaire
- Combination of theory and practical application
- Attendance records
- Post-course follow-up evaluation
Dates and sessions
Choose the date and delivery format that suit you.
No upcoming sessions are currently available.
fr
en