SUNScholar/Prepare Ubuntu/S04
Jump to navigation
Jump to search
NEXT - STEP 5
Step 4. Install the Maven Java WAR builder
PLEASE NOTE:
- Check this first: https://wiki.duraspace.org/display/DSDOC4x/Installing+DSpace#InstallingDSpace-ApacheMaven3.x(Javabuildtool)
- See below the output of the maven version on Ubuntu 16.04 LTS:
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T18:41:47+02:00) Maven home: /usr/share/maven3 Java version: 1.8.0_222, vendor: Private Build Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre Default locale: en_ZA, platform encoding: UTF-8 OS name: "linux", version: "4.4.0-159-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:
- maven.apache.org
- repo1.maven.org
More information about Maven can be found here at the following links:
- http://maven.apache.org/guides/mini/guide-configuring-maven.html
- http://maven.apache.org/guides/mini/guide-proxies.html
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="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
<mirrors/>
<proxies>
<proxy>
<id>%my-name-for-maven-settings%</id>
<active>true</active>
<protocol>http</protocol>
<host>%my-campus-proxy-hostname%</host>
<port>%my-campus-proxy-port%</port>
<username>%my-campus-proxy-username%</username>
<password>%my-campus-proxy-password%</password>
<nonProxyHosts></nonProxyHosts>
</proxy>
</proxies>
<profiles/>
<activeProfiles/>
</settings>
- Replace everything between the % signs with your campus settings !
PREVIOUS - STEP 3