SUNScholar/Prepare Ubuntu/S04

From Libopedia
Jump to: navigation, search

Step 4. Install the Maven Java WAR builder


  1. Check this first:
  2. See below the output of the maven version on Ubuntu 12.04 LTS:
dspace@dspace:~# mvn -v
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_79, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_ZA, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-66-generic", arch: "amd64", family: "unix"

Step 4.1: Install Maven

Type as follows:

sudo apt-get install maven

Step 4.2: Create the Maven home folder

(Optional: This may or may not be needed) Type the following;

mkdir $HOME/.m2

Step 4.3: Setup the Maven config file

You can skip this step if you have a direct connection to the internet. The Maven configuration file is only needed if your connection to the internet is via a campus proxy server.

Maven proxy notes

Use the proxy settings for your campus. Check with your IT department. You need to ensure that the following two sites are allowed to pass through your campus proxy server and/or campus firewall:


More information about Maven can be found here at the following links:

Maven proxy config file

Type the following to enable Maven proxy settings:

nano $HOME/.m2/settings.xml

Tip: It is always a good idea to maximise the open nano window so that the copy and paste of long lines does not wrap around.

Add the following:

<settings xmlns=""
Replace everything between the % signs with your campus settings !