Installing and configuring Maven in Windows

Pubblicato da lentux-informatica il

  •  
  •  
  •  
  •  
  •  

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 mavenbin directory as shown in this example as C:maven-2.0.4bin.

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




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 Settingsyour username” directory. You can correct this by taking the following steps:

    1. Create a new folder called .m2 in this path “C:Documents and Settingsyour username”.
    2. Create a new file called settings.xml.
    3. Open this file with any editor and copy the following code:

<settings><localRepository>C:mavenrepository</localRepository></settings>

Save the file and close.


  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •