Apache Maven is a widely used build and dependency management tool used for Java-based applications. Here's a step-by-step tutorial on how to install Apache Maven on your Manjaro system.
Before installing Apache Maven, it's important to make sure your system is up-to-date. Run the following commands in the terminal to update your system:
sudo pacman -Syu
Apache Maven requires Java to be installed on your system. To install Java, run the following command:
sudo pacman -S jre-openjdk
Go to the Apache Maven website at http://maven.apache.org/download.cgi and download the latest version of Apache Maven. Look for the file with the extension '.tar.gz'.
Once the download is complete, navigate to the Downloads folder in the terminal and extract the downloaded file using the following command:
tar xvzf apache-maven-3.x.x.tar.gz
Replace '3.x.x' with the version number you downloaded.
After extracting the downloaded file, move the extracted folder to your desired location. For example, you can move it to the /opt directory using the following command:
sudo mv apache-maven-3.x.x /opt/
To use Apache Maven, you need to set two environment variables: M2_HOME
and PATH
.
export M2_HOME=/opt/apache-maven-3.x.x
Replace '3.x.x' with the version number you downloaded.
export PATH=$PATH:$M2_HOME/bin
To make these changes permanent, add these two lines to the bottom of the .bashrc
file located in your home directory.
To verify your Apache Maven installation, run the following command:
mvn --version
You should see the version number of Apache Maven and its configuration details printed on the terminal if the installation was successful.
Congratulations! You have successfully installed Apache Maven on your Manjaro system.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!