[ 
https://issues.apache.org/jira/browse/MWRAPPER-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17538403#comment-17538403
 ] 

ASF GitHub Bot commented on MWRAPPER-67:
----------------------------------------

hazendaz commented on PR #44:
URL: https://github.com/apache/maven-wrapper/pull/44#issuecomment-1129200037

   The script file can be either windows or Unix based as that doesn't seem to 
cause issue.  Possibly it's from the read of wrapper properties.  Tried 
printing the data there but all looked ok.  Adding this did fix it.
   
   Sent from my Verizon, Samsung Galaxy smartphone
   Get Outlook for Android<https://aka.ms/AAb9ysg>
   ________________________________
   From: Michael Osipov ***@***.***>
   Sent: Tuesday, May 17, 2022 2:33:27 PM
   To: apache/maven-wrapper ***@***.***>
   Cc: Jeremy Landis ***@***.***>; Author ***@***.***>
   Subject: Re: [apache/maven-wrapper] [MWRAPPER-67] Remove invalid line 
endings from wrapperUrl when used with git bash with mvnw script (PR #44)
   
   
   @michael-o commented on this pull request.
   
   ________________________________
   
   In 
maven-wrapper-distribution/src/resources/mvnw<https://github.com/apache/maven-wrapper/pull/44#discussion_r875146529>:
   
   > @@ -198,6 +198,8 @@ else
        if [ "$MVNW_VERBOSE" = true ]; then
          echo "Downloading from: $wrapperUrl"
        fi
   +    # Remove invalid line endings from wrapperUrl
   +    wrapperUrl=${wrapperUrl%$'\r'}
   
   
   Where does the URL come from? Do we need to fix the line ending of this 
resource in Git?
   
   —
   Reply to this email directly, view it on 
GitHub<https://github.com/apache/maven-wrapper/pull/44#pullrequestreview-975930586>,
 or 
unsubscribe<https://github.com/notifications/unsubscribe-auth/AAHODI3AEZNI7SN3VKRO57DVKPQ7PANCNFSM5WFVGSHQ>.
   You are receiving this because you authored the thread.Message ID: 
***@***.***>
   




> mvnw script does not download jar if used in git bash in windows
> ----------------------------------------------------------------
>
>                 Key: MWRAPPER-67
>                 URL: https://issues.apache.org/jira/browse/MWRAPPER-67
>             Project: Maven Wrapper
>          Issue Type: Bug
>          Components: Maven Wrapper Scripts
>    Affects Versions: 3.1.1
>            Reporter: Jeremy Landis
>            Priority: Minor
>
> Usage of git bash will not download the maven wrapper jar along with curl 
> (probably others) due to having windows line endings in the URL (trailing).  
> To ensure that is not the case, make sure to strip invalid line endings out 
> before usage.
> Use case, ./mvnw in powershell will use mvnw.cmd and has no issues 
> downloading.  If user does same in git bash, it will fail with invalid URL 
> error with curl.  Using ./mvnw.cmd there will work but not natural usage.  To 
> ensure this simply just works for full support, trim out invalid line feeds.
> note: This only affected the download.  It worked otherwise.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to