We will do both by adding them to the profile.d folder. To access the mvn command systemwide, you need to either set the M2_HOME environment variable or add /opt/maven to the system PATH. So that there wont be any build issues due to version mismatch when you take the code from development to deployment environments Add Maven folder to System PATH Note: Always install specific version of maven that is used across CI environment. sudo ln -s /opt/apache-maven-3.9.0 /opt/maven This way, when you have a new version of maven, you just have to update the symbolic link and the path variables remain the same. Step 3: Create a symbolic link to the maven folder. Step 2: Untar the mvn package to the /opt folder. Step 1: Go to Maven Downlaods and get the download link of the latest package. java -version Install Maven (Latest From Maven Repo)įollow the steps given below to install the latest maven package from the official maven repo. Verify Java JDK installation using the following command. The basic prerequisite for Maven is Java JDK because Maven is a build tool and it requires all the build and compiles related java tools.įor Ubuntu, sudo apt install openjdk-17-jdk openjdk-17-jre -yįor Amazon Linux, sudo yum install java-17-amazon-corretto-devel -yįor Redhat Linux, sudo yum install java-17-openjdk -y A developer primarily deals with the development aspects using maven while devops engineers deal with setting up a Continuous Integration pipeline using maven. It is primarily used by developers working on java projects and devops engineers working on CI/CD pipelines. In this blog, you will learn to install maven on different platforms and learn about maven configurations using step-by-step guides.Īpache maven is one of the best open-source java build tools.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |