Skip to content

Installing Maven 2.2.0 on Ubuntu 8.0.4

August 11, 2009

Today I’ve tried to learn GWT(Google Web Toolkit). It’s very powerful think and useful. I’ve also tried to combine maven2 with GWT using gwt maven plugin. But I’ve got problem. I can’t use gwt maven plugin with 2.0.8 version of maven(which is on my ubuntu 8.0.4 machine). If you want GWT and maven together you must have at least 2.0.9 version of maven install on your machine.
You can’t install maven 2.2.0. on Hardy using Synaptic Manager. You have to install it manual in few steps.
1. First, open a terminal and create a directory for your Maven installation.
sudo mkdir /usr/local/apache-maven
2. Download the maven distribution archive to your install folder.
sudo wget
3. Extract the archive
sudo tar -zxf apache-maven-2.2.0-bin.tar.gz

***You have to add M2_HOME, M2, variables in .bashrc file. Type command  for editing .bashrc file sudo gedit .bashrc . ***
4. Add the M2_HOME environment variable.
export M2_HOME=/usr/local/apache-maven/apache-maven-2.2.0
5. Add the M2 environment variable.
export M2=$M2_HOME/bin
6. Add M2 environment variable to your PATH variable
export PATH=$M2:$PATH
7. Make sure that JAVA_HOME is set to the location of your JDK. It’s a important.
8. Test your maven installation
mvn --version
and you get this:
Apache Maven 2.2.0 (r788681; 2009-06-26 15:04:01+0200)
Java version: 1.6.0_14
Java home: /usr/lib/jvm/java-6-sun-
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.24-24-generic" arch: "i386" Family: "unix"


From → Java

  1. It might be obvious to some but you’ve put .bashcr instead of .bashrc!
    Great otherwise…

    • drndy permalink

      Thank you for reading and your suggestion. It might be obvious to every day Linux user, but not for beginners. I’ve corrected it,thanks again.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: