Introduction

Introducing Maven provides a concise introduction to Maven, the de facto standard for building, managing, and automating Java and JEE-based projects in enterprises throughout the world. The book starts by explaining the fundamental concepts of Maven and showing you how to set up and test Maven on your local machine. It then delves deeply into concepts such as dependency management, life cycle phases, plug-ins, and goals. It also discusses project structure conventions, jump-starting project creation using archetypes, and documentation and report generation. Finally, it concludes with a discussion of Nexus and Maven’s release process.

How This Book Is Structured

Chapter 1 starts with a gentle introduction to Maven. It discusses reasons for adopting Maven, and it provides an overview of its two alternatives: Ant and Gradle.

Chapter 2 focuses on setting up Maven on your machine and testing the installation. It also provides an overview of Maven’s settings.xml file, and it shows you how to run Maven in a HTTP proxy-enabled environment.

Chapter 3 delves deeply into Maven’s dependency management. It then discusses the GAV coordinates Maven uses for uniquely identifying its artifacts. Finally, it covers transitive dependencies and the impact they have on builds.

Chapter 4 discusses the organization of a basic Maven project and covers the important elements of a pom.xml file. Then you learn about testing the project using JUnit.

Chapter 5 provides detailed coverage of Maven’s life cycle, plug-ins, build phases, and goals. It then walks you through the process of creating and using a simple Maven plug-in.

Chapter 6 introduces archetypes’ project templates that enable you to bootstrap new projects quickly. The built-in archetypes are used to generate a Java project, a web project, and a multimodule project. You will then create a custom archetype from scratch and use it to generate a new project.

Chapter 7 covers the basics of site generation using Maven. It then discusses report generation and documentation such as Javadocs, test coverage reports, and FindBugs reports and how to integrate them into a Maven site.

Chapter 8 begins with a discussion of the Nexus repository manager and shows you how it can be integrated with Maven. It then provides complete coverage of Maven’s release process and its different phases.

Target Audience

Introducing Maven is intended for developers and automation engineers who would like to get started quickly with Apache Maven. This book assumes basic knowledge of Java. No prior experience with Maven is required.

Downloading the Source Code

The source code for the examples in this book can be downloaded from www.apress.com/9781484208427. The source code is also available on GitHub at https://github.com/bava/gswm-book.

Once downloaded, unzip the code and place the contents in the C:apressgswm-book folder. The source code is organized by individual chapters. Where applicable, the chapter folders contain the gswm project with the bare minimum files to get you started on that chapter’s code listings. The chapter folders also contain a folder named final, which holds the expected end state of the project(s).

Questions

We welcome reader feedback. If you have any questions or suggestions, you can contact the authors at [email protected] or [email protected].

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.74.160