How To Install scannotation.noarch on Amazon Linux 2

In this tutorial we learn how to install scannotation.noarch in Amazon Linux 2. scannotation.noarch is A Java annotation scanner

Introduction

In this tutorial we learn how to install scannotation.noarch on Amazon Linux 2.

What is scannotation.noarch

Scannotation is a Java library that creates an annotation database from a set of .class files.This database is really just a set of maps that index what annotations are used and what classes are using them. Why do you need this? What if you are an annotation framework like an EJB 3.0 container and you want to automatically scan your classpath for EJB annotations so that you know what to deploy? Scannotation gives you apis that allow you to find archives in your classpath or WAR (web application) that you want to scan, then automatically scans them without loading each and every class within those archives

We can use yum to install scannotation.noarch on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install scannotation.noarch.

Install scannotation.noarch on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install scannotation.noarch using yum by running the following command:

sudo yum -y install scannotation.noarch

How To Uninstall scannotation.noarch on Amazon Linux 2

To uninstall only the scannotation.noarch package we can use the following command:

sudo yum remove scannotation.noarch

scannotation.noarch Package Contents on Amazon Linux 2

/usr/share/doc/scannotation-1.0.3
/usr/share/doc/scannotation-1.0.3/License.txt
/usr/share/java/scannotation.jar
/usr/share/maven-fragments/scannotation
/usr/share/maven-poms/JPP-scannotation-all.pom
/usr/share/maven-poms/JPP-scannotation.pom

References

Summary

In this tutorial we learn how to install scannotation.noarch on Amazon Linux 2 using yum.