From 0da44febf04ecd897823fa9f149461dbb24d5222 Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Sun, 3 Aug 2025 15:01:50 -0400 Subject: [PATCH 1/4] Tabs to spaces --- .../src/resources/mvnw.cmd | 12 ++++----- .../src/resources/only-mvnw | 26 +++++++++---------- src/site/markdown/CHANGELOG.old.md | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/maven-wrapper-distribution/src/resources/mvnw.cmd b/maven-wrapper-distribution/src/resources/mvnw.cmd index 708460f9..97fff177 100644 --- a/maven-wrapper-distribution/src/resources/mvnw.cmd +++ b/maven-wrapper-distribution/src/resources/mvnw.cmd @@ -141,12 +141,12 @@ if exist %WRAPPER_JAR% ( ) 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('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ - "}" + "$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('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ + "}" if "%MVNW_VERBOSE%" == "true" ( echo Finished downloading %WRAPPER_JAR% ) diff --git a/maven-wrapper-distribution/src/resources/only-mvnw b/maven-wrapper-distribution/src/resources/only-mvnw index 93373137..73c550f9 100755 --- a/maven-wrapper-distribution/src/resources/only-mvnw +++ b/maven-wrapper-distribution/src/resources/only-mvnw @@ -202,19 +202,19 @@ elif set_java_home; then javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" cat >"$javaSource" <<-END - public class Downloader extends java.net.Authenticator - { - protected java.net.PasswordAuthentication getPasswordAuthentication() - { - return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); - } - public static void main( String[] args ) throws Exception - { - setDefault( new Downloader() ); - java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); - } - } - END + public class Downloader extends java.net.Authenticator + { + protected java.net.PasswordAuthentication getPasswordAuthentication() + { + return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); + } + public static void main( String[] args ) throws Exception + { + setDefault( new Downloader() ); + java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); + } + } + END # For Cygwin/MinGW, switch paths to Windows format before running javac and java verbose " - Compiling Downloader.java ..." "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" diff --git a/src/site/markdown/CHANGELOG.old.md b/src/site/markdown/CHANGELOG.old.md index c6b0a82e..1c4e619e 100644 --- a/src/site/markdown/CHANGELOG.old.md +++ b/src/site/markdown/CHANGELOG.old.md @@ -51,7 +51,7 @@ at an easier glance. - fixes https://github.com/takari/maven-wrapper/issues/109 - see https://github.com/takari/maven-wrapper/pull/111 - contributed by Piotrek Żygieło https://github.com/pzygielo and - Sebastian Peters https://github.com/sepe81, + Sebastian Peters https://github.com/sepe81, Release performed by Manfred Moser - http://www.simpligility.com From 24f1a4dd469e347184da29d936c56fb21c7fd0c7 Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Tue, 26 Aug 2025 16:29:00 -0400 Subject: [PATCH 2/4] [eol] Fix end of file markers --- maven-wrapper-plugin/src/it/projects/default/pom.xml | 2 +- maven-wrapper-plugin/src/it/projects/includeDebug/pom.xml | 2 +- .../src/it/projects/includeDebug/test.properties | 2 +- maven-wrapper-plugin/src/it/projects/mavenversion/pom.xml | 2 +- .../src/it/projects/mavenversion/test.properties | 2 +- .../src/it/projects/sha256_distribution/test.properties | 2 +- .../src/it/projects/sha256_type_only-script/test.properties | 2 +- .../src/it/projects/sha256_wrapper/test.properties | 2 +- maven-wrapper-plugin/src/it/projects/type_bin/pom.xml | 2 +- maven-wrapper-plugin/src/it/projects/type_bin/test.properties | 2 +- .../src/it/projects/type_only-script-fail/test.properties | 2 +- maven-wrapper-plugin/src/it/projects/type_script/pom.xml | 2 +- .../src/it/projects/type_script/test.properties | 2 +- maven-wrapper-plugin/src/it/projects/type_source/pom.xml | 2 +- .../src/it/projects/type_source/test.properties | 2 +- maven-wrapper-plugin/src/it/projects/type_unknown/pom.xml | 2 +- .../.mvn/wrapper/maven-wrapper.properties | 2 +- .../src/it/projects/upgrade_with_existing_type/pom.xml | 2 +- src/site/resources/download.cgi | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/maven-wrapper-plugin/src/it/projects/default/pom.xml b/maven-wrapper-plugin/src/it/projects/default/pom.xml index 2a01d776..a8c9a6d5 100644 --- a/maven-wrapper-plugin/src/it/projects/default/pom.xml +++ b/maven-wrapper-plugin/src/it/projects/default/pom.xml @@ -63,4 +63,4 @@ under the License. - \ No newline at end of file + diff --git a/maven-wrapper-plugin/src/it/projects/includeDebug/pom.xml b/maven-wrapper-plugin/src/it/projects/includeDebug/pom.xml index 2a01d776..a8c9a6d5 100644 --- a/maven-wrapper-plugin/src/it/projects/includeDebug/pom.xml +++ b/maven-wrapper-plugin/src/it/projects/includeDebug/pom.xml @@ -63,4 +63,4 @@ under the License. - \ No newline at end of file + diff --git a/maven-wrapper-plugin/src/it/projects/includeDebug/test.properties b/maven-wrapper-plugin/src/it/projects/includeDebug/test.properties index 0f1a0a6f..e93b3a71 100644 --- a/maven-wrapper-plugin/src/it/projects/includeDebug/test.properties +++ b/maven-wrapper-plugin/src/it/projects/includeDebug/test.properties @@ -15,4 +15,4 @@ # specific language governing permissions and limitations # under the License. -includeDebug=true \ No newline at end of file +includeDebug=true diff --git a/maven-wrapper-plugin/src/it/projects/mavenversion/pom.xml b/maven-wrapper-plugin/src/it/projects/mavenversion/pom.xml index 2a01d776..a8c9a6d5 100644 --- a/maven-wrapper-plugin/src/it/projects/mavenversion/pom.xml +++ b/maven-wrapper-plugin/src/it/projects/mavenversion/pom.xml @@ -63,4 +63,4 @@ under the License. - \ No newline at end of file + diff --git a/maven-wrapper-plugin/src/it/projects/mavenversion/test.properties b/maven-wrapper-plugin/src/it/projects/mavenversion/test.properties index 28146008..ef6174ec 100644 --- a/maven-wrapper-plugin/src/it/projects/mavenversion/test.properties +++ b/maven-wrapper-plugin/src/it/projects/mavenversion/test.properties @@ -15,4 +15,4 @@ # specific language governing permissions and limitations # under the License. -maven=3.6.3 \ No newline at end of file +maven=3.6.3 diff --git a/maven-wrapper-plugin/src/it/projects/sha256_distribution/test.properties b/maven-wrapper-plugin/src/it/projects/sha256_distribution/test.properties index c8a102d4..30451a7c 100644 --- a/maven-wrapper-plugin/src/it/projects/sha256_distribution/test.properties +++ b/maven-wrapper-plugin/src/it/projects/sha256_distribution/test.properties @@ -17,4 +17,4 @@ alwaysUnpack=true type=bin -distributionSha256Sum=7e0c63c6a99639e57cc64375d6717d72e301d8ab829fef2e145ee860317bc3cb \ No newline at end of file +distributionSha256Sum=7e0c63c6a99639e57cc64375d6717d72e301d8ab829fef2e145ee860317bc3cb diff --git a/maven-wrapper-plugin/src/it/projects/sha256_type_only-script/test.properties b/maven-wrapper-plugin/src/it/projects/sha256_type_only-script/test.properties index 8a731bcb..cbf51476 100644 --- a/maven-wrapper-plugin/src/it/projects/sha256_type_only-script/test.properties +++ b/maven-wrapper-plugin/src/it/projects/sha256_type_only-script/test.properties @@ -16,4 +16,4 @@ # under the License. type=only-script -distributionSha256Sum=7e0c63c6a99639e57cc64375d6717d72e301d8ab829fef2e145ee860317bc3cb \ No newline at end of file +distributionSha256Sum=7e0c63c6a99639e57cc64375d6717d72e301d8ab829fef2e145ee860317bc3cb diff --git a/maven-wrapper-plugin/src/it/projects/sha256_wrapper/test.properties b/maven-wrapper-plugin/src/it/projects/sha256_wrapper/test.properties index 64dd8552..79e34614 100644 --- a/maven-wrapper-plugin/src/it/projects/sha256_wrapper/test.properties +++ b/maven-wrapper-plugin/src/it/projects/sha256_wrapper/test.properties @@ -16,4 +16,4 @@ # under the License. type=bin -wrapperSha256Sum=7e0c63c6a99639e57cc64375d6717d72e301d8ab829fef2e145ee860317bc3cb \ No newline at end of file +wrapperSha256Sum=7e0c63c6a99639e57cc64375d6717d72e301d8ab829fef2e145ee860317bc3cb diff --git a/maven-wrapper-plugin/src/it/projects/type_bin/pom.xml b/maven-wrapper-plugin/src/it/projects/type_bin/pom.xml index 2a01d776..a8c9a6d5 100644 --- a/maven-wrapper-plugin/src/it/projects/type_bin/pom.xml +++ b/maven-wrapper-plugin/src/it/projects/type_bin/pom.xml @@ -63,4 +63,4 @@ under the License. - \ No newline at end of file + diff --git a/maven-wrapper-plugin/src/it/projects/type_bin/test.properties b/maven-wrapper-plugin/src/it/projects/type_bin/test.properties index b77cbfdd..4ed9b1df 100644 --- a/maven-wrapper-plugin/src/it/projects/type_bin/test.properties +++ b/maven-wrapper-plugin/src/it/projects/type_bin/test.properties @@ -15,4 +15,4 @@ # specific language governing permissions and limitations # under the License. -type=bin \ No newline at end of file +type=bin diff --git a/maven-wrapper-plugin/src/it/projects/type_only-script-fail/test.properties b/maven-wrapper-plugin/src/it/projects/type_only-script-fail/test.properties index 725ecf89..84769f45 100644 --- a/maven-wrapper-plugin/src/it/projects/type_only-script-fail/test.properties +++ b/maven-wrapper-plugin/src/it/projects/type_only-script-fail/test.properties @@ -16,4 +16,4 @@ # under the License. type=only-script -maven=0.0.0 \ No newline at end of file +maven=0.0.0 diff --git a/maven-wrapper-plugin/src/it/projects/type_script/pom.xml b/maven-wrapper-plugin/src/it/projects/type_script/pom.xml index 2a01d776..a8c9a6d5 100644 --- a/maven-wrapper-plugin/src/it/projects/type_script/pom.xml +++ b/maven-wrapper-plugin/src/it/projects/type_script/pom.xml @@ -63,4 +63,4 @@ under the License. - \ No newline at end of file + diff --git a/maven-wrapper-plugin/src/it/projects/type_script/test.properties b/maven-wrapper-plugin/src/it/projects/type_script/test.properties index 18216806..6f23499b 100644 --- a/maven-wrapper-plugin/src/it/projects/type_script/test.properties +++ b/maven-wrapper-plugin/src/it/projects/type_script/test.properties @@ -15,4 +15,4 @@ # specific language governing permissions and limitations # under the License. -type=script \ No newline at end of file +type=script diff --git a/maven-wrapper-plugin/src/it/projects/type_source/pom.xml b/maven-wrapper-plugin/src/it/projects/type_source/pom.xml index 2a01d776..a8c9a6d5 100644 --- a/maven-wrapper-plugin/src/it/projects/type_source/pom.xml +++ b/maven-wrapper-plugin/src/it/projects/type_source/pom.xml @@ -63,4 +63,4 @@ under the License. - \ No newline at end of file + diff --git a/maven-wrapper-plugin/src/it/projects/type_source/test.properties b/maven-wrapper-plugin/src/it/projects/type_source/test.properties index 1c83fbb0..47b85b87 100644 --- a/maven-wrapper-plugin/src/it/projects/type_source/test.properties +++ b/maven-wrapper-plugin/src/it/projects/type_source/test.properties @@ -15,4 +15,4 @@ # specific language governing permissions and limitations # under the License. -type=source \ No newline at end of file +type=source diff --git a/maven-wrapper-plugin/src/it/projects/type_unknown/pom.xml b/maven-wrapper-plugin/src/it/projects/type_unknown/pom.xml index ed54d551..4baf722d 100644 --- a/maven-wrapper-plugin/src/it/projects/type_unknown/pom.xml +++ b/maven-wrapper-plugin/src/it/projects/type_unknown/pom.xml @@ -26,4 +26,4 @@ under the License. extension 1.0.0-SNAPSHOT pom - \ No newline at end of file + diff --git a/maven-wrapper-plugin/src/it/projects/upgrade_with_existing_type/.mvn/wrapper/maven-wrapper.properties b/maven-wrapper-plugin/src/it/projects/upgrade_with_existing_type/.mvn/wrapper/maven-wrapper.properties index 3ba43029..cc8e886c 100644 --- a/maven-wrapper-plugin/src/it/projects/upgrade_with_existing_type/.mvn/wrapper/maven-wrapper.properties +++ b/maven-wrapper-plugin/src/it/projects/upgrade_with_existing_type/.mvn/wrapper/maven-wrapper.properties @@ -16,4 +16,4 @@ # under the License. distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip distributionType=bin -wrapperVersion=3.3.1 \ No newline at end of file +wrapperVersion=3.3.1 diff --git a/maven-wrapper-plugin/src/it/projects/upgrade_with_existing_type/pom.xml b/maven-wrapper-plugin/src/it/projects/upgrade_with_existing_type/pom.xml index 2a01d776..a8c9a6d5 100644 --- a/maven-wrapper-plugin/src/it/projects/upgrade_with_existing_type/pom.xml +++ b/maven-wrapper-plugin/src/it/projects/upgrade_with_existing_type/pom.xml @@ -63,4 +63,4 @@ under the License. - \ No newline at end of file + diff --git a/src/site/resources/download.cgi b/src/site/resources/download.cgi index 1b178d2e..4af6dd9d 100644 --- a/src/site/resources/download.cgi +++ b/src/site/resources/download.cgi @@ -19,4 +19,4 @@ # # Just call the standard mirrors.cgi script. It will use download.html # as the input template. -exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $* \ No newline at end of file +exec /www/www.apache.org/dyn/mirrors/mirrors.cgi $* From 3d6e07faa4ffcfb03366a23dd57dde994664ce8e Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Sat, 30 Aug 2025 15:52:07 -0400 Subject: [PATCH 3/4] Remove space before END to correct syntax error --- maven-wrapper-distribution/src/resources/only-mvnw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven-wrapper-distribution/src/resources/only-mvnw b/maven-wrapper-distribution/src/resources/only-mvnw index 73c550f9..909d7401 100755 --- a/maven-wrapper-distribution/src/resources/only-mvnw +++ b/maven-wrapper-distribution/src/resources/only-mvnw @@ -214,7 +214,7 @@ elif set_java_home; then java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); } } - END +END # For Cygwin/MinGW, switch paths to Windows format before running javac and java verbose " - Compiling Downloader.java ..." "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" From 5284d27fe298b442c511ad92c285dc873192694b Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Sun, 21 Sep 2025 17:35:49 -0400 Subject: [PATCH 4/4] Remove the - in << for cat as tabs removed --- maven-wrapper-distribution/src/resources/only-mvnw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maven-wrapper-distribution/src/resources/only-mvnw b/maven-wrapper-distribution/src/resources/only-mvnw index 909d7401..c0da9b8d 100755 --- a/maven-wrapper-distribution/src/resources/only-mvnw +++ b/maven-wrapper-distribution/src/resources/only-mvnw @@ -201,7 +201,7 @@ elif set_java_home; then verbose "Falling back to use Java to download" javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" - cat >"$javaSource" <<-END + cat >"$javaSource" <