Maven is a build management tool. It will come handy when we have lots of dependencies, we keep on updating the dependent project, complex build version management. ANT is there for long as a build tool and is popularly used in development. So why do we need Maven?
My personal choice depends on the nature of project, considering facts like below
I am writing this article now because going forward I will be using Maven to build some of the tutorial example projects instead of ANT. In that case, this tutorial might help you to setup Maven. If you are behind a proxyserver which blocks access to Maven repositories, then you have to talk to your IT admin to enable access.
I assume you have already JDK installed.
http://maven.apache.org/download.cgi is the link to download Maven. ANT and Maven both are by Apache Software Foundation.
Click and download the ‘Binary Zip’ (Ex: apache-maven-3.1.0-bin.zip) file from the ‘current stable’ version.
Maven does not uses an executable file to install. It is just a zip file. Just unzip it to a folder in the hard disk.
1. Add environment variable MAVEN_HOME to the path where you extracted the maven binary zip file.
2. Add path variable, so that we can execute ‘mvn’ command from any location in command prompt.
Verify if you have done everything right,
Comments are closed for "Download, Install and Setup Maven".
Could have added something on how to use MAVEN also
Shravan, getting started with Maven is coming up in a separate tutorial.
Thanks in advanced joe.
I was struggling yesterday to setup maven. But some how I managed it. But today i am getting such a wonderful blog notes on it. Its really good and will help many learners in future. My congrats to Joe for his patience and quality of the content towards his blog.
We can use both Maven and Ant together by calling the goals of maven in ant.
Maven in 5 minutes is a very good tutorial for novice, you can provide references too. http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
I guess the difference when we use Linux is that, the environment variable ‘MAVEN_HOME’ is set in the .bashrc file. Am I correct?
[…] If you are not aware of what Maven is, then go through my previous tutorial, it has introduction to Maven, how to setup it and Ant Vs Maven, and its […]
Hi Vinuaj , I am using Linux Fedora 19 can you help me to set maven please ?
Hi Arif, Sorry for the late reply caused because I was not notified by comment through email. Actually this is my guess, that put the environment variable “MAVEN_HOME” in the source file /home/user/.bashrc in Linux. I didn’t tried it at all.
I am getting below error while doing mvn -version from command prompt. Any inputs?
Exception in thread “main” java.lang.NoClassDefFoundError: org/codehaus/plexus/c lassworlds/launcher/Launcher
[…] Maven is used to manage the dependencies. If you do not have Maven, it is better to download and setup Maven. […]
it is not working properly
[…] of the needed Hibernate libraries. If you are new to Maven, go through detailed information for Maven download and setup and Maven in 10 minutes […]
Thanks for this.
Simplicity at its best :)