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 21 in DevOps Tools by Vinod
• 140 points

edited Feb 21 by Kalgi 76 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 21 by Kalgi
• 37,420 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

+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
• 14,080 points
587 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,810 points
29 views
+1 vote
1 answer

I’m facing problems while setting up Maven. How do I solve this?

First of all check if you don't ...READ MORE

answered Jul 25, 2018 in DevOps Tools by Sophie may
• 9,430 points
31 views
0 votes
1 answer
+13 votes
2 answers
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
• 37,420 points
29 views