maven-wrapper
maven-wrapper copied to clipboard
[MWRAPPER-76] Error "{6}" was unexpected at this time (Windows 10)
Svein opened MWRAPPER-76 and commented
Testes and i worked on this path: C:\tmp\New (2){6} folder\my-app57(2). The problem is the ')' character.
My solution is:
@setlocal EnableDelayedExpansion and !WRAPPER_JAR!.
@setlocal EnableDelayedExpansion
powershell -Command "&{"^
"$webclient = new-object System.Net.WebClient;"^
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '!WRAPPER_JAR!')"^
"}"
@endlocal
Affects: 3.1.1
Artur commented
Thanks, we faced the same problem and are now using a manually patched version of mvnw.cmd with this fix