A more comprehensive definition of Apache Maven: Maven is a project management tool which encompasses a project object model, a set of standards, a project lifecycle, a dependency management system and logic for executing plugin goals at defined phases in a lifecycle. Maven is designed to provide a simple project setup that uses best practices as a guide.
- [Voiceover] You may be wondering, what is Apache Maven? Apache Maven, is a software project management, and comprehension tool, based on the concept of a project object model, or POM. Maven can manage a project's build, reporting, and documentation from a central piece of information. This is a quote directly from the Apache Maven project website. A more comprehensive definition of Apache Maven, is that Maven is a project management tool, which encompasses a project object model.
It follows a set of standards, it includes a project life cycle, a dependency management system, and logic for executing plugin goals at defined phases in a life cycle. Maven is designed to provide a simple project setup, that uses best practices as a guide. With Maven, your projects follow a consistent structure. Projects become IDE agnostic, by enforcing a consistent structure, it makes modifications easier in the future, when new developers are introduced to the project.
It also ensures that programmers always get the most recent version of compilers, et cetera. Most Java projects rely on other projects, and open source frameworks, to function properly. It can be cumbersome to download these dependents manually, and keep track of their versions, as you use them in your project. Maven provides a convenient way to declare these project dependencies, in a separate, external, POM.XML file. It then automatically downloads these dependencies and allows you to use them in your project. This simplifies project dependency management greatly.
It is important to note, that in the POM.XML file, you specify the what, and not the how. The POM.XML file, can also serve as documentation tool, conveying your project dependencies and their versions. Software developers refer to Maven, as a build tool. Since it is used to build deployable artifacts from source code. On the other hand, if you asked a project manager they might call it a project management tool, since it follows a development life cycle. In reality, it is both.
- Downloading Maven
- Installing Maven
- Understanding the lifecycle and dependencies of Maven
- Working with the Project Object Model (POM)
- Defining project relationships
- Using Maven plugins
- Creating a sample project with Maven
- Writing tests in Maven
- Packaging your app