Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

mvnw.cmd errors when used #106

Closed
HopefulLlama opened this issue Feb 19, 2019 · 7 comments
Closed

mvnw.cmd errors when used #106

HopefulLlama opened this issue Feb 19, 2019 · 7 comments

Comments

@HopefulLlama
Copy link

Hello, I installed the Maven wrapper today as the README instructs through:
mvn -N io.takari:maven:wrapper

The install completes successfully, with .mvn directory created with expected files, as well as mvnw and mvnw.cmd created.

However, following on, trying to use the mvnw.cmd (on Windows of course), fails with the following message:

.\mvnw.cmd clean
The syntax of the command is incorrect.

I'm not sure what the root of the problem is, but it seems like this is not the expected behaviour.

@mosabua
Copy link
Member

mosabua commented Feb 19, 2019

Can you provide more info and maybe pull request that fixes the issue? Also what wrapper version? Windows? Java?

@HopefulLlama
Copy link
Author

Wrapper version: 0.5.0
Windows version:

Edition: Windows 10 Enterprise
Version: 1703
OS Build: 15063.1508

Java version:

java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

@tbouffard
Copy link

I also reproduce this issue (Windows 10, Oracle JDK 1.8.0_192. wrapper 0.5.0)
As a workaround, I have commented line 134-136

@REM 	if exist %MVNW_REPOURL% (
@REM 	  SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.0/maven-wrapper-0.5.0.jar"
@REM 	)

The 3 lines above have been introduced in a1760e3
if exist %MVNW_REPOURL% in windows bat is to check if a file exists. Based on my understanding of the bat script and what is done in the sh script, I suppose we would like to check if the variable is set.
It could be replaced by if not "%MVNW_REPOURL%" == "" but it doesn't cover all cases (for instance if the variable only contains 2 double quotes)

@mosabua
Copy link
Member

mosabua commented Feb 20, 2019

Great.. I will try to fix this .. if anyone else wants to chime in an send a PR that would be great. My bat file knowledge is very limited/outdated.

@mosabua
Copy link
Member

mosabua commented Feb 20, 2019

Tried the above now.. that works for me. I will cut a new release shortly.

@mosabua
Copy link
Member

mosabua commented Feb 20, 2019

Fixed by #107

@mosabua mosabua closed this as completed Feb 20, 2019
@HopefulLlama
Copy link
Author

Thanks very much! Great work and quick too. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants