Daft
Daft

Reputation: 10964

Trouble installing Maven

I'm following this tutorial for installing Maven on Windows, could someone explain what the following line means, I'm very unsure.

Add the bin directory of the created directory apache-maven-3.3.3 to the PATH environment variable

Upvotes: 0

Views: 192

Answers (1)

Jorge Campos
Jorge Campos

Reputation: 23361

This line means that you have to add maven directory bin inside your maven installation folder, visible to the executables path on the operation system. Which will allow you to execute maven comands wherever you are on the console.

So if you have this installation folder on your windows:

c:\program files\apache-maven-3.3.3

Add the bin folder to path means that you have make windows see that folder on the list of executables.

  • Go to start menu
  • Right click on Computer
  • Click on Properties
  • On the left side of the panel click on Advanced System Settings
  • Click on Advanced tab
  • Click on the Enviroment Variables
  • In the System variables find a variable called Path click on it and Edit button
  • In the window edit its value adding at the end ;c:\program files\apache-maven-3.3.3\bin don't forget the ; before the path
  • Restart the console you are using
  • run: mvn -version

If everything is fine you will see some information about maven.

You will have to set/add the JAVA_HOME also. On the link you posted on the Windows Tip section you will see same instructions I give:

Adding to PATH: Add the unpacked distribution’s bin directory to your user PATH environment variable by opening up the system properties (WinKey + Pause), selecting the “Advanced” tab, and the “Environment Variables” button, then adding or selecting the PATH variable in the user variables with the value C:\Program Files\apache-maven-3.3.3\bin. The same dialog can be used to set JAVA_HOME to the location of your JDK, e.g. C:\Program Files\Java\jdk1.7.0_51

Upvotes: 1

Related Questions