clayburn commented on code in PR #39708:
URL: https://github.com/apache/arrow/pull/39708#discussion_r1466784201


##########
ci/scripts/java_build.sh:
##########
@@ -89,12 +89,12 @@ if [ "${ARROW_JAVA_JNI}" = "ON" ]; then
   mvn="${mvn} -Darrow.cpp.build.dir=${java_jni_dist_dir} -Parrow-jni"
 fi
 
-${mvn} install
+${mvn} clean install
 
 if [ "${BUILD_DOCS_JAVA}" == "ON" ]; then
   # HTTP pooling is turned of to avoid download issues 
https://issues.apache.org/jira/browse/ARROW-11633
   mkdir -p ${build_dir}/docs/java/reference
-  ${mvn} -Dcheckstyle.skip=true -Dhttp.keepAlive=false 
-Dmaven.wagon.http.pool=false install site
+  ${mvn} -Dcheckstyle.skip=true -Dhttp.keepAlive=false 
-Dmaven.wagon.http.pool=false clean install site

Review Comment:
   Add `clean` simply runs the clean lifecycle before running other requested 
lifecycles. We need this to safely write cache entries so that we can know that 
which goal invocation produced particular files.
   
   So this will clean the workspace, but it may restore cache entries to the 
workspace during execution rather than running the goals. Just depends on your 
definition of "clean" here. 
[-DrerunGoals](https://docs.gradle.com/enterprise/maven-extension/#rerunning_goals)
 can be used to explicitly rerun goals in cases where that is desired.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to