From 9a1ffbd1124d90649a0f56a25d31972a57976544 Mon Sep 17 00:00:00 2001 From: Ajay Kannan Date: Thu, 7 Apr 2016 17:35:25 -0700 Subject: [PATCH] Use curl instead of maven wagon --- utilities/after_success.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utilities/after_success.sh b/utilities/after_success.sh index 9b9b7c5aacaf..25c0c7c4f262 100755 --- a/utilities/after_success.sh +++ b/utilities/after_success.sh @@ -19,11 +19,11 @@ if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then fi if [ "${SITE_VERSION##*-}" != "SNAPSHOT" ]; then # Deploy Maven artifacts (if they don't exist yet) and update artifact version in READMEs. - ARTIFACT_EXISTS=$(mvn wagon:exist -Dwagon.url=https://oss.sonatype.org/content/repositories/releases/com/google/gcloud/gcloud-java/$SITE_VERSION) - if [[ "$ARTIFACT_EXISTS" == *"does not exists."* -a "$ARTIFACT_EXISTS" != "" ]]; then - mvn clean deploy -DskipITs --settings ~/.m2/settings.xml -P sign-deploy + URL=https://oss.sonatype.org/content/repositories/releases/com/google/gcloud/gcloud-java/$SITE_VERSION + if curl --output /dev/null --silent --head --fail "$URL"; then + echo "Not deploying artifacts because it seems like they already exist." else - echo "Not deploying artifacts because it seems like they already exist." + mvn clean deploy -DskipITs --settings ~/.m2/settings.xml -P sign-deploy fi utilities/update_docs_version.sh