Skip to content

Commit 3341021

Browse files
nchammassrowen
authored andcommitted
[SPARK-31041][BUILD] Show Maven errors from within make-distribution.sh
### What changes were proposed in this pull request? This PR makes `dev/make-distribution.sh` a bit easier to use by not hiding errors thrown by Maven. As a supporting change, this PR also suppresses progress bar output from curl and wget that may be output from within `build/mvn`. ### Why are the changes needed? It's surprising for command-line options to be position-dependent. The errors that get thrown when you pass the correct option (like `--pip`) but in the wrong order are confusing. ### Does this PR introduce any user-facing change? No. ### How was this patch tested? I ran a few invocations of `make-distribution.sh` to confirm that, when passed incorrect options, I can actually see the errors thrown directly by Maven. Closes apache#27800 from nchammas/SPARK-31041-make-distribution. Authored-by: Nicholas Chammas <[email protected]> Signed-off-by: Sean Owen <[email protected]>
1 parent 3d3e366 commit 3341021

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

Diff for: build/mvn

+2-10
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,8 @@ install_app() {
3535
local local_tarball="${_DIR}/$2"
3636
local binary="${_DIR}/$3"
3737

38-
# setup `curl` and `wget` silent options if we're running on Jenkins
39-
local curl_opts="-L"
40-
local wget_opts=""
41-
if [ -n "$AMPLAB_JENKINS" ]; then
42-
curl_opts="-s ${curl_opts}"
43-
wget_opts="--quiet ${wget_opts}"
44-
else
45-
curl_opts="--progress-bar ${curl_opts}"
46-
wget_opts="--progress=bar:force ${wget_opts}"
47-
fi
38+
local curl_opts="--silent --show-error -L"
39+
local wget_opts="--no-verbose"
4840

4941
if [ -z "$3" -o ! -f "$binary" ]; then
5042
# check if we already have the tarball

Diff for: dev/make-distribution.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,19 @@ if [ ! "$(command -v "$MVN")" ] ; then
126126
exit -1;
127127
fi
128128

129-
VERSION=$("$MVN" help:evaluate -Dexpression=project.version $@ 2>/dev/null\
129+
VERSION=$("$MVN" help:evaluate -Dexpression=project.version $@ \
130130
| grep -v "INFO"\
131131
| grep -v "WARNING"\
132132
| tail -n 1)
133-
SCALA_VERSION=$("$MVN" help:evaluate -Dexpression=scala.binary.version $@ 2>/dev/null\
133+
SCALA_VERSION=$("$MVN" help:evaluate -Dexpression=scala.binary.version $@ \
134134
| grep -v "INFO"\
135135
| grep -v "WARNING"\
136136
| tail -n 1)
137-
SPARK_HADOOP_VERSION=$("$MVN" help:evaluate -Dexpression=hadoop.version $@ 2>/dev/null\
137+
SPARK_HADOOP_VERSION=$("$MVN" help:evaluate -Dexpression=hadoop.version $@ \
138138
| grep -v "INFO"\
139139
| grep -v "WARNING"\
140140
| tail -n 1)
141-
SPARK_HIVE=$("$MVN" help:evaluate -Dexpression=project.activeProfiles -pl sql/hive $@ 2>/dev/null\
141+
SPARK_HIVE=$("$MVN" help:evaluate -Dexpression=project.activeProfiles -pl sql/hive $@ \
142142
| grep -v "INFO"\
143143
| grep -v "WARNING"\
144144
| fgrep --count "<id>hive</id>";\

0 commit comments

Comments
 (0)