anthonylouisbsb commented on a change in pull request #10329:
URL: https://github.com/apache/arrow/pull/10329#discussion_r633111082
##########
File path: ci/scripts/java_jni_build.sh
##########
@@ -21,21 +21,20 @@ set -e
arrow_dir=${1}
cpp_build_dir=${2}
-copy_jar_to_distribution_folder=${3:-true}
java_dir=${arrow_dir}/java
export ARROW_TEST_DATA=${arrow_dir}/testing/data
pushd $java_dir
- # build the entire project
- mvn clean install -DskipTests -P arrow-jni
-Darrow.cpp.build.dir=$cpp_build_dir
- # test jars that have cpp dependencies
- mvn test -P arrow-jni -pl adapter/orc,gandiva,dataset
-Dgandiva.cpp.build.dir=$cpp_build_dir
- if [[ $copy_jar_to_distribution_folder ]] ; then
- # copy the jars that has cpp dependencies to distribution folder
- find gandiva/target/ -name "*.jar" -not -name "*tests*" -exec cp {}
$cpp_build_dir \;
- find adapter/orc/target/ -name "*.jar" -not -name "*tests*" -exec cp {}
$cpp_build_dir \;
- find dataset/target/ -name "*.jar" -not -name "*tests*" -exec cp {}
$cpp_build_dir \;
- fi
+# build the entire project
+mvn clean install -DskipTests -P arrow-jni -Darrow.cpp.build.dir=$cpp_build_dir
+# test jars that have cpp dependencies
+mvn test -P arrow-jni -pl adapter/orc,gandiva,dataset
-Dgandiva.cpp.build.dir=$cpp_build_dir
+
+# copy the jars that has cpp dependencies to distribution folder
+find gandiva/target/ -name "*.jar" -not -name "*tests*" -exec cp {}
$cpp_build_dir \;
+find adapter/orc/target/ -name "*.jar" -not -name "*tests*" -exec cp {}
$cpp_build_dir \;
+find dataset/target/ -name "*.jar" -not -name "*tests*" -exec cp {}
$cpp_build_dir \;
Review comment:
I think you can modify this block to generate the jars for all modules,
my suggestion:
```shell
# build and test the entire project
mvn clean install -P arrow-jni -Darrow.cpp.build.dir=$cpp_build_dir
MODULES=(
gandiva adapter/orc adapter/avro adapter/jdbc dataset algorithm
compression format performance tools vector plasma flight/flight-core
flight/flight-grpc memory/memory-core memory/memory-netty
memory/memory-unsafe
)
# copy all jars to distribution folder, excluding the unit tests ones
for module in "${MODULES[@]}"
do
find $module/target/ -name "*.jar" -not -name "*tests*" -not -name
"*benchmarks*" -exec cp {} $cpp_build_dir \;
done
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]