Install & configure Maven build tool on Jenkins

0 104
  1. Download maven packages onto Jenkins server. In this case I am using /opt/maven as my installation directory – Link :
     # Creating maven directory under /opt
    mkdir /opt/maven
    cd /opt/maven
    # downloading maven version 3.6.0
    unzip /opt/maven/
  2. Setup M2_HOME and M2 paths in .bash_profile of user and add these to path variable
    vi ~/.bash_profile
  3. Logoff and login to check maven version Check maven version
    mvn –version
  4. Install maven plugin without restartManage Jenkins > Jenkins Plugins > available > Maven Invoker
  5. Configure java pathManage Jenkins > Global Tool Configuration > Maven

  6. Apply & Save

Leave A Reply

Your email address will not be published.