[ https://issues.apache.org/jira/browse/MWRAPPER-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17583656#comment-17583656 ]
Svein commented on MWRAPPER-48: ------------------------------- This is not working well in Windows. Found that this command make it fail: line 149: $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^. I did fix this by not using special characters in {color:#000000}%WRAPPER_JAR%. Testes and i worked on this path: C:\tmp\New (2)\{6} folder\my-app57(2). The problem is the ')' character. {color} {code:java} FOR %%I IN (%WRAPPER_JAR%) DO set WRAPPER_JAR_SHORT_NAME=%%~fsI 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_SHORT_NAME%')"^ "}" {code} {color:#000000}!2022-08-23_16-25-17.png!{color} > Error "}" was unexpected at this time (Windows 10) > -------------------------------------------------- > > Key: MWRAPPER-48 > URL: https://issues.apache.org/jira/browse/MWRAPPER-48 > Project: Maven Wrapper > Issue Type: Bug > Components: Maven Wrapper Scripts > Affects Versions: 0.5.6 > Reporter: Valentin Despa > Priority: Major > Labels: waiting-for-feedback > Fix For: 3.1.0 > > Attachments: 2022-08-23_16-25-17.png, demo.zip, > image-2022-02-06-14-14-42-220.png, not-working.png, working.png > > > I have generated a simple project using the Spring Initializr. If I try to > run the Maven wrapper from a workspace folder within Jenkins, the following > error occurs: > {{"}" was unexpected at this time}} > If I copy the project folder and run it from a different location, it works > with no issues. > A similar issue has been reported on Stackoverflow as well: > [https://stackoverflow.com/q/62028432/766177] > > -- This message was sent by Atlassian Jira (v8.20.10#820010)