diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg
index 41fae5e12..dd67d04d8 100644
--- a/.kokoro/release/publish_javadoc.cfg
+++ b/.kokoro/release/publish_javadoc.cfg
@@ -1,16 +1,19 @@
# Format: //devtools/kokoro/config/proto/build.proto
-
env_vars: {
- key: "TRAMPOLINE_BUILD_FILE"
- value: "github/google-auth-library-java/.kokoro/release/publish_javadoc.sh"
+ key: "STAGING_BUCKET"
+ value: "docs-staging"
}
env_vars: {
- key: "LINK_LATEST"
- value: "true"
+ key: "TRAMPOLINE_BUILD_FILE"
+ value: "github/google-auth-library-java/.kokoro/release/publish_javadoc.sh"
}
-env_vars: {
- key: "BUCKET"
- value: "gcloud-javadoc-testing"
+before_action {
+ fetch_keystore {
+ keystore_resource {
+ keystore_config_id: 73713
+ keyname: "docuploader_service_account"
+ }
+ }
}
diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh
index cfdc9dabc..f049843e9 100755
--- a/.kokoro/release/publish_javadoc.sh
+++ b/.kokoro/release/publish_javadoc.sh
@@ -1,65 +1,55 @@
#!/bin/bash
-# Copyright 2018, Google Inc. All rights reserved.
+# Copyright 2019 Google Inc.
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -eo pipefail
-set -e
+if [[ -z "${CREDENTIALS}" ]]; then
+ CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account
+fi
-if [[ -z "${BUCKET}" ]]; then
- echo "Must set BUCKET environment variable"
- exit 1
+if [[ -z "${STAGING_BUCKET}" ]]; then
+ echo "Need to set STAGING_BUCKET environment variable"
+ exit 1
fi
+# work from the git root directory
pushd $(dirname "$0")/../../
-# Pull the library version from project properties
-VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev '(^\[|\w+:)')
+# install docuploader package
+python3 -m pip install gcp-docuploader
-case "${VERSION}" in
- *-SNAPSHOT)
- echo "Cannot publish javadoc for -SNAPSHOT versions"
- exit 1
- ;;
- "")
- echo "Could not obtain version number from maven-help-plugin."
- exit 1
- ;;
-esac
+# compile all packages
+mvn clean install -B -DskipTests=true
-# Generate the javadoc from scratch
-mvn clean install javadoc:aggregate -DskipTests=true -B
+NAME=google-auth-library
+VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3)
-# Sync the current version to gCS
-gsutil -m rsync -d target/site gs://${BUCKET}/java/google-auth-library-java/${VERSION}
+# build the docs
+mvn site -B
-if [[ "${LINK_LATEST}" == "true" ]]; then
- # Sync the current content to latest
- gsutil -m rsync gs://${BUCKET}/java/google-auth-library-java/${VERSION} gs://${BUCKET}/java/google-auth-library-java/latest
-fi
+pushd target/site/apidocs
+
+# create metadata
+python3 -m docuploader create-metadata \
+ --name ${NAME} \
+ --version ${VERSION} \
+ --language java
+
+# upload docs
+python3 -m docuploader upload . \
+ --credentials ${CREDENTIALS} \
+ --staging-bucket ${STAGING_BUCKET}
popd
diff --git a/appengine/pom.xml b/appengine/pom.xml
index 987957c2d..296198d2a 100644
--- a/appengine/pom.xml
+++ b/appengine/pom.xml
@@ -76,5 +76,4 @@
test
-
diff --git a/pom.xml b/pom.xml
index aaa7d23a5..6424ec57d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,6 +17,14 @@
authorization to enable calling Google APIs.
https://github.com/googleapis/google-auth-library-java
+
+
+ googleapis.dev
+ Google self-hosted documentation site
+ https://googleapis.dev/java/google-auth-library/${project.version}
+
+
+
BSD New license
@@ -139,7 +147,7 @@
org.apache.maven.pluginsmaven-javadoc-plugin
- 2.9.1
+ 3.1.0attach-javadocs
@@ -190,10 +198,6 @@
org.apache.maven.pluginsmaven-source-plugin
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- org.apache.maven.pluginsmaven-checkstyle-plugin
@@ -217,6 +221,14 @@
+
+ org.apache.maven.plugins
+ maven-site-plugin
+ 3.7.1
+
+ true
+
+ org.jacocojacoco-maven-plugin
@@ -239,6 +251,51 @@
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.1.0
+
+
+ html
+
+ aggregate
+ javadoc
+
+
+
+
+ none
+
+ ${project.build.directory}/javadoc
+ Google Auth Library for Java ${project.version}
+ ${basedir}/overview.html
+
+
+ google-auth-library-credentials
+ com.google.auth*
+
+
+ google-auth-library-oauth2-http
+ com.google.auth.http*:com.google.auth.oauth2*
+
+
+ google-auth-library-appengine
+ com.google.auth.appengine*
+
+
+
+ http://download.oracle.com/javase/7/docs/api/
+ http://cloud.google.com/appengine/docs/java/javadoc
+
+ google-auth-library ${project.version}
+
+
+
+
+
release-sign-artifacts
@@ -250,6 +307,32 @@
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 3.0.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.1.0
+
+
+ attach-javadocs
+
+ jar
+
+
+
+ org.apache.maven.pluginsmaven-gpg-plugin
diff --git a/versions.txt b/versions.txt
index febad3dc6..ee881bc3d 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,6 +1,7 @@
# Format:
# module:released-version:current-version
+google-auth-library:0.15.0:0.15.1-SNAPSHOT
google-auth-library-parent:0.15.0:0.15.1-SNAPSHOT
google-auth-library-appengine:0.15.0:0.15.1-SNAPSHOT
google-auth-library-credentials:0.15.0:0.15.1-SNAPSHOT