For development purpose, running up a local server.

7 years ago
Java
Maven

  1. Download the latest Apache Maven in binary zip file. As of this article is written the latest version of maven is 3.0.5. Download Maven
  2. Extract the file and put a folder which the path do not have any space. Like for example I put my maven inside C:\opt\maven.

  1. Open Windows's System Properties by right-clicking on the Computers.

  1. On the left menu under Control Panel Home, click on a link named Advanced system settings. System properties dialog will pop up. ChooseAdvanced tab and click on Environment Variables... at the almost bottom of the tab panel.

  1. Find a variable named M2_HOME, in case it was not there yet, create a new one and set the value to C:\opt\maven\apache-maven-3.0.5.

  1. Find a variable named M2, in case it was not there yet, create a new one and set the value to %M2_HOME%\bin.

  1. Find a variable named Path and add ;%M2 into the value. Do not replace the existing value.

  1. Click on the OK button to save the changes on the System Properties.
  2. Open a command prompt, and simple type mvn -version in order to verify that the settings are configured correctly. You should get something similar like below.

  1. Supposedly there is a folder named .m2 inside user's folder, C:\Users\{{windowsUsername}}\.m2. In this folder you need to create an XML file and give it a name settings.xml. Paste the following content into the file:
<?xml version="1.0"?>
<settings>
 <pluginGroups>
 </pluginGroups>
 <servers>
 </servers>
 <profiles>
  <profile>
   <id>default</id>
   <activation>
    <activeByDefault>true</activeByDefault>
   </activation>
   <pluginRepositories>
   </pluginRepositories>
   <repositories>
   </repositories>
  </profile>
 </profiles>
</settings>