Powered By Blogger

Tuesday, May 23, 2017

Maven

Maven



What is Maven?

Maven is a software management and comprehension tool based on the concept of Project Object Model (POM) which can manage project build, reporting, and documentation from a central piece of information. 

Why Maven is used?

  • 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
What is POM?

As a fundamental unit of work in Maven, POM is an XML file that contains information about project ad configuration details used by Maven to build the project.

Maven's Objectives

  • Making the build process easy
  • Providing a uniform build system
  • Providing quality project information
  • Providing guidelines for best practices development 
  • Allowing transparent migration to new features
How to install maven,

prerequisites

  • Make sure JDK is installed, and "JAVA_HOME" variable is added as windows environmental variable.
Download Maven

  • Download Maven by visiting the web site https://maven.apache.org/download.cgi 
  • Add both M2_HOME and MAVEN_HOME variables in the windows environment, and point it to your maven folder.  
  • Open command prompt and type mvn -version to check if maven installed correctly. 

Creating First Maven Project

  • Create a folder for the maven project and open the folder using command prompt
  • Type as mvn archetype:generate 

  • When you hit enter there will be list of project that you can create. You just have to enter the number of it and the respective project will be created. Else you can just hit enter and a sample project will be created. 

  • There will be a list displayed. These are the different version of maven. we will select the latest version which is 6
  • Enter the groupid, artifaceId, version, package


  • Now your Maven Project is created successfully 



No comments:

Post a Comment