[KYUUBI #4880] [BUILD] Skip compiling useless files when making distribution

### _Why are the changes needed?_

To speed up the making distribution.

Refer https://github.com/apache/spark/pull/41141

This PR add more skip properties when making distribution:

- -Dmaven.javadoc.skip=true to skip generating javadoc
- -Dmaven.scaladoc.skip=true to skip generating scaladoc. Please see: https://davidb.github.io/scala-maven-plugin/doc-jar-mojo.html#skip
- -Dmaven.source.skip to skip generating sources.jar

### _How was this patch tested?_
Manual test:
<img width="267" alt="image" src="https://github.com/apache/kyuubi/assets/6757692/af4e7bb5-10f1-4fa0-b212-b779b77c9ff3">

```
 ./build/dist --spark-provided --hive-provided --flink-provided
```

Before this pr:
```
[INFO] Total time:  09:20 min
```

After this pr:
```
[INFO] Total time:  06:46 min
```

Closes #4880 from turboFei/speedup_dist.

Closes #4880

47f5ef2ac [fwang12] [BUILD] Skip compiling useless files when making distribution

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
This commit is contained in:
fwang12 2023-05-25 13:59:11 +08:00 committed by Cheng Pan
parent 4901553329
commit 0b352ba852
No known key found for this signature in database
GPG Key ID: 8001952629BCC75D

View File

@ -215,7 +215,7 @@ else
echo "Making distribution for Kyuubi $VERSION in '$DISTDIR'..."
fi
MVN_DIST_OPT="-DskipTests"
MVN_DIST_OPT="-DskipTests -Dmaven.javadoc.skip=true -Dmaven.scaladoc.skip=true -Dmaven.source.skip"
if [[ "$ENABLE_WEBUI" == "true" ]]; then
MVN_DIST_OPT="$MVN_DIST_OPT -Pweb-ui"