Skip to content

Commit 36a08bd

Browse files
pan3793dongjoon-hyun
authored andcommitted
[SPARK-52568][BUILD] Fix exec-maven-plugin version used by dev/test-dependencies.sh
### What changes were proposed in this pull request? Fix `exec-maven-plugin` version used by `dev/test-dependencies.sh` to use the `exec-maven-plugin.version` defined in `pom.xml`, instead of the hardcoded old version(which does not work with Maven 4). ### Why are the changes needed? Keep toolchain version consistency, and prepare for Maven 4 support. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Run `./dev/test-dependencies.sh` ``` ... ++ build/mvn help:evaluate -Dexpression=exec-maven-plugin.version -q -DforceStdout ++ grep -E '[0-9]+\.[0-9]+\.[0-9]+' Using `mvn` from path: /Users/chengpan/Projects/apache-spark/build/apache-maven-3.9.10/bin/mvn + MVN_EXEC_PLUGIN_VERSION=3.5.0 + set +e ++ build/mvn -q -Dexec.executable=echo '-Dexec.args=${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:3.5.0:exec ... ``` And pass GHA. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #51273 from pan3793/SPARK-52568. Authored-by: Cheng Pan <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent c0c017a commit 36a08bd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dev/test-dependencies.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ HADOOP_HIVE_PROFILES=(
3737
hadoop-3-hive-2.3
3838
)
3939

40+
MVN_EXEC_PLUGIN_VERSION=$(build/mvn help:evaluate \
41+
-Dexpression=exec-maven-plugin.version -q -DforceStdout | grep -E "[0-9]+\.[0-9]+\.[0-9]+")
42+
4043
# We'll switch the version to a temp. one, publish POMs using that new version, then switch back to
4144
# the old version. We need to do this because the `dependency:build-classpath` task needs to
4245
# resolve Spark's internal submodule dependencies.
@@ -47,7 +50,7 @@ OLD_VERSION=$($MVN -q \
4750
-Dexec.executable="echo" \
4851
-Dexec.args='${project.version}' \
4952
--non-recursive \
50-
org.codehaus.mojo:exec-maven-plugin:1.6.0:exec | grep -E '[0-9]+\.[0-9]+\.[0-9]+')
53+
org.codehaus.mojo:exec-maven-plugin:${MVN_EXEC_PLUGIN_VERSION}:exec | grep -E '[0-9]+\.[0-9]+\.[0-9]+')
5154
# dependency:get for guava and jetty-io are workaround for SPARK-37302.
5255
GUAVA_VERSION=$(build/mvn help:evaluate -Dexpression=guava.version -q -DforceStdout | grep -E "^[0-9\.]+")
5356
build/mvn dependency:get -Dartifact=com.google.guava:guava:${GUAVA_VERSION} -q
@@ -61,7 +64,7 @@ SCALA_BINARY_VERSION=$($MVN -q \
6164
-Dexec.executable="echo" \
6265
-Dexec.args='${scala.binary.version}' \
6366
--non-recursive \
64-
org.codehaus.mojo:exec-maven-plugin:1.6.0:exec | grep -E '[0-9]+\.[0-9]+')
67+
org.codehaus.mojo:exec-maven-plugin:${MVN_EXEC_PLUGIN_VERSION}:exec | grep -E '[0-9]+\.[0-9]+')
6568
if [[ "$SCALA_BINARY_VERSION" != "2.13" ]]; then
6669
echo "Skip dependency testing on $SCALA_BINARY_VERSION"
6770
exit 0

0 commit comments

Comments
 (0)