[MWRAPPER-67] Remove '\r' from wrapperUrl when used on windows via mvnw script

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 '\r').  To ensure that is not the case, make sure to strip '\r' 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 carriage return feeds.

note: This only affected the download.  It worked otherwise.

Overall issue is due to how IFS works, it does not consider '\r'.
diff --git a/maven-wrapper-distribution/src/resources/mvnw b/maven-wrapper-distribution/src/resources/mvnw
old mode 100755
new mode 100644
index c5abf3c..37e0a57
--- a/maven-wrapper-distribution/src/resources/mvnw
+++ b/maven-wrapper-distribution/src/resources/mvnw
@@ -199,7 +199,9 @@
       wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/@@project.version@@/maven-wrapper-@@project.version@@.jar"
     fi
     while IFS="=" read -r key value; do
-      case "$key" in (wrapperUrl) wrapperUrl="$value"; break ;;
+      # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' )
+      safeValue=$(echo "$value" | tr -d '\r')
+      case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;;
       esac
     done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
     log "Downloading from: $wrapperUrl"