diff options
| author | 2025-11-02 17:38:02 +0200 | |
|---|---|---|
| committer | 2026-01-10 16:18:09 +0200 | |
| commit | 03e46ed58ad195b76e1d9955e8ef7e881b3506cf (patch) | |
| tree | e3ab6c068fe1c2e6c7b1e499b41a650230c16d8c | |
| parent | Remove shellcheck-precommit (diff) | |
| download | lv.enes:parent-03e46ed58ad195b76e1d9955e8ef7e881b3506cf.tar.gz lv.enes:parent-03e46ed58ad195b76e1d9955e8ef7e881b3506cf.tar.xz lv.enes:parent-03e46ed58ad195b76e1d9955e8ef7e881b3506cf.zip | |
Update wrapper-plugin
| -rw-r--r-- | .mvn/wrapper/maven-wrapper.properties | 18 | ||||
| -rwxr-xr-x | mvnw | 50 | ||||
| -rw-r--r-- | mvnw.cmd | 56 | ||||
| -rw-r--r-- | pom.xml | 2 |
4 files changed, 93 insertions, 33 deletions
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 728969c..e276498 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties | |||
| @@ -1,19 +1,3 @@ | |||
| 1 | # Licensed to the Apache Software Foundation (ASF) under one | 1 | wrapperVersion=3.3.4 |
| 2 | # or more contributor license agreements. See the NOTICE file | ||
| 3 | # distributed with this work for additional information | ||
| 4 | # regarding copyright ownership. The ASF licenses this file | ||
| 5 | # to you under the Apache License, Version 2.0 (the | ||
| 6 | # "License"); you may not use this file except in compliance | ||
| 7 | # with the License. You may obtain a copy of the License at | ||
| 8 | # | ||
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | # | ||
| 11 | # Unless required by applicable law or agreed to in writing, | ||
| 12 | # software distributed under the License is distributed on an | ||
| 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| 14 | # KIND, either express or implied. See the License for the | ||
| 15 | # specific language governing permissions and limitations | ||
| 16 | # under the License. | ||
| 17 | wrapperVersion=3.3.2 | ||
| 18 | distributionType=only-script | 2 | distributionType=only-script |
| 19 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/4.0.0-rc-4/apache-maven-4.0.0-rc-4-bin.zip | 3 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/4.0.0-rc-4/apache-maven-4.0.0-rc-4-bin.zip |
| @@ -19,7 +19,7 @@ | |||
| 19 | # ---------------------------------------------------------------------------- | 19 | # ---------------------------------------------------------------------------- |
| 20 | 20 | ||
| 21 | # ---------------------------------------------------------------------------- | 21 | # ---------------------------------------------------------------------------- |
| 22 | # Apache Maven Wrapper startup batch script, version 3.3.2 | 22 | # Apache Maven Wrapper startup batch script, version 3.3.4 |
| 23 | # | 23 | # |
| 24 | # Optional ENV vars | 24 | # Optional ENV vars |
| 25 | # ----------------- | 25 | # ----------------- |
| @@ -105,14 +105,17 @@ trim() { | |||
| 105 | printf "%s" "${1}" | tr -d '[:space:]' | 105 | printf "%s" "${1}" | tr -d '[:space:]' |
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | scriptDir="$(dirname "$0")" | ||
| 109 | scriptName="$(basename "$0")" | ||
| 110 | |||
| 108 | # parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties | 111 | # parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties |
| 109 | while IFS="=" read -r key value; do | 112 | while IFS="=" read -r key value; do |
| 110 | case "${key-}" in | 113 | case "${key-}" in |
| 111 | distributionUrl) distributionUrl=$(trim "${value-}") ;; | 114 | distributionUrl) distributionUrl=$(trim "${value-}") ;; |
| 112 | distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; | 115 | distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; |
| 113 | esac | 116 | esac |
| 114 | done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" | 117 | done <"$scriptDir/.mvn/wrapper/maven-wrapper.properties" |
| 115 | [ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" | 118 | [ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" |
| 116 | 119 | ||
| 117 | case "${distributionUrl##*/}" in | 120 | case "${distributionUrl##*/}" in |
| 118 | maven-mvnd-*bin.*) | 121 | maven-mvnd-*bin.*) |
| @@ -130,7 +133,7 @@ maven-mvnd-*bin.*) | |||
| 130 | distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" | 133 | distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" |
| 131 | ;; | 134 | ;; |
| 132 | maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; | 135 | maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; |
| 133 | *) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; | 136 | *) MVN_CMD="mvn${scriptName#mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; |
| 134 | esac | 137 | esac |
| 135 | 138 | ||
| 136 | # apply MVNW_REPOURL and calculate MAVEN_HOME | 139 | # apply MVNW_REPOURL and calculate MAVEN_HOME |
| @@ -227,7 +230,7 @@ if [ -n "${distributionSha256Sum-}" ]; then | |||
| 227 | echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 | 230 | echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 |
| 228 | exit 1 | 231 | exit 1 |
| 229 | elif command -v sha256sum >/dev/null; then | 232 | elif command -v sha256sum >/dev/null; then |
| 230 | if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then | 233 | if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then |
| 231 | distributionSha256Result=true | 234 | distributionSha256Result=true |
| 232 | fi | 235 | fi |
| 233 | elif command -v shasum >/dev/null; then | 236 | elif command -v shasum >/dev/null; then |
| @@ -252,8 +255,41 @@ if command -v unzip >/dev/null; then | |||
| 252 | else | 255 | else |
| 253 | tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" | 256 | tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" |
| 254 | fi | 257 | fi |
| 255 | printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" | 258 | |
| 256 | mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" | 259 | # Find the actual extracted directory name (handles snapshots where filename != directory name) |
| 260 | actualDistributionDir="" | ||
| 261 | |||
| 262 | # First try the expected directory name (for regular distributions) | ||
| 263 | if [ -d "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" ]; then | ||
| 264 | if [ -f "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/bin/$MVN_CMD" ]; then | ||
| 265 | actualDistributionDir="$distributionUrlNameMain" | ||
| 266 | fi | ||
| 267 | fi | ||
| 268 | |||
| 269 | # If not found, search for any directory with the Maven executable (for snapshots) | ||
| 270 | if [ -z "$actualDistributionDir" ]; then | ||
| 271 | # enable globbing to iterate over items | ||
| 272 | set +f | ||
| 273 | for dir in "$TMP_DOWNLOAD_DIR"/*; do | ||
| 274 | if [ -d "$dir" ]; then | ||
| 275 | if [ -f "$dir/bin/$MVN_CMD" ]; then | ||
| 276 | actualDistributionDir="$(basename "$dir")" | ||
| 277 | break | ||
| 278 | fi | ||
| 279 | fi | ||
| 280 | done | ||
| 281 | set -f | ||
| 282 | fi | ||
| 283 | |||
| 284 | if [ -z "$actualDistributionDir" ]; then | ||
| 285 | verbose "Contents of $TMP_DOWNLOAD_DIR:" | ||
| 286 | verbose "$(ls -la "$TMP_DOWNLOAD_DIR")" | ||
| 287 | die "Could not find Maven distribution directory in extracted archive" | ||
| 288 | fi | ||
| 289 | |||
| 290 | verbose "Found extracted Maven distribution directory: $actualDistributionDir" | ||
| 291 | printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$actualDistributionDir/mvnw.url" | ||
| 292 | mv -- "$TMP_DOWNLOAD_DIR/$actualDistributionDir" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" | ||
| 257 | 293 | ||
| 258 | clean || : | 294 | clean || : |
| 259 | exec_maven "$@" | 295 | exec_maven "$@" |
| @@ -19,7 +19,7 @@ | |||
| 19 | @REM ---------------------------------------------------------------------------- | 19 | @REM ---------------------------------------------------------------------------- |
| 20 | 20 | ||
| 21 | @REM ---------------------------------------------------------------------------- | 21 | @REM ---------------------------------------------------------------------------- |
| 22 | @REM Apache Maven Wrapper startup batch script, version 3.3.2 | 22 | @REM Apache Maven Wrapper startup batch script, version 3.3.4 |
| 23 | @REM | 23 | @REM |
| 24 | @REM Optional ENV vars | 24 | @REM Optional ENV vars |
| 25 | @REM MVNW_REPOURL - repo url base for downloading maven distribution | 25 | @REM MVNW_REPOURL - repo url base for downloading maven distribution |
| @@ -40,7 +40,7 @@ | |||
| 40 | @SET __MVNW_ARG0_NAME__= | 40 | @SET __MVNW_ARG0_NAME__= |
| 41 | @SET MVNW_USERNAME= | 41 | @SET MVNW_USERNAME= |
| 42 | @SET MVNW_PASSWORD= | 42 | @SET MVNW_PASSWORD= |
| 43 | @IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) | 43 | @IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*) |
| 44 | @echo Cannot start maven from wrapper >&2 && exit /b 1 | 44 | @echo Cannot start maven from wrapper >&2 && exit /b 1 |
| 45 | @GOTO :EOF | 45 | @GOTO :EOF |
| 46 | : end batch / begin powershell #> | 46 | : end batch / begin powershell #> |
| @@ -73,16 +73,30 @@ switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { | |||
| 73 | # apply MVNW_REPOURL and calculate MAVEN_HOME | 73 | # apply MVNW_REPOURL and calculate MAVEN_HOME |
| 74 | # maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> | 74 | # maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> |
| 75 | if ($env:MVNW_REPOURL) { | 75 | if ($env:MVNW_REPOURL) { |
| 76 | $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } | 76 | $MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" } |
| 77 | $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" | 77 | $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')" |
| 78 | } | 78 | } |
| 79 | $distributionUrlName = $distributionUrl -replace '^.*/','' | 79 | $distributionUrlName = $distributionUrl -replace '^.*/','' |
| 80 | $distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' | 80 | $distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' |
| 81 | $MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" | 81 | |
| 82 | $MAVEN_M2_PATH = "$HOME/.m2" | ||
| 82 | if ($env:MAVEN_USER_HOME) { | 83 | if ($env:MAVEN_USER_HOME) { |
| 83 | $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" | 84 | $MAVEN_M2_PATH = "$env:MAVEN_USER_HOME" |
| 85 | } | ||
| 86 | |||
| 87 | if (-not (Test-Path -Path $MAVEN_M2_PATH)) { | ||
| 88 | New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null | ||
| 89 | } | ||
| 90 | |||
| 91 | $MAVEN_WRAPPER_DISTS = $null | ||
| 92 | if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) { | ||
| 93 | $MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists" | ||
| 94 | } else { | ||
| 95 | $MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists" | ||
| 84 | } | 96 | } |
| 85 | $MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' | 97 | |
| 98 | $MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain" | ||
| 99 | $MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' | ||
| 86 | $MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" | 100 | $MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" |
| 87 | 101 | ||
| 88 | if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { | 102 | if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { |
| @@ -134,7 +148,33 @@ if ($distributionSha256Sum) { | |||
| 134 | 148 | ||
| 135 | # unzip and move | 149 | # unzip and move |
| 136 | Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null | 150 | Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null |
| 137 | Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null | 151 | |
| 152 | # Find the actual extracted directory name (handles snapshots where filename != directory name) | ||
| 153 | $actualDistributionDir = "" | ||
| 154 | |||
| 155 | # First try the expected directory name (for regular distributions) | ||
| 156 | $expectedPath = Join-Path "$TMP_DOWNLOAD_DIR" "$distributionUrlNameMain" | ||
| 157 | $expectedMvnPath = Join-Path "$expectedPath" "bin/$MVN_CMD" | ||
| 158 | if ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) { | ||
| 159 | $actualDistributionDir = $distributionUrlNameMain | ||
| 160 | } | ||
| 161 | |||
| 162 | # If not found, search for any directory with the Maven executable (for snapshots) | ||
| 163 | if (!$actualDistributionDir) { | ||
| 164 | Get-ChildItem -Path "$TMP_DOWNLOAD_DIR" -Directory | ForEach-Object { | ||
| 165 | $testPath = Join-Path $_.FullName "bin/$MVN_CMD" | ||
| 166 | if (Test-Path -Path $testPath -PathType Leaf) { | ||
| 167 | $actualDistributionDir = $_.Name | ||
| 168 | } | ||
| 169 | } | ||
| 170 | } | ||
| 171 | |||
| 172 | if (!$actualDistributionDir) { | ||
| 173 | Write-Error "Could not find Maven distribution directory in extracted archive" | ||
| 174 | } | ||
| 175 | |||
| 176 | Write-Verbose "Found extracted Maven distribution directory: $actualDistributionDir" | ||
| 177 | Rename-Item -Path "$TMP_DOWNLOAD_DIR/$actualDistributionDir" -NewName $MAVEN_HOME_NAME | Out-Null | ||
| 138 | try { | 178 | try { |
| 139 | Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null | 179 | Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null |
| 140 | } catch { | 180 | } catch { |
| @@ -93,7 +93,7 @@ | |||
| 93 | <spotbugs-plugin.version>${spotbugs.version}.2</spotbugs-plugin.version> | 93 | <spotbugs-plugin.version>${spotbugs.version}.2</spotbugs-plugin.version> |
| 94 | <surefire-plugin.version>3.5.4</surefire-plugin.version> | 94 | <surefire-plugin.version>3.5.4</surefire-plugin.version> |
| 95 | <versions-plugin.version>2.19.1</versions-plugin.version> | 95 | <versions-plugin.version>2.19.1</versions-plugin.version> |
| 96 | <wrapper-plugin.version>3.3.2</wrapper-plugin.version> | 96 | <wrapper-plugin.version>3.3.4</wrapper-plugin.version> |
| 97 | </properties> | 97 | </properties> |
| 98 | 98 | ||
| 99 | <dependencyManagement> | 99 | <dependencyManagement> |