Installing MAVEN with JDK-1.8

I am using an instance aws

to run my application java

and use java-1.8.0. Decided to install maven

to manage build, install and use to compile and build on my windows machine. Installed maven on aws using the following commands:

sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version

      

The problem with these commands is installing java-1.7.0(jdk)

as a dependency. There are compilation problems while I am using java-1.8.0

for development.

Also tried downloading maven.tar.gz to unpack and setting maven path. Mistake

The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE

      

I understand the problem. But from java install could not find jdk

in / usr / lib /. You could only see folders jre

. I couldn't risk installing java due to the fact that the cluster setup can get frustrating.

Any suggestions for installing maven

with dependency java-1.8.0

. thank

+3


source to share





All Articles