README.md
1# Google Grafeas Client for Java
2
3Java idiomatic client for [Grafeas][product-docs].
4
5[![Maven][maven-version-image]][maven-version-link]
6![Stability][stability-image]
7
8- [Product Documentation][product-docs]
9- [Client Library Documentation][javadocs]
10
11
12## Quickstart
13
14
15If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
16
17```xml
18<dependencyManagement>
19 <dependencies>
20 <dependency>
21 <groupId>com.google.cloud</groupId>
22 <artifactId>libraries-bom</artifactId>
23 <version>26.12.0</version>
24 <type>pom</type>
25 <scope>import</scope>
26 </dependency>
27 </dependencies>
28</dependencyManagement>
29
30<dependencies>
31 <dependency>
32 <groupId>io.grafeas</groupId>
33 <artifactId>grafeas</artifactId>
34 </dependency>
35```
36
37If you are using Maven without the BOM, add this to your dependencies:
38
39<!-- {x-version-update-start:grafeas:released} -->
40
41```xml
42<dependency>
43 <groupId>io.grafeas</groupId>
44 <artifactId>grafeas</artifactId>
45 <version>2.18.0</version>
46</dependency>
47```
48
49If you are using Gradle without BOM, add this to your dependencies:
50
51```Groovy
52implementation 'io.grafeas:grafeas:2.18.0'
53```
54
55If you are using SBT, add this to your dependencies:
56
57```Scala
58libraryDependencies += "io.grafeas" % "grafeas" % "2.18.0"
59```
60<!-- {x-version-update-end} -->
61
62## Authentication
63
64See the [Authentication][authentication] section in the base directory's README.
65
66## Authorization
67
68The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Grafeas APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Grafeas API calls.
69
70## Getting Started
71
72### Prerequisites
73
74You will need a [Google Cloud Platform Console][developer-console] project with the Grafeas [API enabled][enable-api].
75
76[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by
77[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line:
78`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`.
79
80### Installation and setup
81
82You'll need to obtain the `grafeas` library. See the [Quickstart](#quickstart) section
83to add `grafeas` as a dependency in your code.
84
85## About Grafeas
86
87
88[Grafeas][product-docs] n/a
89
90See the [Grafeas client library docs][javadocs] to learn how to
91use this Grafeas Client Library.
92
93
94
95
96
97
98## Troubleshooting
99
100To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting].
101
102## Supported Java Versions
103
104Java 8 or above is required for using this client.
105
106Google's Java client libraries,
107[Google Cloud Client Libraries][cloudlibs]
108and
109[Google Cloud API Libraries][apilibs],
110follow the
111[Oracle Java SE support roadmap][oracle]
112(see the Oracle Java SE Product Releases section).
113
114### For new development
115
116In general, new feature development occurs with support for the lowest Java
117LTS version covered by Oracle's Premier Support (which typically lasts 5 years
118from initial General Availability). If the minimum required JVM for a given
119library is changed, it is accompanied by a [semver][semver] major release.
120
121Java 11 and (in September 2021) Java 17 are the best choices for new
122development.
123
124### Keeping production systems current
125
126Google tests its client libraries with all current LTS versions covered by
127Oracle's Extended Support (which typically lasts 8 years from initial
128General Availability).
129
130#### Legacy support
131
132Google's client libraries support legacy versions of Java runtimes with long
133term stable libraries that don't receive feature updates on a best efforts basis
134as it may not be possible to backport all patches.
135
136Google provides updates on a best efforts basis to apps that continue to use
137Java 7, though apps might need to upgrade to current versions of the library
138that supports their JVM.
139
140#### Where to find specific information
141
142The latest versions and the supported Java versions are identified on
143the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME`
144and on [google-cloud-java][g-c-j].
145
146## Versioning
147
148
149This library follows [Semantic Versioning](http://semver.org/).
150
151
152
153## Contributing
154
155
156Contributions to this library are always welcome and highly encouraged.
157
158See [CONTRIBUTING][contributing] for more information how to get started.
159
160Please note that this project is released with a Contributor Code of Conduct. By participating in
161this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more
162information.
163
164
165## License
166
167Apache 2.0 - See [LICENSE][license] for more information.
168
169## CI Status
170
171Java Version | Status
172------------ | ------
173Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2]
174Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3]
175Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4]
176Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5]
177
178Java is a registered trademark of Oracle and/or its affiliates.
179
180[product-docs]: https://grafeas.io
181[javadocs]: https://cloud.google.com/java/docs/reference/grafeas/latest/overview
182[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.svg
183[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java7.html
184[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.svg
185[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8.html
186[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.svg
187[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-osx.html
188[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.svg
189[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java8-win.html
190[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.svg
191[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
192[stability-image]: https://img.shields.io/badge/stability-stable-green
193[maven-version-image]: https://img.shields.io/maven-central/v/io.grafeas/grafeas.svg
194[maven-version-link]: https://central.sonatype.com/artifact/io.grafeas/grafeas/2.15.0
195[authentication]: https://github.com/googleapis/google-cloud-java#authentication
196[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
197[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
198[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy
199[developer-console]: https://console.developers.google.com/
200[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
201[cloud-cli]: https://cloud.google.com/cli
202[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md
203[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
204[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
205[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE
206
207
208[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
209[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
210
211[semver]: https://semver.org/
212[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained
213[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries
214[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html
215[g-c-j]: http://github.com/googleapis/google-cloud-java
216