How to install Apache Maven on OpenSUSE 15.2 / 15.1?

Windows Articles

Monitoring Ubuntu 20.04 with Stacer

Normally if we use Linux on a production server, it is important to monitor it. On the other hand, in everyday use, many users...

How to get the Android 11 Notification Panel

It's no secret that even though Android is the most widely used mobile operating system. Not always our device has the latest...

How to create backups in Windows 10 with FileFort Backup

There is no doubt that the computer is an essential element in our lives. Indeed, its uses go beyond work or study....

Trisquel 9.0 available

Trisquel is a GNU/Linux distribution endorsed and supported by the Free Software Foundation. This means that in addition to incorporating the Linux...

How to install PandoraFMS on CentOS 8?

Worldwide many IT infrastructures are running Linux on one of their servers. This opens the door to an endless number of different...
angeloma
angeloma
Senior Writer and partner

In this post, we will show you how to install Apache Maven on OpenSUSE 15.2 / 15.1.

To manage projects done in Java, there is no better tool than Apache Maven. This fantastic tool, belonging to the Apache foundation, comes with predefined objectives to perform certain clearly defined tasks, such as code compilation and packaging.

There are many features that make Maven a great tool. However, the key is that Maven is ready for network use. In addition, its functions are made extensible by the ability to install plugins. Finally, Maven relies on the Project Object Model (POM) to describe the project, as well as its dependencies for later deployment.

Installing Apache Maven on OpenSUSE 15.2 / 15.1

Upgrade the system and install Java

It is always advisable to have the system updated. With this you will have security patches that help increase the stability of the system.

So let’s do it. Open a terminal session and run:

:~$ sudo zypper up

Once the system update is completed, we can now continue with the rest of the steps.

Apache Maven requires Java to run, so the next step is to install it:

:~$ sudo zypper in java-11-openjdk java-11-openjdk-devel

Then, check the installed version.

:~$ java --version
openjdk 11.0.7 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-suse-lp152.1.2-x8664)
OpenJDK 64-Bit Server VM (build 11.0.7+10-suse-lp152.1.2-x8664, mixed mode)

So, we can continue.

Install Apache Maven on OpenSUSE 15.2 / 15.1

So the best way to get the latest version of Apache Maven on our OpenSUSE 15.2 / 15.1 is to download it directly.

So, let’s download it.

:~$ cd /tmp/
:~$ wget -c http://mirrors.advancedhosters.com/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip

2.- Downloading and installing Apache Maven on OpenSUSE 15.2 / 15.1
1.- Downloading and installing Apache Maven on OpenSUSE 15.2 / 15.1

At the time of this post, the latest stable version is 3.6.3.

Then it’s time to unzip it and move it to another folder. Since I downloaded the ZIP file I unzipped it.

:~$ unzip apache-maven-3.6.3-bin.zip

And move it to /opt/

:~$ sudo mv apache-maven-3.6.3 /opt/maven

Once you have done this, you have to define the environment variables to be able to use it from the terminal as one more command.

So, create a configuration file using the nano text editor and add the following:

:~$ sudo nano /etc/profile.d/maven.sh
export M2_HOME=/opt/maven/
export M2=$M2_HOME/bin
export PATH=$M2:$PATH

3.- Installing Apache maven on OpenSUSE 15.2 / 15.1
3.- Installing Apache maven on OpenSUSE 15.2 / 15.1

Save the changes and close the file.

Now, display the installed version using the mvn command.

:~$ mvn -v

4.- Apache Maven working
3.- Apache Maven working

This means that everything is fine and Apache Maven is ready for work.

Conclusion

Apache Maven is a necessary tool for the development of Java applications. Besides this, we have that OpenSUSE is more and more chosen as the main distribution by many developers. That is why today you have learned to install Apache Maven on OpenSUSE 15.2 / 15.1.

Also, you can read more post about OpenSUSE and Maven.

Please share this post and join our telegram channel.

More articles

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

Monitoring Ubuntu 20.04 with Stacer

Normally if we use Linux on a production server, it is important to monitor it. On the other hand, in everyday use, many users...

How to get the Android 11 Notification Panel

It's no secret that even though Android is the most widely used mobile operating system. Not always our device has the latest...

How to create backups in Windows 10 with FileFort Backup

There is no doubt that the computer is an essential element in our lives. Indeed, its uses go beyond work or study....

Trisquel 9.0 available

Trisquel is a GNU/Linux distribution endorsed and supported by the Free Software Foundation. This means that in addition to incorporating the Linux...

How to install PandoraFMS on CentOS 8?

Worldwide many IT infrastructures are running Linux on one of their servers. This opens the door to an endless number of different...
x