How To Install ant-antunit on CentOS 7

In this tutorial we learn how to install ant-antunit on CentOS 7. ant-antunit is Provide antunit ant task

Introduction

In this tutorial we learn how to install ant-antunit on CentOS 7.

What is ant-antunit

The task drives the tests much like does for JUnit tests. When called on a build file, the task will start a new Ant project for that build file and scan for targets with names that start with “test”. For each such target it then will 1. Execute the target named setUp, if there is one. 2. Execute the target itself - if this target depends on other targets the normal Ant rules apply and the dependent targets are executed first. 3. Execute the target names tearDown, if there is one.

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

Install ant-antunit on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install ant-antunit

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

sudo dnf -y install ant-antunit

How To Uninstall ant-antunit on CentOS 7

To uninstall only the ant-antunit package we can use the following command:

sudo dnf remove ant-antunit

References

Summary

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