Installing and Configuring Maven - Windows

From OpenIndivo Documentation Wiki

Jump to: navigation, search

The Apache Maven build environment is a scriptable tool that is used in the building of Indivo. Download the latest copy of Maven here:

The file is named maven-2.0.4-bin.zip or later.

Extract the downloaded Maven zip file to the root of the C: drive, this will create a maven-2.0.4 folder.

Repeat the steps for adjusting the System Path Variable as was done for the [Installing and Configuring Java - Windows], except in this case append a semi-colon and the location of the maven\bin directory as shown in this example as C:\maven-2.0.4\bin

Setting the path to include the content of the Maven binaries directory
Enlarge
Setting the path to include the content of the Maven binaries directory

Open a new command window (the changes to the Path variable will not take effect in command windows opened previously) just as you had done to verify the correct operation of the Java Development Kit in the previous step. At the command prompt type:

mvn –version

You should see the response as indicated:

Confirm Maven build environment is accessible from the command prompt
Enlarge
Confirm Maven build environment is accessible from the command prompt


IMPORTANT: In order for our integration test module to run, the Maven repository must not be in a location that contains a space character in the path. Unfortunately, the default location on Windows is in your "C:\Documents and Settings\your username" directory. You can correct this by taking the following steps:

  1. From the Windows “Start” button on the menu, select the “Run…” menu item. Into the dialog box, enter the command cmd and press the “Ok” button. This will open a command window with a shell prompt
  2. Type cd "C:\Documents and Settings\your username"
  3. Type mkdir .m2
  4. Type cd .m2
  5. Type notepad settings.xml . This will open a new document in Notepad and show you a warning "Cannot find the settings.xml file. Do you want to create a new file?". Select "Yes".
  6. Enter the following code into the document: <settings><localRepository>C:\maven\repository</localRepository></settings>
  7. Save the file and close out of Notepad
Personal tools