How To Install os-maven-plugin on CentOS 7

In this tutorial we learn how to install os-maven-plugin on CentOS 7. os-maven-plugin is Maven plugin for generating platform-dependent properties

Introduction

In this tutorial we learn how to install os-maven-plugin on CentOS 7.

What is os-maven-plugin

os-maven-plugin is a Maven extension/plugin that generates various useful platform-dependent project properties normalized from ${os.name} and ${os.arch}. ${os.name} and ${os.arch} are often subtly different between JVM and operating system versions or they sometimes contain machine-unfriendly characters such as whitespaces. This plugin tries to remove such fragmentation so that you can determine the current operating system and architecture reliably.

We can use yum or dnf to install os-maven-plugin on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install os-maven-plugin.

Install os-maven-plugin on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install os-maven-plugin using yum by running the following command:

sudo yum -y install os-maven-plugin

Install os-maven-plugin on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install os-maven-plugin using dnf by running the following command:

sudo dnf -y install os-maven-plugin

How To Uninstall os-maven-plugin on CentOS 7

To uninstall only the os-maven-plugin package we can use the following command:

sudo dnf remove os-maven-plugin

References

Summary

In this tutorial we learn how to install os-maven-plugin on CentOS 7 using yum and dnf.