I am using STS (the Eclipse version for Spring) and it use the Maven plugin. It works fine but this Maven version is embedded into Eclipse.
Now I have to use it from the shell (the DOS prompt). If I try to perfrom thje mvn clean statment I obtain this error message:
C:\Users\Andrea\Documents\workspaces\Real-Time\ud381\lesson1\stage1>mvn
"mvn" non è riconosciuto come comando interno o esterno,
un programma eseguibile o un file batch.
This is in Italian languange and it simply say that it can't find an internal or external mvn command.
So I think that I have to add it to the PATH environment Windows variable so I will can use it inside the command prompt.
The problem is that I can't find where is this embedded Maven installation.
Where can I find it?
An embedded version of the Maven known as the Maven Embedder is already specified. This is what is used to execute Maven inside of Eclipse. If you have another installation of Maven which you would like to use instead of the Maven Embedder, you can add another Maven runtime by clicking on the Add..
To my knowledge, the Maven runtime that is embedded in m2 (the plug-in that provides Maven support in Eclipse) is not suited to be used outside the IDE.
You will have to install regular Maven (available from https://maven.apache.org/download.cgi) to be able to use it from the command line. From my experience, using both in parallel works well.
Alternatively, you can use Maven wrapper in your project - thus avoiding the need to install Maven for you and your team mates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With