Maven not recognized
Answered
I did get this error message in intellij while running a spring-boot server:
'mvn' is not recognized as an internal or external command, operable program or batch file
It didnt recognize maven when I was trying to build the project standing in my projectfolder with: mvn spring-boot:run
I solved this by downloading maven: https://maven.apache.org/install.html and manually added the bin file in the apache-maven-3.5.3 folder to librarys
It seems a bit backwards. Are there any other/better way?
Please sign in to leave a comment.
Per,
IntelliJ does come with Maven but the IntelliJ installer does not publish the location to the PATH environment variable to include the installation location ({INSTALLATION_BASE}/plugins/maven/lib/maven3/bin). Either do as you did and install maven separately or add the path above to your account's PATH variable.
Or, if you created your Spring Boot application using start.spring.io, use the mvnw script created by the Spring Initializr as this will download and run maven for you:
For Windows folks: