Skip to content

Commit 4ecc89b

Browse files
authored
fix: opentelemetry-bom to be in third-party-dependencies BOM (#2736)
Importing opentelemetry-bom in gapic-generator-java-bom (and thus Google Cloud Libraries BOM) wrongly implies that we (Google) publish the OpenTelemetry artifacts. https://jlbp.dev/JLBP-15 states: > Your project's BOM should not include any of your dependencies on other libraries. In this change, the opentelemetry-bom is declared in the third-party-dependencies BOM and thus will be excluded in the Google Cloud Libraries BOM, which does not import the third-party-dependencies BOM. Related to b/338624813
1 parent 197331b commit 4ecc89b

File tree

2 files changed

+10
-10
lines changed
  • gapic-generator-java-bom
  • java-shared-dependencies/third-party-dependencies

2 files changed

+10
-10
lines changed

gapic-generator-java-bom/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,6 @@
7070
<type>pom</type>
7171
<scope>import</scope>
7272
</dependency>
73-
<dependency>
74-
<groupId>io.opentelemetry</groupId>
75-
<artifactId>opentelemetry-bom</artifactId>
76-
<version>${opentelemetry.version}</version>
77-
<type>pom</type>
78-
<scope>import</scope>
79-
</dependency>
8073

8174
<!-- Libraries published from this repositories -->
8275
<dependency>

java-shared-dependencies/third-party-dependencies/pom.xml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,16 @@
125125
<version>${codec.version}</version>
126126
</dependency>
127127
<dependency>
128-
<groupId>io.opentelemetry.instrumentation</groupId>
129-
<artifactId>opentelemetry-grpc-1.6</artifactId>
130-
<version>${opentelemetry-grpc-instrumentation.version}</version>
128+
<groupId>io.opentelemetry</groupId>
129+
<artifactId>opentelemetry-bom</artifactId>
130+
<version>${opentelemetry.version}</version>
131+
<type>pom</type>
132+
<scope>import</scope>
133+
</dependency>
134+
<dependency>
135+
<groupId>io.opentelemetry.instrumentation</groupId>
136+
<artifactId>opentelemetry-grpc-1.6</artifactId>
137+
<version>${opentelemetry-grpc-instrumentation.version}</version>
131138
</dependency>
132139

133140
<!-- TODO: replace with opencensus-bom when available -->

0 commit comments

Comments
 (0)