Build your first Java app

Install Maven

Before running and deploying this sample, you must also have Maven on your local development environment. If you have Maven installed, proceed directly by clicking “I have installed Maven” on the bottom.

  1. Download Apache Maven version 3 and save it on your local machine.
  2. Extract the file you just downloaded using your preferred archive extraction tool.
  3. Select your operating system below to add the bin directory of the created directory apache-maven-3.5.0 to the PATH environment variable

    1. Windows 7: Right click My Computer and select Properties.
      Windows 8 and 10: Go to Control Panel > System > Advanced System Settings
    2. On the Advanced tab, select Environment Variables, and then find a Systems Variable called Path and add to it the path for your \bin file, for example C:\Program Files\apache-maven-3.5.0\bin.


    3. Check you have set the variable correctly by opening up command prompt (run + cmd) and typing mvn -version. The output should show your Maven version.
    1. Open the command terminal and enter the following
      $ export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.9
      $ export M2=$M2_HOME/bin
      $ export MAVEN_OPTS=-Xms256m -Xmx512m
    2. Now append the M2 variable to the system path.
      $ export PATH=$M2:$PATH
    3. Check maven installed correctly, by running this command in a terminal: mvn -version. The output should show your Maven version.

I ran into an issue I have installed Maven