Skip to main content

Easy guide to install Maven in Ubuntu 16.04


Before installation I am recommending to make the system into a latest stable versions
1. sudo apt-get update -y
2. sudo apt-get upgrade -y

Install Java:

1. sudo add-apt-repository ppa:webupd8team/java
2. sudo apt update; sudo apt install oracle-java8-installer
//run command to run the system package & install Java installer script
//can replace (oracle-java9-installer)
3.Accept the terms of license and agreements in order to continue the download
4. javac -version
    java -version
//to check the java version
5.sudo apt install oracle-java8-set-default
//java versions can be differ so setting the default Java Environment

Installing Maven :

Step 01
1. sudo apt-get install Maven
2.mva -v
//to check whether the Maven is installed.

Step 02: Download and install Maven
1. wget [website link you want to download]
Example – wget http://www-eu.apache.org/dist/Maven/Maven-3/3.5.0/binaries/apache-Maven-3.5.0-bin.tar.gz
Go to ApacheMaven download side and choose what do you want to download. If it is a command line argument through terminal you have to “copy link address” and past that after “wget” command as shown in the above example.
//if the permission denied to download the file. Try that by using “sudo” before “wget” to ensure that you are the administrator
2. sudo tar -xf apache-Maven-3.5.0-bin.tar.gz -c /usr/local
//unzipping the downloaded file in the location of /usr/local
3. cd /usr/local
//move to the extracted file location
4. sudo ln -s apache-Maven-3.5.0 Maven
//creating the link to the Maven
5. sudo vi /etc/profile.d/Maven.sh
//create Maven_HOME (by creating “Maven.sh” file
6. export M2_HOME=/usr/local/Maven
    export PATH=${M2_HOME}/bin:${PATH}
//type the above given lines inside the “Maven.sh” through the vi editor. Don’t forget to save the file.
7. source /etc/profile
//activate the Maven environmental variable
8. mvn -v
//to check the whether Maven installed correctly 

©IT Today

Comments

Popular posts from this blog

How OIDC run on top of OAuth - Demo by a maven web application

As I said in the previous blog about OIDC, OIDC is running on top of OAuth in-order to provide authentication and authorization. When it comes to real scenario, we have need to clearly understand the flows between authorization server, and resource server. For OAuth it needs token introspection endpoint in-order to validate the token. But, in OIDC it doesn't need to have this introspection endpoint because OIDC response token (JWT) it contains the idtoken which contains information about the token to validate by the resource server. OIDC is running as authorization grant type is pretty much safe way for the web applications. Let's see how a real world application using this OIDC on top of OAuth. Note: I have created an sample application to provide the graphical interface for this explanation. When you are trying to login a online web application account you may see another login options also available. For example, login with Google, login with Facebook,etc. Those ...

Bandit Wargame – Documentation

Basically wargames are providing the basic knowledge on the security concepts. It is a game that contain many tricks to break the borders to gain the access especially passwords (commands are mostly on the Linux CLI). You can find many wargames through the Internet and they are very interest and fun full too. “Bandit” is also a wargame which is for the beginners. You all can access that through the link given bellow. And this article is an document for this game. I have used Ubuntu as the operating system. Bandit – Clickhere . Level 0: Case study → Clickhere Here we have need to connect the host through the SSH (secure socket shell) server. The informations are provided as follows. Host name: bandit.labs.overthewire.org Port No: 2220 User name: bandit0 Password: bandti0 There are many ways to connect through the SSH server. Method 1: Download and run the “PuTTY SSH client”. ( https://the.earth.li/~...

Introduction to OAuth

What is OAuth? OAuth is a protocol that allows distinct parties to share information and resources in a secure and reliable manner. OAuth needs to consider the 2 concept to provide the informations in secure and reliable manner. They are authentication and authorization. Authentication -> Validating the person/system who need the information Authorization -> After authentication what action can be performed by the person/system. By maintaining this 2 concept OAuth is providing federated identity and delegated identity. Federated identity -> User can use his/her one application account to login another application. [Example: If a user having Facebook account then he can login Instagram with the same login as Facebook] Delegated identity -> One service can access another service resources. [Example: When creating a Facebook account with eMail address that will suggest the contacts in the eMail to add as friends] Without OAuth With OAuth User ...