i have installed maven on linux amazon instance redhat but cli command does not give expected result

0 votes

i have installed maven on linux amazon instance (redhat) , but cli command does not give expected result.

details of the maven installed :

[[ec2-user@ip-172-31-6-83 bin]$ ls -ltrh
total 32K
-rwxr-xr-x. 1 501 games 1.5K Oct 24 18:38 mvnyjp
-rw-r--r--. 1 501 games 1.7K Oct 24 18:38 mvnDebug.cmd
-rwxr-xr-x. 1 501 games 1.5K Oct 24 18:38 mvnDebug
-rw-r--r--. 1 501 games 6.2K Oct 24 18:38 mvn.cmd
-rwxr-xr-x. 1 501 games 5.7K Oct 24 18:38 mvn
-rw-r--r--. 1 501 games  228 Oct 24 18:38 m2.conf
[ec2-user@ip-172-31-6-83 bin]$ mvn -version
-bash: mvn: command not found
[ec2-user@ip-172-31-6-83 bin]$
Feb 22, 2019 in DevOps Tools by Vinod
• 140 points

edited Feb 22, 2019 by Kalgi 2,687 views
What does ls -ltrh command do?
[ec2-user@ip-172-31-6-83 bin]$ pwd
/opt/apache-maven-3.6.0/bin
[ec2-user@ip-172-31-6-83 bin]$ ls -ltrh
total 32K
-rwxr-xr-x. 1 501 games 1.5K Oct 24 18:38 mvnyjp
-rw-r--r--. 1 501 games 1.7K Oct 24 18:38 mvnDebug.cmd
-rwxr-xr-x. 1 501 games 1.5K Oct 24 18:38 mvnDebug
-rw-r--r--. 1 501 games 6.2K Oct 24 18:38 mvn.cmd
-rwxr-xr-x. 1 501 games 5.7K Oct 24 18:38 mvn
-rw-r--r--. 1 501 games  228 Oct 24 18:38 m2.conf
[ec2-user@ip-172-31-6-83 bin]$

1 answer to this question.

0 votes

Hey @Vinod, your command to check for maven version is wrong. Use the following command:

mvn --version
answered Feb 22, 2019 by Kalgi
• 52,350 points
that did not work ..

maven install files in maven folder as give here :

[ec2-user@ip-172-31-6-83 bin]$ pwd
/opt/apache-maven-3.6.0/bin
[ec2-user@ip-172-31-6-83 bin]$ ls -ltrh
total 32K
-rwxr-xr-x. 1 501 games 1.5K Oct 24 18:38 mvnyjp
-rw-r--r--. 1 501 games 1.7K Oct 24 18:38 mvnDebug.cmd
-rwxr-xr-x. 1 501 games 1.5K Oct 24 18:38 mvnDebug
-rw-r--r--. 1 501 games 6.2K Oct 24 18:38 mvn.cmd
-rwxr-xr-x. 1 501 games 5.7K Oct 24 18:38 mvn
-rw-r--r--. 1 501 games  228 Oct 24 18:38 m2.conf
[ec2-user@ip-172-31-6-83 bin]$
What exactly are you trying to do?
I just need maven work as it was tought, i just want maven reposnd as expected after installing, which is not is the case.
seems I am close to the resolution .. it looks to be environmental variable need be set.  I tried below , it works..

>>

[ec2-user@ip-172-31-6-83 bin]$ bash mvn -version
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T18:41:47Z)
Maven home: /opt/apache-maven-3.6.0
Java version: 1.8.0_191, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-862.el7.x86_64", arch: "amd64", family: "unix"
[ec2-user@ip-172-31-6-83 bin]$

<<
maven --version respond seems fine. Make sure you've added Maven to the path which I think you already have. Did you expect anything else?

Related Questions In DevOps Tools

+2 votes
0 answers

How do I install Maven on CentOS?

I went through below menetioned tutorial https://www.edureka.co/community/38761/how-do-i-install-maven-on-centos but somehow ...READ MORE

Dec 27, 2019 in DevOps Tools by Manoj
• 140 points
734 views
+4 votes
2 answers

Jenkins not showing Maven Release Plugin

Make your project type Maven Project. This ...READ MORE

answered Oct 11, 2018 in DevOps Tools by Hannah
• 18,540 points
5,028 views
0 votes
1 answer
0 votes
1 answer

login popup not working in tomcat9 when I click the server status

Try and install tomcat 8.0.41. It is ...READ MORE

answered Jul 12, 2018 in DevOps Tools by DareDev
• 6,890 points
1,588 views
+1 vote
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,987 views
0 votes
1 answer

Does the avi networks controller work on VMware Fusion 7 or 8 on OS X?

Avi Controller is supported on VMWare Fusion ...READ MORE

answered Jul 3, 2018 in DevOps Tools by Kalgi
• 52,350 points
632 views
+1 vote
1 answer

i have a pyhton code in my git/git repository how to build that code in jenkins

Follow these steps @Bhaskar: Step 1: Open the Jenkins ...READ MORE

answered Oct 14, 2019 in DevOps Tools by Kalgi
• 52,350 points
843 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP