1

I have configured external maven in eclipse however when I try to use mvn -version from eclipse terminal (shown in the image background) it says command not found. All mvn commands work from mac terminal though.

external maven eclipse From terminal: enter image description here Content of my .bash_profile enter image description here

I know .bash_profile is read when terminal is lunched and as eclipse is lunched from UI icon that is why these variables are not available there.

I read lot of articles which talks about setting up environment.plist and my.startup.plist. At the same time there are people saying these .plist files are no more supported in my mac version.
Article links:
https://apple.stackexchange.com/questions/106355/setting-the-system-wide-path-environment-variable-in-mavericks
Mac OS X Lion no longer recognizes environment.plist?

Now I am totally confused how to make mvn work from eclipse terminal. Could somebody please show me a step to step guid.

Another follow up question: on my mac terminal java - version works but when I print the list of environment variables no where I see JAVA_HOME, then how come java - version works. In above screen shoot you can see mvn -- version command was able to find java home. enter image description here

Please help totally stuck at setting up the development environment.

Ashish
  • 198
  • 3
  • 11
  • Is there a chance you override the path when you launch Eclipse? You could use the maven default run command or the specific ones. The maven plugin can help you define your commands or let you use the default ones (right-clic on your project/ run) – Xavier Bouclet Sep 24 '17 at 12:47
  • @XavierBouclet Overriding PATH that I don"t know know. How can I check that. Yes I can use the m2e which is already installed but I want to use the external maven not the embedded one. – Ashish Sep 24 '17 at 13:19
  • Give eclipse the full path to the mvn executable. – Thorbjørn Ravn Andersen Sep 24 '17 at 14:00
  • You can tell Eclipse to use the external Maven instead of the embedded one. In the settings check the external to be the default one – Xavier Bouclet Sep 24 '17 at 15:25

0 Answers0