zsh: command not found: mvn
Answered
I am using Community 2020.2 version on mac with JDK 1.8_127. I installed maven on my mac and it returns the mvn -version as 3.6.3. I installed maven, maven helper, maven runner, maven test support plugin, maven dependency helper etc.,
But the problem is when I run mvn -version, it returns zsh: command not found: mvn and when I click on maven tab on the right side vertical bar to run maven life cycle commands, the tab simply vanishes from the IDE until I restart the IDE. I configured JDK 1.8 path. What is going on ?
Please sign in to leave a comment.
please see https://stackoverflow.com/a/64555775/8203759. Seems that the path to maven is not in your zsh environment.
Konstantin;
Thanks for your reply.
I don't know. But for some other reason that every time, I open a new terminal, my mvn -v is failing. So for that reason upon searching I found a solution.
to .zshrc
Which is suggested here in your post also. Also, since my IJ version is 2020.2.3 and 2020.2.4 is available, I uninstalled and installed the later version.
I don't know which change made it work, now it is working.
Thanks a lot,
IDE update does not make any influence here.
Adding "source ~/.bash_profile" is the solution.
Inspite of my ignorance on this matter.
I tend to agree with you.
Any how, thanks for great help, so promptly.