Maven Overview

What Is Maven ?

Apache Maven is a project management tool which can be used for building and managing of any Java based project.It is designed to take much of the hard work out of the build process.Maven provides new concept of a project object model (POM) file to manage project's build, dependency and documentation.


Objectives of Maven:

Maven's primary goal is to allow a developer to comprehend the complete state of a development effort in the shortest period of time. In order to attain this goal there are several areas of concern that Maven attempts to deal with:

  • Making the build process easy
  • Make the development process visible or transparent
  • Bringing together the tools required in a uniform way
  • Allowing transparent migration to new features

What Is Maven ?

Apache Maven is a project management tool which can be used for building and managing of any Java based project.It is designed to take much of the hard work out of the build process.Maven provides new concept of a project object model (POM) file to manage project's build, dependency and documentation.


Objectives of Maven:

Maven's primary goal is to allow a developer to comprehend the complete state of a development effort in the shortest period of time. In order to attain this goal there are several areas of concern that Maven attempts to deal with:

  • Making the build process easy
  • Make the development process visible or transparent
  • Bringing together the tools required in a uniform way
  • Allowing transparent migration to new features




How to install Maven on Windows:

Maven is Java based tool, so the very first requirement is to have JDK installed in your machine.

Apache Maven is not require to install on Windows as a service component, you just need to download the Maven's zip file, extract it and configure the Windows environment path variable.

Software Required

  • JDK 1.6
  • Maven 3.0.3

Step 1. JDK and JAVA_HOME Configuration:

Make sure JDK is installed, and "JAVA_HOME" variable is added in Windows environment variable, and point to the JDK folder.

Maven Overview

Step 2. Download Apache Maven:

Click here to download the latest version of MAVEN(Current version is 3.0.4).

Step 3. Extract It:

Extract the downloaded zip file. In my case, I extracted to d drive D:\apache-maven-3.0.3.



Step 4. Add MAVEN_HOME:

Add a new MAVEN_HOME variable to the Windows environment, and point it to your Maven folder.

Maven Overview

Step 5. Add MAVEN Path :

Update PATH variable, append "Maven bin folder" path, so that you can run the Maven's command everywhere.

Maven Overview

Step 6. Settings related to Firewall(If your network is using firewall):

Depending on where your machine is located(Mostly in the case of your organization) it may be necessary to make a few more preparations for Maven to function correctly. If you are behind a firewall, then you will have to set up Maven to understand that. To do this, create a /.m2/settings.xml file with the following content:

<settings> 
<proxies> 
<proxy> 
<active>true</active> 
<protocol>http</protocol> 
<host>proxy.yourcompany.com</host> 
<port>provide port no</port> 
<username>your-username</username> 
<password>your-password</password> 
</proxy> 
</proxies> 
</settings>

If Maven is already in use at your workplace. If there is an active Maven proxy running, then note the URL and let Maven know you will be using a proxy. Create a /.m2/settings.xml file with the following content.

<settings> 
<mirrors>
<mirror>
<id>maven.yourcompany.com</id>
<name>My Company's Maven Proxy</name>
<url>http://maven.yourcompany.com/maven</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>

Step 7. Test Maven Installation:

Open command prompt and type "mvn -version".If your installation is proper you will see following screen.

Maven Overview



comments powered by Disqus