[MWRAPPER-107] Windows script fails to process userinfo
- Dominant language
- Java
- Stars
- 254
- Forks
- 78
- Avg merge
- 5h 26m
- Merged PRs (30d)
- 2
Description
**[Delany](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=delany)** opened **[MWRAPPER-107](https://issues.apache.org/jira/browse/MWRAPPER-107?redirect=false)** and commented
The build fail when the [userinfo field](https://maven.apache.org/wrapper/index.html#using-basic-authentication-for-distribution-download) is set in the distributionUrl for type only-script, but only for mvnw.cmd. The mvnw scripts runs without error on Linux.
```
C:\git\tester [tester ≡]> .\mvnw.cmd clean -N
icm : Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (401) Unauthorized."
At line:1 char:53
+ ... 'mvnw.cmd'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-Command], MethodInvocationException
+ FullyQualifiedErrorId : WebException,Microsoft.PowerShell.Commands.InvokeCommandCommand
ECHO is on.
Cannot start maven from wrapper
C:\git\tester [tester ≡]>
```
https://maven.apache.org/wrapper/index.html#using-basic-authentication-for-distribution-download
---
**Affects:** 3.2.0
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with mvnw.cmd and compare its handling of distributionUrl userinfo with the Linux mvnw script. Reproduce the issue with .\mvnw.cmd clean -N using the documented basic-authentication setup; done means the Windows wrapper downloads the distribution without the 401 error and starts Maven.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100