18

I'm using the Indigo Release of eclipse. When I check Window -> Preferences, Maven -> Installations, it confirms that it's using the Embedded (3.0.2/...) installation of Maven.

I want to be able to run maven commands from the command line (Windows Powershell), but when I type, e.g.,

PS C:\> mvn

no executable is found. I did a search for "mvn.exe" and found no results.

I suppose I could install a stand-alone version of Maven 3 and add that to my PATH, but I'd prefer to be using the same Maven installation for command line tasks as well as IDE (eclipse) tasks.

So, where is the embedded maven's mvn.exe hiding?

MrDrews
  • 2,139
  • 2
  • 22
  • 22

3 Answers3

13

The simple answer is, cause it's embedded in Eclipse so you can't call it from console. If you like to do this you have to install Maven yourself.

khmarbaise
  • 92,914
  • 28
  • 189
  • 235
9

There is no mvn.exe at all. The Maven distro comes with batch or shell scripts. Eclipse runs an embedded version which is called through an API.

Michael-O
  • 18,123
  • 6
  • 55
  • 121
1

remember, embedded maven is not configured to work out of eclipse environment (and terminal usage is out of STS usage).
we have to install maven.
and also note, there is no "mvn.exe"
follow the following to setup maven to work from terminal.
maven download link is here
download latest maven from here
extract it where ever you want.

i extracted as below (see the bin,boot,conf,... folders are shown below as in the image): enter image description here

as this maven download is extracted from zip file (it is not setup), you will have to add this extracted path to "PATH" variable in windows environment. follow this to set environment path:
enter image description here enter image description here enter image description here enter image description here

now "mvn" command must work.
in my case, i use STS (spring tool suite)
and i had to restart STS for "mvn" to work in terminal in sts.
check it out with eclipse.

sifr_dot_in
  • 3,153
  • 2
  • 33
  • 42