How to Install Apache Maven on Amazon Linux 2

First, update the yum packages

sudo yum update -y

then run the following command to add the Maven repository

sudo wget -O /etc/yum.repos.d/epel-apache-maven.repo

To set the version number run this command

sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo

Next, run this command to install Apache maven

sudo yum install -y apache-maven

Leave a Comment

Your email address will not be published. Required fields are marked *