Skip to content

Commit cbcaa2f

Browse files
authored
Add Javadoc Configuration for Project (spring-attic#2173)
Provides the Kokoro scripts which upload the javadocs to: https://googleapis.dev/java/spring-cloud-gcp/latest/index.html
1 parent dd16115 commit cbcaa2f

File tree

5 files changed

+69
-2
lines changed

5 files changed

+69
-2
lines changed

.kokoro/publish_javadoc.cfg

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
build_file: "spring-cloud-gcp/.kokoro/publish_javadoc.sh"
4+
5+
before_action {
6+
fetch_keystore {
7+
keystore_resource {
8+
keystore_config_id: 73713
9+
keyname: "docuploader_service_account"
10+
}
11+
}
12+
}

.kokoro/publish_javadoc.sh

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
set -eo pipefail
3+
4+
if [[ -z "${CREDENTIALS}" ]]; then
5+
CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account
6+
fi
7+
8+
# Set the version of python to 3.6
9+
pyenv global 3.6.1
10+
11+
# Get into the spring-cloud-gcp repo directory
12+
dir=$(dirname "$0")
13+
pushd $dir/../
14+
15+
# Compute the project version.
16+
PROJECT_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
17+
18+
# Install docuploader package
19+
python3 -m pip install --user gcp-docuploader
20+
21+
# Build the javadocs
22+
./mvnw clean javadoc:aggregate
23+
24+
# Move into generated docs directory
25+
pushd target/site/apidocs/
26+
27+
python3 -m docuploader create-metadata \
28+
--name spring-cloud-gcp \
29+
--version ${PROJECT_VERSION} \
30+
--language java
31+
32+
python3 -m docuploader upload . \
33+
--credentials ${CREDENTIALS} \
34+
--staging-bucket docs-staging
35+
36+
popd
37+
popd

pom.xml

+17
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,23 @@
216216
<artifactId>appengine-maven-plugin</artifactId>
217217
<version>${app-engine-maven-plugin.version}</version>
218218
</plugin>
219+
<plugin>
220+
<groupId>org.apache.maven.plugins</groupId>
221+
<artifactId>maven-javadoc-plugin</artifactId>
222+
<configuration>
223+
<excludePackageNames>
224+
com.example,
225+
com.example.*,
226+
<!-- Exclude samples and classes in the Firestore Google Client library packages -->
227+
com.google.cloud.firestore
228+
</excludePackageNames>
229+
<links>
230+
<link>https://googleapis.dev/java/google-cloud-vision/latest/</link>
231+
<link>https://googleapis.dev/java/google-cloud-spanner/latest/</link>
232+
<link>https://googleapis.dev/java/google-cloud-clients/latest/</link>
233+
</links>
234+
</configuration>
235+
</plugin>
219236
</plugins>
220237
</build>
221238

spring-cloud-gcp-samples/spring-cloud-gcp-trace-sample/src/main/java/com/example/ExampleController.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.springframework.web.bind.annotation.RestController;
2626

2727
/**
28-
* Sample REST Controller to demonstrate Spring Cloud Sleuth & Stackdriver Trace.
28+
* Sample REST Controller to demonstrate Spring Cloud Sleuth and Stackdriver Trace.
2929
*
3030
* @author Ray Tsang
3131
* @author Mike Eltsufin

spring-cloud-gcp-samples/spring-cloud-gcp-vision-api-sample/src/main/java/com/example/VisionController.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ public class VisionController {
5656
* @param imageUrl the URL of the image
5757
* @param map the model map to use
5858
* @return a string with the list of labels and percentage of certainty
59-
* @throws CloudVisionTemplate if the Vision API call produces an error
59+
* @throws org.springframework.cloud.gcp.vision.CloudVisionException if the Vision API call
60+
* produces an error
6061
*/
6162
@GetMapping("/extractLabels")
6263
public ModelAndView extractLabels(String imageUrl, ModelMap map) {

0 commit comments

Comments
 (0)