Skip to content

Commit

Permalink
[CELEBORN-838] Add custom mvn flag to celeborn
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
Add an option to pass in a custom maven installation, similar to how [Spark does it](https://github.com/apache/spark/blob/master/dev/make-distribution.sh#L65).

### Why are the changes needed?
We need this internally as some of our machines may not have access to external Maven.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
ran make-distribution.sh to make sure it worked.

Closes #1761 from akpatnam25/CELEBORN-838.

Authored-by: Aravind Patnam <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
  • Loading branch information
Aravind Patnam authored and pan3793 committed Jul 26, 2023
1 parent e16b267 commit e708c3c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions build/make-distribution.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ PROJECT_DIR="$(cd "`dirname "$0"`/.."; pwd)"
DIST_DIR="$PROJECT_DIR/dist"
NAME="bin"
RELEASE="false"
MVN="$PROJECT_DIR/build/mvn"

function exit_with_usage {
echo "make-distribution.sh - tool for making binary distributions of Celeborn"
echo ""
echo "usage:"
cl_options="[--name <custom_name>] [--release]"
cl_options="[--name <custom_name>] [--release] [--mvn <mvn-command>]"
echo "make-distribution.sh $cl_options <maven build options>"
echo ""
exit 1
Expand All @@ -42,6 +43,10 @@ while (( "$#" )); do
NAME="bin-$2"
shift
;;
--mvn)
MVN="$2"
shift
;;
--release)
RELEASE="true"
;;
Expand Down Expand Up @@ -86,7 +91,6 @@ if [ -z "$JAVA_HOME" ]; then
exit -1
fi

MVN="$PROJECT_DIR/build/mvn"
export MAVEN_OPTS="${MAVEN_OPTS:--Xmx2g -XX:ReservedCodeCacheSize=1g}"

if [ ! "$(command -v "$MVN")" ] ; then
Expand Down

0 comments on commit e708c3c

Please sign in to comment.