Reputation: 13563
I have downloaded STS 3.7.2 and would like to add the maven folder to the windows 8 classpaths. This way I would be able to use command line commands such as mvn spring-boot:run
But where do I find that one maven folder within the STS folder?
Upvotes: 2
Views: 13577
Reputation: 3623
remember, in "STS", maven is not configured to work out of STS (and terminal usage is out of STS usage).
we have to install maven.
follow the following to setup maven to work from terminal.
maven download link is 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:
3.
4.
5.
6.
now "mvn" command must work.
7. in my case, i use STS
and i had to restart STS (spring tool suit) for "mvn" to work in terminal in sts
Upvotes: 0
Reputation: 7988
If I run the mvn command from the command line it runs
"C:\Program Files\Java\jdk1.7.0_79\bin\java.exe" -classpath "C:\opensource\apache-maven-3.3.9\bin\..\boot\plexus-classworlds-2.5.2.jar" "-Dclassworlds.conf=C:\opensource\apache-maven-3.3.9\bin\..\bin\m2.conf" "-Dmaven.home=C:\opensource\apache-maven-3.3.9\bin\.." "-Dmaven.multiModuleProjectDirectory=C:\opensource\apache-maven-3.3.9\bin" org.codehaus.plexus.classworlds.launcher.Launcher
plexus-classworlds-2.5.2.jar is found in the following STS directory
./sts-3.6.4.RELEASE/plugins/org.eclipse.m2e.maven.runtime_1.6.2.20150902-0001/jars/plexus-classworlds-2.5.2.jar
Having said that I think it would be far easier to just download the full maven from https://maven.apache.org/download.cgi unzip it into any directory, then add the environment variable M2_HOME as ..../apache-maven-3.3.9 then add %M2_HOME%/bin to the path.
Hope this helps.
Upvotes: 2