Thursday, March 31, 2011

Installing Maven on Fedora

Maven: Maven is a software project management and comprehension tool. Based on the concept of a Project Object Model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.

System Requirements:

JDK:

1.5 or above (this is to execute Maven - it still allows you to build against 1.3
and prior JDK's).

Operating System:

No minimum requirement. On Windows, Windows NT and above or Cygwin is required for
the startup scripts. Tested on Windows XP, Fedora Core and Mac OS X.

Installation:

1) Download maven from : http://maven.apache.org/download.html
You could use the latest release.

2) Unpack the archive where you would like to store the binaries. I am assuming you know how to do that. A directory called "apache-maven-3.0.x" will be created.

3) Add the bin directory to your PATH. In the terminal type : export PATH=/usr/local/apache-maven-3.0.x/bin:$PATH
You may be asked to perform this operation as root.

4) Make sure JAVA_HOME is set to the location of your JDK. If you have JDK already, you would have done it at the time of installing it. If you don't have it, you need to download and install it.

5) Run "mvn --version" to verify that it is correctly installed.
If correctly installed the output will be similar to the following:

[root@localhost /]# mvn --version
Apache Maven 3.0.3 (r1075438; 2011-02-28 23:01:09+0530)
Maven home: /home/jayati/Download/apache-maven-3.0.3
Java version: 1.6.0_18, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.30.10-105.2.23.fc11.i586", arch: "i386", family: "unix"

Congratulations! You have successfully installed Maven.

No comments:

Post a Comment