This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Installing Apache Maven for Governance Registry on Linux
In order to install from source WSO2 Governance Registry, it is necessary to install Apache Maven the latest version on Linux.
Note
See Governance Registry Installation Prerequisites for the list of all applications necessary to install and work with WSO2 Governance Registry.
Follow the instructions below to install Apache Maven from the command line.
Establish a SSH connection to the Linux machine or log in on the text Linux console. You should either log in as root or obtain root permissions after login via su
or sudo
command.
Step 1. Download Apache Maven
Type the following command into your browser address line:
wget http://www.apache.org/dist//maven/binaries/apache-maven-3.0.3-bin.tar.gz
Step 2. Extract archive
Extract the distribution archive, i.e. apache-maven-3.0.3-bin.tar.gz
to the directory you wish to install Maven 3.0.3. These instructions assume you chose /opt. The subdirectory apache-maven-3.0.3
will be created from the archive.
tar -zxvf apache-maven-3.0.3-bin.tar.gz
Step 3. Add the M2_HOME environment variable
1. Edit your BASHRC file to add the M2_HOME
environment variable (use your preferred editor).
nano .bashrc
2. Add the following lines to the end of the file:
export M2_HOME=/opt/apache-maven-3.0.3 export PATH=${M2_HOME}/bin:${PATH}
3. Save changes (for nano
"Ctrl+O").
4. Exit editor (for nano
"Ctrl+X").
Step 4. Verify installation of Apache Maven
After installation, check the version by command:
mvn -version
The system displays information on the Apache Maven version installed.