Quickly configure / setup – Maven in eclipse part1


maven_in_eclipse

 

What is Maven build:

As per the Apache Maven, Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information.

Maven simplifies the build process.

Maven automatically downloads and attach required libraries or jar files (need to mention dependencies in pom.xml)

Compiles and generate reports based on execution.

 

Download link:

Navigate to https://maven.apache.org/download.cgi

For windows OS

  • On the link, download the apache-maven-X.X.X-bin.zip and Extract to a fixed location (Required to setup the environmental variable).
    maven_downloadLink

For MAC OS

  • By default MAC OS comes with maven, if not
  • on the link, download apache-maven-X.X.X-src.tar.gz and extract

Command to extract –
tar -xvf apache-maven-3.1.1-bin.tar.gz

This normally extracts to current user folder, to know the path, use below command
pwd



 

Environment variable setup – System variables:

For windows OS

JAVA_HOME = c:\program files\java\jdkX.X.X
MAVEN_HOME = c:\Maven\apache-maven\apache-maven-X.X.X
Path = %MAVEN_HOME%\bin

For MAC OS

Create a /bash_profile file if not present under your user folder

touch ~/.bash_profile

now edit the the file

vim ~/.bash_profile

and add below entries

 

Verify if Maven present:

Open cmd and enter mvn -version

Maven_Verify

 

Eclipse IDE Maven plugin:

On Eclipse IDE -> Help -> Install new software -> Add… and enter below link to install Maven plugin

Name: Maven

Location: http://download.eclipse.org/technology/m2e/releases

Note: most of the latest versions of eclipse IDE has by default Maven plugin is installed.

next post we will see more of the maven in eclipse part2.

 

Short url – bit.ly/maveneclipse1

Content posted is based on learning or working experience,
Share the post with others if find useful,
Any queries?, leave comments or discuss on our facebook:qavalidation.com, Thanks!

2 Responses

  1. August 17, 2016

    […] In our previous article, we have seen how to configure or setup maven in eclipse. […]

  2. September 12, 2016

    […] our earlier posts Maven in eclipse – part1 and Maven in eclipse – part2, we have seen how to setup and use maven in […]

Leave a Reply

Your email address will not be published. Required fields are marked *