spring-attic / tut-react-and-spring-data-rest

React.js and Spring Data REST :: A tutorial based on the 5-part blog series by Greg Turnquist
https://spring.io/guides/tutorials/react-and-spring-data-rest
882 stars 1.57k forks source link

error: H2_home is set to invalid directory when build using mvnw #99

Closed idhowardgj94 closed 5 years ago

idhowardgj94 commented 5 years ago

environment: Windows 10, JAVA version: 1.8 I'm not install mvn, and try to use mvnw in project directory to build java project.

I'm using the follow command : .\mvnw clean install

and this is Error Output

Error: M2_HOME is set to an invalid directory. M2_HOME = "D:\workplace\tut-react-and-spring-data-rest\basic\.." Please set the M2_HOME variable in your environment to match the location of the Maven installation

that M2_home folder is my project folder.

I'm not doing anything, just clone and try to build.

do I miss anything to setup?

gregturn commented 5 years ago

As of https://github.com/spring-guides/tut-react-and-spring-data-rest/commit/25b87a0659ebc1753e8bb6fd45d661132da2455d, I have upgraded the version of maven wrapper used. Can you see if this works better for you?

NOTE: This update appears to have added a mvnw.cmd file, which may better serve your needs

gregturn commented 5 years ago

Feel free to reopen if this upgrade in maven wrapper doesn't solve the problem at hand.