Skip to content

Apache DataFusion SQL Query Engine

ARROW-4301: [Java] use arrow-jni profile for both gandiva/orc

Pindikura Ravindra4ed83a795936
diff --git a/ci/travis_script_gandiva_java.sh b/ci/travis_script_gandiva_java.sh
index 9d5871f69f..9ea89b7741 100755
--- a/ci/travis_script_gandiva_java.sh
+++ b/ci/travis_script_gandiva_java.sh
@@ -27,9 +27,9 @@ export MAVEN_OPTS="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Sl
pushd $JAVA_DIR
# build with gandiva profile
-$TRAVIS_MVN -P gandiva -B install -DskipTests -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR/debug
+$TRAVIS_MVN -P arrow-jni -B install -DskipTests -Darrow.cpp.build.dir=$CPP_BUILD_DIR/debug
# run gandiva tests
-$TRAVIS_MVN test -P gandiva -pl gandiva -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR/debug
+$TRAVIS_MVN test -P arrow-jni -pl gandiva -Darrow.cpp.build.dir=$CPP_BUILD_DIR/debug
popd
diff --git a/dev/release/00-prepare.sh b/dev/release/00-prepare.sh
index 9ddb92a9e0..b51ba7b893 100755
--- a/dev/release/00-prepare.sh
+++ b/dev/release/00-prepare.sh
@@ -208,11 +208,33 @@ if [ ${PREPARE_VERSION_PRE_TAG} -gt 0 ]; then
fi
if [ ${PREPARE_TAG} -gt 0 ]; then
- cd "${SOURCE_DIR}/../../java"
+ profile=arrow-jni # this includes components which depend on arrow cpp.
+ pushd "${SOURCE_DIR}/../../java"
git submodule update --init --recursive
+ cpp_dir="${PWD}/../cpp"
+ cpp_build_dir=$(mktemp -d -t "apache-arrow-cpp.XXXXX")
+ pushd ${cpp_build_dir}
+ cmake \
+ -DARROW_GANDIVA=ON \
+ -DARROW_GANDIVA_JAVA=ON \
+ -DARROW_JNI=ON \
+ -DARROW_ORC=ON \
+ -DCMAKE_BUILD_TYPE=release \
+ -G Ninja \
+ "${cpp_dir}"
+ ninja
+ popd
mvn release:clean
- mvn release:prepare -Dtag=${tag} -DreleaseVersion=${version} -DautoVersionSubmodules -DdevelopmentVersion=${next_version_snapshot}
- cd -
+ mvn \
+ release:prepare \
+ -Darguments=-Darrow.cpp.build.dir=${cpp_build_dir}/release \
+ -DautoVersionSubmodules \
+ -DdevelopmentVersion=${next_version_snapshot} \
+ -DreleaseVersion=${version} \
+ -Dtag=${tag} \
+ -P ${profile}
+ rm -rf ${cpp_build_dir}
+ popd
fi
############################## Post-Tag Commits #############################
diff --git a/dev/tasks/gandiva-jars/build-java.sh b/dev/tasks/gandiva-jars/build-java.sh
index bbbf74addd..50122e43d0 100755
--- a/dev/tasks/gandiva-jars/build-java.sh
+++ b/dev/tasks/gandiva-jars/build-java.sh
@@ -27,9 +27,9 @@ pushd java
fi
# build the entire project
- mvn clean install -DskipTests -P gandiva -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR
+ mvn clean install -DskipTests -P arrow-jni -Darrow.cpp.build.dir=$CPP_BUILD_DIR
# test only gandiva
- mvn test -P gandiva -pl gandiva -Dgandiva.cpp.build.dir=$CPP_BUILD_DIR
+ mvn test -P arrow-jni -pl gandiva -Darrow.cpp.build.dir=$CPP_BUILD_DIR
# copy the jars to distribution folder
find gandiva/target/ -name "*.jar" -not -name "*tests*" -exec cp {} $CPP_BUILD_DIR \;
popd