You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ya...@apache.org on 2025/04/17 10:29:58 UTC
(spark) branch master updated: [SPARK-51832][BUILD] Use -q option to simplify maven version evaluation
This is an automated email from the ASF dual-hosted git repository.
yao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 9cea811bdf3a [SPARK-51832][BUILD] Use -q option to simplify maven version evaluation
9cea811bdf3a is described below
commit 9cea811bdf3a625a412aae0edf2cfd3507b4f6e0
Author: Kent Yao <ya...@apache.org>
AuthorDate: Thu Apr 17 18:29:45 2025 +0800
[SPARK-51832][BUILD] Use -q option to simplify maven version evaluation
### What changes were proposed in this pull request?
Use `-q` option to simplify Maven version evaluation
### Why are the changes needed?
code simplification
### Does this PR introduce _any_ user-facing change?
no, dev only
### How was this patch tested?
```
++ command -v /Users/hzyaoqin/spark/build/mvn
+ '[' '!' /Users/hzyaoqin/spark/build/mvn ']'
+ '[' false == true ']'
++ /Users/hzyaoqin/spark/build/mvn help:evaluate -Dexpression=project.version -Phive -Phive-thriftserver -Pyarn -Pkubernetes -q -DforceStdout
Using `mvn` from path: /Users/hzyaoqin/spark/build/apache-maven-3.9.9/bin/mvn
+ VERSION=4.1.0-SNAPSHOT
++ /Users/hzyaoqin/spark/build/mvn help:evaluate -Dexpression=scala.binary.version -Phive -Phive-thriftserver -Pyarn -Pkubernetes -q -DforceStdout
Using `mvn` from path: /Users/hzyaoqin/spark/build/apache-maven-3.9.9/bin/mvn
+ SCALA_VERSION=2.13
++ /Users/hzyaoqin/spark/build/mvn help:evaluate -Dexpression=hadoop.version -Phive -Phive-thriftserver -Pyarn -Pkubernetes -q -DforceStdout
Using `mvn` from path: /Users/hzyaoqin/spark/build/apache-maven-3.9.9/bin/mvn
+ SPARK_HADOOP_VERSION=3.4.1
```
### Was this patch authored or co-authored using generative AI tooling?
no
Closes #50620 from yaooqinn/SPARK-51832.
Authored-by: Kent Yao <ya...@apache.org>
Signed-off-by: Kent Yao <ya...@apache.org>
---
dev/make-distribution.sh | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/dev/make-distribution.sh b/dev/make-distribution.sh
index 3269b59c6ff2..075e3685231d 100755
--- a/dev/make-distribution.sh
+++ b/dev/make-distribution.sh
@@ -148,18 +148,9 @@ if [ "$SBT_ENABLED" == "true" ]; then
SCALA_VERSION=$("$SBT" -no-colors "show scalaBinaryVersion" | awk '/\[info\]/{ver=$2} END{print ver}')
SPARK_HADOOP_VERSION=$("$SBT" -no-colors "show hadoopVersion" | awk '/\[info\]/{ver=$2} END{print ver}')
else
- VERSION=$("$MVN" help:evaluate -Dexpression=project.version $@ \
- | grep -v "INFO"\
- | grep -v "WARNING"\
- | tail -n 1)
- SCALA_VERSION=$("$MVN" help:evaluate -Dexpression=scala.binary.version $@ \
- | grep -v "INFO"\
- | grep -v "WARNING"\
- | tail -n 1)
- SPARK_HADOOP_VERSION=$("$MVN" help:evaluate -Dexpression=hadoop.version $@ \
- | grep -v "INFO"\
- | grep -v "WARNING"\
- | tail -n 1)
+ VERSION=$("$MVN" help:evaluate -Dexpression=project.version "$@" -q -DforceStdout)
+ SCALA_VERSION=$("$MVN" help:evaluate -Dexpression=scala.binary.version "$@" -q -DforceStdout)
+ SPARK_HADOOP_VERSION=$("$MVN" help:evaluate -Dexpression=hadoop.version "$@" -q -DforceStdout)
fi
if [ "$NAME" == "none" ]; then
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org