How To Install maven-invoker on CentOS 7

In this tutorial we learn how to install maven-invoker on CentOS 7. maven-invoker is Fires a maven build in a clean environment

Introduction

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

What is maven-invoker

This API is concerned with firing a Maven build in a new JVM. It accomplishes its task by building up a conventional Maven command line from options given in the current request, along with those global options specified in the invoker itself. Once it has the command line, the invoker will execute it, and capture the resulting exit code or any exception thrown to signal a failure to execute. Input/output control can be specified using an InputStream and up to two InvocationOutputHandlers. This is a replacement package for maven-shared-invoker

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

Install maven-invoker on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install maven-invoker

Install maven-invoker 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 maven-invoker using dnf by running the following command:

sudo dnf -y install maven-invoker

How To Uninstall maven-invoker on CentOS 7

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

sudo dnf remove maven-invoker

References

Summary

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