What is Maven and what does Maven do?


Publication Date:January 16, 2021



INFOMARTION > What is Maven and what does Maven do?

summary

Apache Maven is commonly referred to as Maven.(Hereafter, the Apache Maven wording will be paraphrased as Maven.)What is Apache Maven? A description of what features are available. Maven is versatile and useful, but it is so multifunctional that it is difficult to understand what it is all about in the end. Please use this as a reference for an overview understanding of Maven.

Table of Contents

  1. What is Maven?
  2. What Maven can do for you
  3. summary

1. What is Maven?

Maven is a build management tool. If you are not familiar with the build, please also refer to the following article.

What does it mean to build Java?

The build is based on a variety of assumptions, including

  • Resolving jar library dependencies
  • Specify the destination folder for build results
  • Creation of war files (lessening the significance or value of the previous word) the likes of

Maven manages these build-related tasks.

The Maven website describes the purpose of Maven. (What is Maven?)

https://maven.apache.org/what-is-maven.html

The following information in "Maven's Objectives" is the most important information for understanding Maven.

Maven’s primary goal is to allow a developer to comprehend the complete state of a development effort in the shortest period of time. In order to attain this goal, Maven deals with several areas of concern:

  • Making the build process easy
  • Providing a uniform build system
  • Providing quality project information
  • Encouraging better development practices

In short, Maven makes it easy to build a build environment that works correctly.

2. What Maven can do for you

We would like to introduce some of the features of Maven to make it easier to build a build environment that works properly.

2-1. Perform the tasks required for a basic build

Naturally, since Maven is a build management tool, it can perform all of the following series of tasks required for a build.

  • test(Run Tests)
  • clean(Re-create class files)
  • build(Build war files)

2-2. Resolving Dependent Libraries

Maven automatically resolves library dependencies, a feature that is often mentioned when discussing what makes Maven so useful.

If you want to add a jar file, you need to get the target jar, but you may need more jars to make it work. In such cases, Maven automatically retrieves the necessary jars.

Please refer to the following articles for specific resolution mechanisms for dependent libraries.

How Maven automatically resolves jar library dependencies?

2-3. JAR library management

Maven can manage jars. Managing is the same as "resolving dependent libraries" mentioned earlier, but it is also possible to manage jars that are only needed for testing, jars that are only needed at build time, etc.

Maven basically works by writing information to a file called pom.xml, which is then read by Maven, but by writing to this file the "name of the jar file needed," "version of the jar file," and "why it is needed (is it needed for testing, build, etc.) By writing to this file, it is possible to manage the jars. In addition, since the information necessary for using Maven is compiled in pom.xml, anyone can easily create the same development environment (build environment) by using this file.

3. summary

If we had to describe what Maven is in a few words, it would be "a build management tool. As stated on the Maven website, Maven's goal is solely to "help developers understand the complete state of their development work in the shortest possible time. For this purpose, we provide functions such as "performing tasks required for basic builds," "resolving dependent libraries," "managing jar libraries," etc.

Thank you for taking the time to read this to the end.




■INFORMATION

Please click here to go to the top page of INFORMATION.


■PROFILE

Please click here to view the profile.


■For inquiries, please contact

For inquiries about the article, please contact us here.