First example shows expected results. Second example shows failure.
Example 1: run in directory containing mvnw.cmd
C:\Users\ccheetham\src\spring-cloud\spring-cloud-config>.\mvnw.cmd -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00)
Maven home: C:\Users\ccheetham\.m2\wrapper\dists\apache-maven-3.3.9-bin\2609u9g41na2l7ogackmif6fj2\apache-maven-3.3.9
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: C:\opt\oracle\jdk-8\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"
Example 2: run in directory not containing mvnw.cmd
C:\Users\ccheetham\src\spring-cloud\spring-cloud-config\spring-cloud-config-server>..\mvnw.cmd -version
Error: Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain
Comment From: spencergibb
That's an issue with the wrapper. Nothing we can do about it. You can run with ../
Comment From: ccheetham
The example was run on Windows. You cannot run with ../
. The probable may well be with the wrapper but the instructions as written will fail.
Comment From: ZKZonhastic
I met the same problem and started the server successfully with command below on Windows
mvnw -f ./spring-cloud-config-server/pom.xml spring-boot:run
Comment From: ionutale
2019 and i have the same problem mvnw is not recognized how can i fix this ?
Comment From: spencergibb
@jhonyourangel what are you trying?
Comment From: napster007
"mvnw spring-boot:run"
I am doing this for using spring framework then I gon an error said "'mvnw' is not recognized as an internal or external command," when I tried to run it in CMD
Comment From: spencergibb
In windows it would be mvnw.cmd
Comment From: napster007
In windows it would be mvnw.cmd
I see thank you