Apache Maven: Beginner to Guru

Video description

Take your Java application development skills to the next level by mastering Apache Maven concepts

About This Video

  • Find out why Apache Maven is an excellent choice as a Java build tool
  • Learn how to create Apache Maven projects from scratch
  • Discover how to use Maven with popular alternative Java Virtual Machine (JVM) languages, such as Groovy, Kotlin, and Scala

In Detail

Apache Maven is the most popular Java build tool used by over 70% of the Java organizations. Do you want to gain knowledge of Apache Maven to manage your Java applications successfully? This course will help you to develop Apache Maven skills and show you the best practices to build, test, manage, and deploy Java projects.

The course starts with an introduction to Apache Maven, explaining the installation process and highlighting its uses in the real-world. Next, you will use Maven to build and package Java projects and to run unit and integration tests written in JUnit, TestNG, and Spock. Moving along, you will generate source code from the Extensible Markup Language (XML) and JavaScript Object Notation (JSON) schemas and get to grips with the concepts of the Apache Maven plug-in. Next, you will build the Spring Boot applications with Apache Maven and learn the techniques to improve the code quality. Later, you will develop multi-module Maven projects, deploy project artifacts to Maven repositories, and learn how to use Maven build profiles. Finally, you will use the Maven release plug-in to perform releases and discover enterprise dependency management using Bills of Materials (BOMs).

By the end of this course, you will have gained the essential Apache Maven skills needed to build, test, manage, and deploy Java applications.

Who this book is for

This course is for Java developers, DevOps engineers, technical managers, and Quality assurance (QA) engineers, who are looking to build, test, manage, and deploy Java applications using Apache Maven. Basic knowledge of Java programming is needed to get started with this course.

Publisher resources

Download Example Code

Table of contents

  1. Chapter 1 : Apache Maven Introduction
    1. Welcome to Apache Maven - Beginner to Guru Course
    2. Meeting Your Instructor
    3. Getting the Most out of this Course
    4. Why Use Apache Maven?
  2. Chapter 2 : Getting Started
    1. Introduction
    2. System Requirements
    3. Environment Verification
    4. Conclusion
  3. Chapter 3 : Compiling Java
    1. Introduction
    2. Reviewing of Java Compile and Packaging
    3. Hello World – Java Command Line
    4. Creating the Java jar Files From the Command Line
    5. Using Third-party Jars with the Command Line in Java
    6. Conclusion
  4. Chapter 4 : Getting Started with Maven
    1. Introduction
    2. Compiling and Packaging with Maven
    3. Including Dependencies with Maven
    4. Creating a New Maven Project with IntelliJ
    5. Assignment - Adding StringUtils Dependency to a Project
    6. Assignment Review - Adding StringUtils Dependency to a Project
  5. Chapter 5 : Maven Basics
    1. Introduction
    2. Maven Coordinates
    3. Maven Repositories
    4. Maven Wagon
    5. Maven Project Object Model
    6. Maven Dependencies
    7. Maven Standard Directory Layout
    8. Maven Build Lifecycles
    9. Maven Wrapper
    10. Maven Archetypes
    11. Conclusion
  6. Chapter 6 : Common Maven Plug-ins
    1. Introduction
    2. Overview Maven Lifecycle Plug-ins
    3. Maven Clean Plug-in
    4. Maven Compiler Plug-in
    5. Maven Resources Plug-in
    6. Maven Surefire Plug-in
    7. Maven Jar Plug-in
    8. Maven Deploy Plug-in
    9. Maven Site Plug-in
    10. Maven and Source Control
    11. Other Maven Plug-ins
    12. Common Maven Commands and Cheat Sheet
    13. Conclusion
  7. Chapter 7 : Generating Source with Maven
    1. Introduction
    2. XML Schema Definition (XSD) to Java with Maven
    3. Assignment – Cleaning the JAXB Project Automatically
    4. Assignment Review - Cleaning the JAXB Project Automatically
    5. Using Maven to Generate Java Classes from the JavaScript Object Notation (JSON) Schema
    6. Challenge - Creating a Lombok Project with Maven
    7. Generating Java Classes with Project Lombok and Maven
    8. Challenge – Creating a MapStruct Project with Maven
    9. Generating Java Classes with MapStruct and Maven
    10. Conclusion
  8. Chapter 8 : Alternate JVM Languages
    1. Introduction
    2. Overview of Alternate JVM Languages with Maven
    3. Compiling Groovy with Maven
    4. Compiling Kotlin with Maven
    5. Compiling Scala with Maven
    6. Conclusion
  9. Chapter 9 : Testing with Maven
    1. Introduction
    2. Overview of Testing with Maven
    3. Using Maven Surefire for the Plain Old Java Object (POJO) Unit Tests
    4. Using Maven Surefire for JUnit 4 Unit Tests
    5. Using Maven Surefire for JUnit 5 Unit Tests
    6. Using Maven Surefire for JUnit 4 and JUnit 5 Tests
    7. Assignment: Adding Groovy and JUnit 4 Support to a Maven Project
    8. Assignment Review
    9. Using Maven Surefire for Spock Tests
    10. Challenge: Use JUnit 5 with Spock
    11. Using Spock with JUnit 5
    12. Using Maven Surefire for TestNG Unit Tests
    13. Generating Test Reports with Maven
    14. Running Integration Tests with Maven Failsafe
    15. Code Coverage with JaCoCo
    16. Maven SpotBugs Report
    17. Setting a Maven Version in IntelliJ
    18. Assignment - Fixing a Broken Maven Project
    19. Assignment Review
    20. Skipping the Unit and Integration Tests in Maven
    21. Conclusion
  10. Chapter 10 : Multi-Module Projects
    1. Introduction
    2. Overview of Multi-Module Projects
    3. Creating a Parent Project
    4. Creating a Project Module for Entities
    5. Using IntelliJ to Create a New Maven Module
    6. Assignment - Adding Module for API Model Using XML
    7. Assignment Review - Adding a Project Module for API Model
    8. Maven Dependencies between Modules
    9. Assignment - Adding Module for the MapStruct Converters
    10. Assignment Review – Adding the MapStruct Module
    11. Setting a Version Using Maven Property
    12. Maven Flatten Plug-in
    13. Maven Enforcer Plug-in
    14. Assignment - Repairing a Multi-Module Maven Project
    15. Assignment Review – Repairing a Multi-Module Maven Project
    16. Overview of Maven Bill of Materials (BOM)
    17. Example of Maven Bill of Materials (BOM)
    18. Conclusion
  11. Chapter 11 : Apache Maven for Spring Boot
    1. Introduction
    2. Spring Boot Parent Project Object Model (POM) and Bill of Materials (BOM)
    3. Creating a Project with Spring Initializr
    4. Spring Boot Starter Dependencies
    5. Spring Boot Fat JAR
    6. Running Spring Boot from Maven
    7. Spring Boot Integration Tests with the Maven Failsafe Plug-in
    8. Generating Build Information with Maven
    9. Adding Git Information to Maven Build
    10. Multi-Module Spring Boot Projects
    11. Assignment - Creating a Spring Boot Multi-Module Project
    12. Assignment Review - Creating Spring Boot Multi-Module Project
    13. Conclusion
  12. Chapter 12 : Maven Repositories
    1. Introduction to Maven Repositories
    2. Configuring of Maven Repositories
    3. Configuring Mirror Repository in settings.xml
    4. Common Public Maven Repositories
    5. Using JBoss Repository
    6. Introduction to Maven Settings
    7. Assignment - Adding the JBoss Repository to setting.xml
    8. Assignment Review – Adding the JBoss Repository to setting.xml
    9. Using Spring Repositories
    10. Installing Dependencies Manually
    11. Overview - Using the Oracle Maven Repository
    12. Configuring the Maven Master Password
    13. Configuring Maven for Oracle Maven Repository
    14. Conclusion
  13. Chapter 13 : Deploying to the Maven Projects to Packagecloud
    1. Introduction
    2. Creating a Packagecloud Account
    3. Creating a Packagecloud Repository
    4. Configuring Packagecloud Maven
    5. Assignment - Deploying Release to Packagecloud
    6. Assignment Review
    7. Conclusion
  14. Chapter 14 : Deploying the Apache Maven Projects to Nexus
    1. Introduction
    2. Overview of Nexus Repository Manager
    3. Introduction to Nexus
    4. Creating a Snapshot Repository
    5. Assignment - Creating a Release Repository
    6. Assignment Review
    7. Nexus Repository Groups
    8. Conclusion
  15. Chapter 15 : Maven Build Profiles
    1. Introduction
    2. Overview of Maven Build Profiles
    3. Creating a Packagecloud Build Profile
    4. Assignment - Creating a Nexus Build Profile
    5. Assignment Review
    6. Using the Maven Profile Command Line
    7. Setting Properties in Profiles
    8. Conclusion
  16. Chapter 16 : Maven Release Plug-in
    1. Introduction
    2. Overview of the Maven Release Process
    3. Configuring Maven Supply chain management (SCM)
    4. Configuring Maven Release Plug-in
    5. Maven Release Prepare and Perform
    6. Maven Release Rollback
    7. Example of Maven Release Error
    8. Maven Release Dry Run
    9. Configuring CircleCI
    10. Deploy CircleCI to Packagecloud
    11. Releasing CircleCI to Packagecloud
    12. Conclusion
  17. Chapter 17 : Maven in the Real World
    1. Introduction
    2. Overview of Projects
    3. Reviewing the Spring Cloud Contract
    4. Reviewing the Spring Cloud Contract for OpenAPI
    5. Example of a Spring Cloud Contract Fraud in OpenAPI
    6. Example - Payor Service
    7. Resolving Dependency Conflicts
    8. Developing with Snapshot Versions
    9. Deploying to Maven Central
    10. Upgrading the Dependent Projects to Release Version
  18. Chapter 18 : Enterprise Dependency Management
    1. Introduction
    2. Maven Bill of Materials (BOM)
    3. Creating Maven Bill of Materials (BOM)
    4. Setting Common Properties in Maven Bill of Materials (BOM)
    5. Maven Bill of Materials (BOM) Dependency Management
    6. Maven Bill of Materials (BOM) Common Dependencies
    7. Maven Bill of Materials (BOM) Common Build Plug-ins
    8. Maven Enforcer Build Plug-in
    9. Configuring Beer Service Parent Bill of Materials (BOM)
    10. Assignment - Updating Services to Use Bill of Materials (BOM)
    11. Assignment Review
    12. Using Released Bills of Materials (BOMs)
    13. Assignment - Updating Services to use Release Bill of Materials (BOM)
    14. Assignment Review
    15. IntelliJ Workspace - Tips and Tricks
    16. Conclusion

Product information

  • Title: Apache Maven: Beginner to Guru
  • Author(s): John Thompson
  • Release date: May 2019
  • Publisher(s): Packt Publishing
  • ISBN: 9781838983031