apache / apache/maven-wrapper

[MWRAPPER-76] Error "{6}" was unexpected at this time (Windows 10)

Open
#286 2 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
254
Forks
78
Avg merge
5h 26m
Merged PRs (30d)
2

Description

**[Svein](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=svein)** opened **[MWRAPPER-76](https://issues.apache.org/jira/browse/MWRAPPER-76?redirect=false)** 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!.

 

```java
@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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.