diff --git a/ci/scripts/java_full_build.sh b/ci/scripts/java_full_build.sh index 54800e7671598..30cdf01cf77d5 100755 --- a/ci/scripts/java_full_build.sh +++ b/ci/scripts/java_full_build.sh @@ -26,12 +26,14 @@ export ARROW_TEST_DATA=${arrow_dir}/testing/data pushd ${arrow_dir}/java -# Ensure that there is no old jar -# inside the maven repository -find ~/.m2/repository/org/apache/arrow \ - "(" -name "*.jar" -o -name "*.zip" -o -name "*.pom" ")" \ - -exec echo {} ";" \ - -exec rm -rf {} ";" +if [ -d "~/.m2/repository/org/apache/arrow" ]; then + # Ensure that there is no old jar + # inside the maven repository + find ~/.m2/repository/org/apache/arrow \ + "(" -name "*.jar" -o -name "*.zip" -o -name "*.pom" ")" \ + -exec echo {} ";" \ + -exec rm -rf {} ";" +fi # generate dummy GPG key for -Papache-release. # -Papache-release generates signs (*.asc) of artifacts.