What is Apache Maven? - 2020
"Maven, a Yiddish word meaning accumulator of knowledge, was originally started as an attempt to simplify the build processes in the Jakarta Turbine project. There were several projects each with their own Ant build files that were all slightly different and JARs were checked into CVS. We wanted a standard way to build the projects, a clear definition of what the project consisted of, an easy way to publish project information and a way to share JARs across several projects."- Apache Maven Project - Introduction
As we can see from the picture below, Maven is the most widely used build tool in Java:
Picture from Java Tools and Technologies Landscape for 2014
Maven standardize the folder structure and organization of a project.
Maven provides recommendations on where different parts of a project, such as source code, test code, and configuration files, should reside.
This makes it easier to understand and navigate any Maven project. Additionally, these conventions make it IDE agnostic.
Most Java projects rely on other projects and it can be cumbersome to download these dependencies manually and keep track of their versions.
Maven provides a convenient way to declare these project dependencies in a separate, external pom.xml file. It then automatically downloads those dependencies and allows us to use them in our project.
This simplifies project dependency management greatly.
It is important to note that in the pom.xml file we specify the what and not the how.
While using Maven doesn't eliminate the need to know about the underlying mechanisms, Maven does provide a lot of shielding from the details.
Maven provides a uniform interface for building projects. You can build a Maven project by using just a handful of commands. Once you become familiar with Maven's build process, you can easily figure out how to build other Maven projects.
Maven follows a plug-inâbased architecture, making it easy to augment and customize its functionality.
These plug-ins encapsulate reusable build and task logic. There are hundreds of Maven plug-ins available that can be used to carry out tasks ranging from code compilation to packaging to project documentation generation.
Maven provides a standard directory layout for its projects. When the time comes to create a new Maven project, we need to build each directory manually, and this can easily become tedious.
This is where Maven archetypes come to rescue.
Maven archetypes are predefined project templates that can be used to generate new projects. Projects created using archetypes will contain all of the folders and files needed to get you going.
Ph.D. / Golden Gate Ave, San Francisco / Seoul National Univ / Carnegie Mellon / UC Berkeley / DevOps / Deep Learning / Visualization