From f6dd067bc4306dd02d829198daea8d7a05185756 Mon Sep 17 00:00:00 2001 From: Igor Bernstein Date: Wed, 7 Oct 2020 16:44:49 -0400 Subject: [PATCH] chore: make version embedding more robust The previous approach used the jar manifest. Unfortunately that approaches falls apart when the consumer shades the client jar. The new approach uses a combination of releasetool's version tag replacement and maven-resources-plugin to generate a class with an embedded version string. --- google-cloud-bigtable/pom.xml | 32 +++++++++++++++++++ .../v2/stub/EnhancedBigtableStubSettings.java | 7 ++-- .../com/google/cloud/bigtable/Version.java | 24 ++++++++++++++ .../v2/stub/EnhancedBigtableStubTest.java | 2 +- 4 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 google-cloud-bigtable/src/main/templates/com/google/cloud/bigtable/Version.java diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index 1342c1dd47..df8450c8c1 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -15,6 +15,9 @@ 1.16.1-SNAPSHOT + + 1.16.1-SNAPSHOT + google-cloud-bigtable