What is Maven? Advantages and Disadvantages of Maven

what-is-maven-blog-img

What is Maven

Maven is the word that gives meaning ‘ Accumulator of knowledge’. It was designed to simplify the build process.

Maven was developed by the Apache Software Foundation where it was formerly part of the Jakarta projects. It can build and manage the projects which are written C#, Ruby, Scala, and other different languages. There are several projects which contain their own Ant build files. And Maven provides a uniform build system. That means it builds a project by using its Project Object Model(POM) and other sets of plugins. Most of its functionality is present in these plugins. By using command the plugins provide a set of goals that can be executed. And the command looks like mvn [plugin-name]:[goal-name].

There are different types of plugins present in Maven that are for building, source control management, and for testing, generating Eclipse project files, and so on. By default, some plugins are included in all projects. In a plugin section of POM. XML file plugins are introduced and configured. And coming to the dependencies in Maven those are central features in Maven. By identifying the individual artifacts such as software libraries or modules Maven’s dependency-handling mechanism is organized around a coordinate system. Maven will automatically download the dependency and the dependencies that Hibernate itself needs (called transitive dependencies) and store them in the user’s local repository. Thus, Maven relies on a convention on how to define projects and on the list of work-flows that are generally supported in all projects. To find the coordinate for different open-source libraries and frameworks there are search engines such as the Central Repository Search Engine which can be used. The projects which are developed on a single machine can depend on each other through the local repository. The local repository is a simple folder structure. For download dependencies, it acts as a cache and as a centralized storage place for locally built artifacts. The Maven command builds a project and places its binaries in the local repository. So that other projects can utilize this project by specifying its coordinates in their POMs.

Advantages of Maven

Here are some advantages of Maven.

  • Maven repositories allow artifacts Javadoc to distribute close by the artifacts JAR.
  • Maven makes it very easy to start a project in various environments.
  • Maven storehouses allow an artifacts source code to distributed along by the artifacts JAR.
  • Project Object Model (POM) is used in Maven projects in order to reduce the duplication which existed on Ant Ventures.

Disadvantages of Maven

Here are some disadvantages of Maven.

  • Maven requires the maven installation in the system for working and a maven plugin for the ide.

About the Author

You may also like these