Skip to content

Commit

Permalink
Clean up $M2_CACHE to avoid side-effect of previous dependency:get (#…
Browse files Browse the repository at this point in the history
…10278)

Follow up of #10201 (comment)

Signed-off-by: Tim Liu <timl@nvidia.com>
  • Loading branch information
NvTimLiu authored Jan 27, 2024
1 parent 79c9029 commit 787a768
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion jenkins/dependency-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ ARTIFACT_FILE=${1:-"/tmp/artifacts-list"}
SERVER_ID=${SERVER_ID:-"snapshots"}
SERVER_URL=${SERVER_URL:-"file:/tmp/local-release-repo"}
M2_CACHE=${M2_CACHE:-"/tmp/m2-cache"}
DEST_PATH=${DEST_PATH:-"/tmp/test-get-dest"}
rm -rf $DEST_PATH && mkdir -p $DEST_PATH

remote_maven_repo=$SERVER_ID::default::$SERVER_URL
# Get the spark-rapids-jni and spark-rapids-private jars from OSS Snapshot maven repo
Expand All @@ -43,5 +45,9 @@ if [ "$SERVER_ID" == "snapshots" ]; then
fi
while read line; do
artifact=$line # artifact=groupId:artifactId:version:[[packaging]:classifier]
mvn dependency:get -DremoteRepositories=$remote_maven_repo -Dmaven.repo.local=$M2_CACHE -Dartifact=$artifact
# Clean up $M2_CACHE to avoid side-effect of previous dependency:get
rm -rf $M2_CACHE/com/nvida
mvn -B dependency:get -DremoteRepositories=$remote_maven_repo -Dmaven.repo.local=$M2_CACHE -Dartifact=$artifact -Ddest=$DEST_PATH
done < $ARTIFACT_FILE

ls -l $DEST_PATH

0 comments on commit 787a768

Please sign in to comment.