Saturday, 12 August 2017

How to Install Maven?

How to Install Maven?

Prerequisite
Steps to Install Maven

1) Download Maven from link and unzip it at your preferred location.
  • apache-maven-3.5.0-bin.zip for Windows
  • apache-maven-3.5.0-bin.tar.gz for Linux
  • apache-maven-3.5.0-bin.tar.gz for Mac
2) Now you need to set Maven environment variables
Add MAVEN_HOME, MAVEN, MAVEN_OPTS to environment variables.

  • For Windows, set the above environment variables.
    MAVEN_HOME=MAVEN unzip directory path\apache-maven-3.5.0MAVEN=%MAVEN_HOME%\binMAVEN_OPTS=-Xms256m -Xmx512mAppend the string ;%MAVEN% to the end of the system variable, Path.
  • For Linux, open command terminal and set the above environment variables.
    export MAVEN_HOME=MAVEN unzip directory path\apache-maven-3.5.0export MAVEN=%MAVEN_HOME%\binexport MAVEN_OPTS=-Xms256m -Xmx512mexport PATH=$MAVEN:$PATH
    • For Mac, open command terminal and set the above environment variables.
    • export MAVEN_HOME=MAVEN unzip directory path\apache-maven-3.5.0
      export MAVEN=%MAVEN_HOME%\bin
      export MAVEN_OPTS=-Xms256m -Xmx512m

      export PATH=$MAVEN:$PATH


        3) Verify Maven installation
        • For Windows, open command console and type "mvn --version". If you've done the setup correctly, this command will provide you the version of installed Maven. 
        • For Linux, open command terminal and type "mvn --version". If you've done the setup correctly, this command will provide you the version of installed Maven.
        • For Mac, open terminal and type "mvn --version". If you've done the setup correctly, this command will provide you the version of installed Maven.

        Congratulations! you have successfully done the Apache Maven setup for all your projects.

        Labels: , , , , , , , , , ,

        0 Comments:

        Post a Comment

        Subscribe to Post Comments [Atom]

        << Home