Skip to main content

How To Install Apache Maven On Linux (CentOS)





When installing Apache Maven, first of all, check whether Java 1.x JDK is installed in your machine. If not make sure to install Java JDK, not JRE.

Note: To have an understanding about JDK, JRE and JVM, follow this.

1. Download Apache Maven

After installing Java JDK, you are now eligible to install Maven. Go to Apache Maven Official Site and download any version you need. For this example, I use Apache Maven version 3.0.5

In your terminal,

$ wget http://mirror.reverse.net/pub/apache/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
$ sudo tar xzf apache-maven-3.0.5-bin.tar.gz -C /usr/local
$ cd /usr/local
$ sudo ln -s apache-maven-3.0.5 maven


2. Setting up the Maven Path system-wide

In your terminal again,

$ sudo vi /etc/profile.d/maven.sh


export M2_HOME=/usr/local/apache-maven-3.0.5
export PATH=${M2_HOME}/bin:${PATH}
Now we are done with installing Apache. 

Note: It is essential to restart the machine to activate above environmental variables. 


 3. To Verify Whether Maven Is Installed

In your terminal,

$ mvn -version

You will get something similar 





Comments

Popular posts from this blog

D. S. Senanayake College - My Alma Mater

  History In 1967, Minister of Education Hon. I.M.R.A. Iriyagolla began the ground work for establishing the Boys' school in Cinnamon Gardens. It was named after the first prime minister, Hon. D.S. Senanayake of Sri Lanka. Mr. R.I.T. Alles, a teacher of Royal College, Colombo 07 became the Principle of the new school. The location in which the college stands today was at that time called the "Kumbikale", which was cleared with the help of the community and some boy scouts from Royal College. After years of hard work, D.S. Senanayake College opened her doors to youngsters on 10th February 1967. Today The first batch of 167 students was housed in a prefabricated building sheltered by woven coconut leaves. Today it accommodates more than 6500 students from Grade 01 to 13. The ratio of Student : Teacher is now 23 : 1. Currently, 275 teachers are educating students. School colors are Black and Gold where motto is "Country Before Self...

"Hello World" in Different Languages

TRUE STORY!!! And in Binary  :  1000100111010101101011101000000111101010100011101101110111101101010010100010101010101011110101000101010101010101010100100101000101010101110101010100000010111011110110101001010001010101010101111010100010101010101010101010010010100010101010111010 101011001110111101101011101111011010100101000101010101010111101010001010101010101010101001001010001010101011101010100010100010101010101011110101000101010101010101010100100101000101010101110101010.. What the hell? :O Ref -  https://www.facebook.com/photo.php?fbid=554573284591554&set=a.241809332534619.55240.241806149201604&type=1&relevant_count=1&ref=nf

The Role of Organizational Leaders in Post COVID-19 Crisis Management Through Corporate Governance Practices in Finance Industry of Sri Lanka

    Figure 1: Designed by 8photo / Freepik COVID-19 has generated significant uncertainty and high inconsistency in the capital markets in almost all the countries and the impact it caused thus far is yet to be determined. As with the spread of the virus, adverse impacts are likely to continue. Political leaders around the world consider COVID-19 is the biggest challenge they confront since World War II (Allam, 2020). To mitigate the impact, governments and central banks responded to the economic crisis with both fiscal and monetary tools in remarkably high degrees (Benmelech and Tzur-Ilan, 2020). Though containment initiatives like quarantine and social distancing methods practice to control the outburst of COVID-19, International Monetary Fund (IMF) forecasts global growth failure and the worst economic downturn since the great depression in 1930s (Amir, 2020). As a developing country, Sri Lanka’s finance industry has been most affected by the crisis, with the breakdown of...