简体   繁体   中英

JHipster Error: Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain

I created two JHipster projects, the same way, a gateway and a microservice. The microservice has nothing wrong, however whene I try to run ./mvnw clean install in the gateway root I get the following error:

Error: Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain

The only way I found to fix this is to copy the maven-wrapper.jar from .mvnw/wrapper of the microservice app to the gateway. Of course I think there should be a better way to fix this. Any idea?

My guess is that you copied mvnw from somewhere else. That will not work because, as you mentioned, the dependencies of the script are not properly set up.

Run mvn -N io.takari:maven:wrapper at the root of your projects.

https://github.com/takari/takari-maven-plugin

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM