Skip to content
Merged
50 changes: 43 additions & 7 deletions mvnw
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Apache Maven Wrapper startup batch script, version 3.3.2
# Apache Maven Wrapper startup batch script, version 3.3.3
#
# Optional ENV vars
# -----------------
Expand Down Expand Up @@ -105,14 +105,17 @@ trim() {
printf "%s" "${1}" | tr -d '[:space:]'
}

scriptDir="$(dirname "$0")"
scriptName="$(basename "$0")"

# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
while IFS="=" read -r key value; do
case "${key-}" in
distributionUrl) distributionUrl=$(trim "${value-}") ;;
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
esac
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties"
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties"
done <"$scriptDir/.mvn/wrapper/maven-wrapper.properties"
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"

case "${distributionUrl##*/}" in
maven-mvnd-*bin.*)
Expand All @@ -130,7 +133,7 @@ maven-mvnd-*bin.*)
distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip"
;;
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;;
*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;
*) MVN_CMD="mvn${scriptName#mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;
esac

# apply MVNW_REPOURL and calculate MAVEN_HOME
Expand Down Expand Up @@ -227,7 +230,7 @@ if [ -n "${distributionSha256Sum-}" ]; then
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
exit 1
elif command -v sha256sum >/dev/null; then
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then
distributionSha256Result=true
fi
elif command -v shasum >/dev/null; then
Expand All @@ -252,8 +255,41 @@ if command -v unzip >/dev/null; then
else
tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar"
fi
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url"
mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME"

# Find the actual extracted directory name (handles snapshots where filename != directory name)
actualDistributionDir=""

# First try the expected directory name (for regular distributions)
if [ -d "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" ]; then
if [ -f "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/bin/$MVN_CMD" ]; then
actualDistributionDir="$distributionUrlNameMain"
fi
fi

# If not found, search for any directory with the Maven executable (for snapshots)
if [ -z "$actualDistributionDir" ]; then
# enable globbing to iterate over items
set +f
for dir in "$TMP_DOWNLOAD_DIR"/*; do
if [ -d "$dir" ]; then
if [ -f "$dir/bin/$MVN_CMD" ]; then
actualDistributionDir="$(basename "$dir")"
break
fi
fi
done
set -f
fi

if [ -z "$actualDistributionDir" ]; then
verbose "Contents of $TMP_DOWNLOAD_DIR:"
verbose "$(ls -la "$TMP_DOWNLOAD_DIR")"
die "Could not find Maven distribution directory in extracted archive"
fi

verbose "Found extracted Maven distribution directory: $actualDistributionDir"
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$actualDistributionDir/mvnw.url"
mv -- "$TMP_DOWNLOAD_DIR/$actualDistributionDir" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME"

clean || :
exec_maven "$@"
30 changes: 12 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.airlift</groupId>
<artifactId>airbase</artifactId>
<version>295</version>
<version>296</version>
</parent>

<groupId>io.trino</groupId>
Expand Down Expand Up @@ -196,7 +196,7 @@
<dep.frontend-node.version>v22.14.0</dep.frontend-node.version>
<dep.frontend-npm.version>11.2.0</dep.frontend-npm.version>
<dep.gib.version>4.5.4</dep.gib.version>
<dep.httpcore5.version>5.3.4</dep.httpcore5.version>
<dep.httpcore5.version>5.3.5</dep.httpcore5.version>
<dep.iceberg.version>1.9.2</dep.iceberg.version>
<dep.jna.version>5.17.0</dep.jna.version>
<dep.jsonwebtoken.version>0.13.0</dep.jsonwebtoken.version>
Expand All @@ -207,13 +207,13 @@
<dep.parquet.version>1.15.2</dep.parquet.version>
<dep.plugin.failsafe.version>${dep.plugin.surefire.version}</dep.plugin.failsafe.version>
<dep.protobuf.version>3.25.8</dep.protobuf.version>
<dep.snowflake.version>3.26.0</dep.snowflake.version>
<dep.snowflake.version>3.26.1</dep.snowflake.version>
<dep.swagger.version>2.2.36</dep.swagger.version>
<dep.takari.version>2.3.2</dep.takari.version>
<dep.tcnative.version>2.0.73.Final</dep.tcnative.version>
<dep.tempto.version>202</dep.tempto.version>
<dep.wire.version>5.2.1</dep.wire.version>
<dep.zookeeper.version>3.9.3</dep.zookeeper.version>
<dep.zookeeper.version>3.9.4</dep.zookeeper.version>
<extraJavaVectorArgs>--add-modules=jdk.incubator.vector</extraJavaVectorArgs>
<!--
Instructs Provisio to write runtime dependencies in the format groupId_artifactId-version.jar.
Expand All @@ -236,7 +236,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>26.66.0</version>
<version>26.67.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -300,15 +300,15 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.32.31</version>
<version>2.33.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>com.adobe.testing</groupId>
<artifactId>s3mock-testcontainers</artifactId>
<version>4.7.0</version>
<version>4.8.0</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -549,7 +549,7 @@
<dependency>
<groupId>com.nimbusds</groupId>
<artifactId>oauth2-oidc-sdk</artifactId>
<version>11.27.1</version>
<version>11.28</version>
<classifier>jdk11</classifier>
</dependency>

Expand Down Expand Up @@ -808,7 +808,7 @@
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
<version>4.2.34</version>
<version>4.2.36</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -2242,7 +2242,7 @@
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
<version>3.49.5</version>
<version>3.50.0</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -2297,7 +2297,7 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>26.0.2</version>
<version>26.0.2-1</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -2390,7 +2390,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.4</version>
<version>2.5</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -2491,12 +2491,6 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-wrapper-plugin</artifactId>
<version>3.3.2</version>
</plugin>

<plugin>
<groupId>org.skife.maven</groupId>
<artifactId>really-executable-jar-maven-plugin</artifactId>
Expand Down
Loading