What is Maven?

Maven is an automation and management tool developed by Apache Software Foundation. It is written in Java Language to build projects written in C#, Ruby, Scala, and other languages. It allows developers to create projects, dependency, and documentation using Project Object Model and plugins. It has a similar development process as ANT, but it is more advanced than ANT.

Maven can also build any number of projects into desired output such as jar, war, metadata.

It was initially released on 13 July 2004. In the Yiddish language, the meaning of Maven is "accumulator of knowledge."

In this Maven tutorial for beginners, you will learn Maven basics like:

How can Maven benefit my development process?

Maven helps the developer to create a java-based project more easily. Accessibility of new feature created or added in Maven can be easily added to a project in Maven configuration. It increases the performance of project and building process.

The main feature of Maven is that it can download the project dependency libraries automatically.

Below are the examples of some popular IDEs supporting development with Maven Framework:

  • Eclipse
  • IntelliJ IDEA
  • JBuilder
  • NetBeans
  • MyEclipse

Processes which can manage using maven:

  • Builds
  • Documentation
  • Reporting
  • Dependencies
  • SCMs
  • Releases
  • Distribution
  • mailing list

Maven Architecture

Maven Architecture includes plugin jar, code file etc.

Maven Architecture

Maven Architecture

Maven Architecture

How to use Maven

  • To configure the Maven in Java, you need to use Project Object Model, which is stored in a pom.xml-file.
  • POM includes all the configuration setting related to Maven. Plugins can be configured and edit in the <plugins> tag of a pom.xml file. And developer can use any plugin without much detail of each plugin.
  • When user start working on Maven Project, it provides default setting of configuration, so the user does not need to add every configuration in pom.xml

Steps/process involved in building the project:

  • Add / Write the code for application creation and process that into source code repository
  • Edit configuration / pom.XML / plugin details
  • Build the application
  • Save the build process output as WAR or EAR file to a local location or server
  • Get the file from local location or server and deploy the file to the production site or
  • client site Updated the application document with date and updated version number of the application
  • create and generate a report as per the application or requirement.

Summary:

  • Maven is an automation and management tool.
  • Maven tool is written in Java Language and used to build and manage projects written in C# (C Sharp), Ruby, Scala, and other languages.
  • Developers can create a java-based project more easily with the use of Maven tool.
  • To configure the Maven, you need to use Project Object Model, which is stored in a pom.xml-file.

 

YOU MIGHT LIKE: