Closed steghio closed 4 years ago
Linked issue is https://github.com/takari/maven-wrapper/issues/149
Tested on Windows 10 Pro with Powershell 5.1.18362.145 (same behaviour with Windows Command Prompt)
❌ properties are not displayed, the name of the maven-wrapper.properties
is used as key instead. Notice that this issue already exists in the master
branch (see comments in #149)
maven-wrapper pr_150 $ $env:MVNW_VERBOSE='true'
maven-wrapper pr_150 $ .\mvnw clean
MAVEN_PROJECTBASEDIR is: F:\maven-wrapper
Reading properties from F:\maven-wrapper\.mvn\wrapper\maven-wrapper.properties
If the next lines look weird, check your line endings in your maven-wrapper.properties file
Got property: (F:\maven-wrapper\.mvn\wrapper\maven-wrapper.properties) value: ()
Found "F:\maven-wrapper\.mvn\wrapper\maven-wrapper.jar"
Takari Maven Wrapper 0.2.3
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< io.takari:maven-wrapper >-----------------------
[INFO] Building Maven Wrapper 0.5.6-SNAPSHOT
.....
Yes it still me for both :)
Fixed it by using ' type "%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties"'
and tested on Windows 7 with a folder that has a space in the path name as well as one that does not have it. Sample output:
xxx\ideaworkspace\sad lol\ilm-shared-static-resources>mvnw.cmd clean
MAVEN_PROJECTBASEDIR is: xxx\ideaworkspace\sad lol\ilm-shared-static-resources
Reading properties from xxx\ideaworkspace\sad lol\ilm-shared-static-resources\.mvn\wrapper\maven-wrapper.properties
If the next lines look weird, check your line endings in your maven-wrapper.properties file
Got property: (wrapperUrl) value: (xxx/public/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar)
Got property: (distributionUrl) value: (xxx/public/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip)
Couldn't find "xxx\ideaworkspace\sad lol\ilm-shared-static-resources\.mvn\wrapper\maven-wrapper.jar", downloading it ...
and
xxx\ideaworkspace\ilm-shared-static-resources>mvnw.cmd clean
MAVEN_PROJECTBASEDIR is: xxx\ideaworkspace\ilm-shared-static-resources
Reading properties from xxx\ideaworkspace\ilm-shared-static-resources\.mvn\wrapper\maven-wrapper.properties
If the next lines look weird, check your line endings in your maven-wrapper.properties file
Got property: (wrapperUrl) value: (xxx/public/io/takari/maven-wrapper/0.5.5/maven-wrapper-0.5.5.jar)
Got property: (distributionUrl) value: (xxx/public/org/apache/maven/apache-maven/3.6.2/apache-maven-3.6.2-bin.zip)
Couldn't find "xxx\ideaworkspace\ilm-shared-static-resources\.mvn\wrapper\maven-wrapper.jar", downloading it ...
The xxx
is me censoring some stuff I cannot share from my workplace
Hello,
is the PR good or do you require additional changes?
Thank you and have a nice day
Looks good. You will have to wait a while until I get around to looking at it and merging and cutting a release.
I confirm that this now works for both Powershell and Windows Prompt when running with folder name with or without spaces 👍
This project is essentially frozen for development and new efforts are ongoing in the Apache Maven project itself. We therefore close this PR. Please find more information at https://github.com/takari/maven-wrapper#ongoing-migration-to-apache-maven and participate in the development there.
Update Maven wrapper script to provide additional debug information. Specifically:
BASE_DIR
(Unix) orMAVEN_PROJECTBASEDIR
(Windows), which is where the.mvn
folder should residemaven-wrapper.properties
is being read, to ease following the debug linesmaven-wrapper.properties
encased in{}
for Unix and()
for Windows. If a broken line ending was found there, it would be part of the output or simply mess it up.Test on Ubuntu 18.04, sample output with
MVNW_VERBOSE=false
:For the following two samples I modified file
maven-wrapper.properties
to include two additional lines with random values.Sample output with
MVNW_VERBOSE=true
:sample output with
MVNW_VERBOSE=true
AND with amaven-wrapper.properties
file that uses Windows line endingsI think there is now enough information to understand the line ending issue more easily than by simply spotting the subtle
%0D
from the URLI modified the Windows script to do exactly the same, but do not have a Windows environment on which to test unfortunately.
Please let me know if you require changes
Thank you and have a nice day