GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Make defaultLibraryVersion() more robust by shinfan · Pull Request #1436 · googleapis/google-cloud-java

Conversation

@shinfan

@shinfan shinfan commented Nov 30, 2016

Copy link
Copy Markdown
Contributor

defaultLibraryVersion() now reads version from pom.properties

Fixes #1434
Tested manually.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@shinfan
Make defaultLibraryVersion() more robust
e21fc25
@shinfan shinfan assigned garrettjonesgoogle Nov 30, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 30, 2016
@sai-pullabhotla

sai-pullabhotla commented Dec 1, 2016

Copy link
Copy Markdown

I don't have a whole lot of background on this, but I'm curious - why can't we use something as simple as -

ServiceOptions.class.getPackage().getImplementationVersion();

That should do the work of getting the implementation version from Jar's metadata.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shinfan

shinfan commented Dec 1, 2016

Copy link
Copy Markdown
Contributor Author

@sai-pullabhotla I tried this approach but it did not work for me (the method simply returns null).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sai-pullabhotla

sai-pullabhotla commented Dec 1, 2016

Copy link
Copy Markdown

@shinfan - as long as the class is loaded from JAR and JAR has manifest with the Implementation-Version defined, it should work. Below is what I get:

Package pack = ServiceOptions.class.getPackage();
System.out.println("Impl Title: " + pack.getImplementationTitle());
System.out.println("Impl Version: " + pack.getImplementationVersion());
System.out.println("Spec Title: " + pack.getSpecificationTitle());
System.out.println("Spec Version: " + pack.getSpecificationVersion());

Output

Impl Title: Google Cloud Core
Impl Version: 0.7.0
Spec Title: Google Cloud Core
Spec Version: 0.7.0
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coveralls

coveralls commented Dec 1, 2016

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.01%) to 84.33% when pulling e21fc25 on shinfan:master into 5dfb904 on GoogleCloudPlatform:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

garrettjonesgoogle
garrettjonesgoogle reviewed Dec 1, 2016
View reviewed changes
Comment thread google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java
properties.load(inputStream);
return properties.getProperty(META_VERSION_KEY, "");
}
} catch (Exception e) {

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java Outdated
return version;
}

private static String getMavenVersion() {

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@garrettjonesgoogle

garrettjonesgoogle commented Dec 1, 2016

Copy link
Copy Markdown
Contributor

LIBRARY_NAME should be changed to "google-cloud-java". There are also a couple comments that reference the old name ("gcloud-java").

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shinfan
Fix PR comments
1b3662f
@shinfan

shinfan commented Dec 1, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@sai-pullabhotla As I said, the method did not work under my environment and it returned null. If it happens to me it may happen to other users. My best guess is that my maven does not insert the correct manifest data into the JAR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shinfan
Fix unit test
c3077da
@shinfan

shinfan commented Dec 1, 2016

Copy link
Copy Markdown
Contributor Author

@garrettjonesgoogle PTAL

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

garrettjonesgoogle
garrettjonesgoogle reviewed Dec 1, 2016
View reviewed changes
Comment thread google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java Outdated
version = manifestAttributes.getValue(MANIFEST_VERSION_KEY);
String version = getPomVersion();
if (version == null) {
try {

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shinfan
update
2ff6851
@garrettjonesgoogle

garrettjonesgoogle commented Dec 1, 2016

Copy link
Copy Markdown
Contributor

LGTM after Travis passes

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shinfan

shinfan commented Dec 1, 2016

Copy link
Copy Markdown
Contributor Author

Travis passed for oraclejdk7/8 and openjdk. There is one "no_language_set" pending for 30 mins.
AppVeyor CI failed but I believe it is caused by flakiness. I will go ahead and merge if no objection @garrettjonesgoogle

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@garrettjonesgoogle

garrettjonesgoogle commented Dec 1, 2016

Copy link
Copy Markdown
Contributor

The "no_language_set" one is for Mac. I have often seen it take longer. I have no concerns about your CL on mac so go ahead and merge it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shinfan
shinfan merged commit 15e2e2d into googleapis:master Dec 1, 2016
@coveralls

coveralls commented Dec 1, 2016

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.04%) to 84.3% when pulling 2ff6851 on shinfan:master into 5dfb904 on GoogleCloudPlatform:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coveralls

coveralls commented Dec 2, 2016

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.04%) to 84.303% when pulling c3077da on shinfan:master into 5dfb904 on GoogleCloudPlatform:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mziccard

mziccard commented Dec 2, 2016

Copy link
Copy Markdown
Contributor

LIBRARY_NAME should be changed to "google-cloud-java". There are also a couple comments that reference the old name ("gcloud-java").

@garrettjonesgoogle did you check this with @omaray and @jgeewax? Last time we discussed this (~2months ago) it was suggested to stick to gcloud-java for the time being.

I feel like a creep when I step in like this :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@garrettjonesgoogle

garrettjonesgoogle commented Dec 2, 2016

Copy link
Copy Markdown
Contributor

No, your feedback is always welcome :-)

We have agreed internally to change all languages to google-cloud-java for this value.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@garrettjonesgoogle

garrettjonesgoogle commented Dec 2, 2016

Copy link
Copy Markdown
Contributor

I checked again internally and I was wrong - this needs to be changed back to gcloud-java. @shinfan , could you fix that up? Sorry for the churn.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shinfan

shinfan commented Dec 5, 2016

Copy link
Copy Markdown
Contributor Author

Acknowledged. Will do.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

github-actions Bot pushed a commit that referenced this pull request Aug 16, 2022
@renovate-bot
deps: update dependency com.google.cloud:google-cloud-bigquery to v2.…
7b1402a
…14.5 (#1436)

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-bigquery](https://togithub.com/googleapis/java-bigquery) | `2.14.3` -> `2.14.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigquery/2.14.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigquery/2.14.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigquery/2.14.6/compatibility-slim/2.14.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-bigquery/2.14.6/confidence-slim/2.14.3)](https://docs.renovatebot.com/merge-confidence/) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost.

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigquerydatatransfer).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xNTguMCIsInVwZGF0ZWRJblZlciI6IjMyLjE1OC4wIn0=-->
meltsufin pushed a commit that referenced this pull request Dec 22, 2025
@gcf-owl-bot
chore(deps): Update gapic-generator-java to 2.26.0 (#1436)
a2e4ebf
* chore(deps): Update gapic-generator-java to 2.26.0

PiperOrigin-RevId: 567624307

Source-Link: googleapis/googleapis@2ecf4de

Source-Link: https://github.com/googleapis/googleapis-gen/commit/a5cfbd9a05b3a134e92886114db776fb33cec9f2
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTVjZmJkOWEwNWIzYTEzNGU5Mjg4NjExNGRiNzc2ZmIzM2NlYzlmMiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
chingor13 pushed a commit that referenced this pull request Jan 6, 2026
@cindy-peng
Doc: Add more explanation and examples for logbackBatchingSettings (#…
bdbb0f7
…1436)

* Doc: Add more explanation and examples for logbackBatchingSettings

* fix comments
chingor13 pushed a commit that referenced this pull request Jan 22, 2026
@renovate-bot @gcf-owl-bot
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
24f8780
…39.0 (#1436)

* chore(deps): update dependency com.google.cloud:libraries-bom to v26.39.0

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
chingor13 pushed a commit that referenced this pull request Feb 24, 2026
@release-please
chore(main): release 1.24.1-SNAPSHOT (#1436)
4789d91
🤖 I have created a release *beep* *boop*
---


### Updating meta-information for bleeding-edge SNAPSHOT release.

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 11, 2026
@gcf-owl-bot
chore(deps): Update gapic-generator-java to 2.26.0 (googleapis#1436)
ecc3c5d
* chore(deps): Update gapic-generator-java to 2.26.0

PiperOrigin-RevId: 567624307

Source-Link: googleapis/googleapis@2ecf4de

Source-Link: https://github.com/googleapis/googleapis-gen/commit/a5cfbd9a05b3a134e92886114db776fb33cec9f2
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTVjZmJkOWEwNWIzYTEzNGU5Mjg4NjExNGRiNzc2ZmIzM2NlYzlmMiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
chingor13 pushed a commit that referenced this pull request Mar 12, 2026
@release-please
chore(main): release 1.24.1-SNAPSHOT (#1436)
d77c58a
🤖 I have created a release *beep* *boop*
---


### Updating meta-information for bleeding-edge SNAPSHOT release.

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
lqiu96 pushed a commit that referenced this pull request Mar 20, 2026
@cindy-peng
Doc: Add more explanation and examples for logbackBatchingSettings (#…
67e21fd
…1436)

* Doc: Add more explanation and examples for logbackBatchingSettings

* fix comments
suztomo pushed a commit to suztomo/google-cloud-java that referenced this pull request Mar 23, 2026
@release-please
chore(main): release 2.14.7-SNAPSHOT (googleapis#1436)
acbaf64
🤖 I have created a release *beep* *boop*
---


### Updating meta-information for bleeding-edge SNAPSHOT release.

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
suztomo pushed a commit that referenced this pull request Mar 30, 2026
@renovate-bot
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
282de97
…43.0 (#1436)
lqiu96 pushed a commit that referenced this pull request Apr 1, 2026
@renovate-bot
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
97a827d
…43.0 (#1436)
meltsufin pushed a commit that referenced this pull request Apr 29, 2026
@renovate-bot @hannahrogers-google
deps: update dependency com.google.cloud:google-cloud-shared-dependen…
a40337b
…cies to v3.1.0 (#1436)

* deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.1.0

* fix: update the pubsub fake executor to cancel a pending callables future when cancelled

Co-authored-by: hannahrogers-google <[email protected]>
meltsufin pushed a commit that referenced this pull request May 1, 2026
@renovate-bot @hannahrogers-google
deps: update dependency com.google.cloud:google-cloud-shared-dependen…
27ae7cc
…cies to v3.1.0 (#1436)

* deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.1.0

* fix: update the pubsub fake executor to cancel a pending callables future when cancelled

Co-authored-by: hannahrogers-google <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@garrettjonesgoogle garrettjonesgoogle garrettjonesgoogle left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@garrettjonesgoogle garrettjonesgoogle

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@shinfan @sai-pullabhotla @coveralls @garrettjonesgoogle @mziccard @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.