Skip to content

Commit

Permalink
fix: opentelemetry-bom to be in third-party-dependencies BOM (#2736)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
suztomo authored May 9, 2024
1 parent 197331b commit 4ecc89b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
7 changes: 0 additions & 7 deletions gapic-generator-java-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-bom</artifactId>
<version>${opentelemetry.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<!-- Libraries published from this repositories -->
<dependency>
Expand Down
13 changes: 10 additions & 3 deletions java-shared-dependencies/third-party-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,16 @@
<version>${codec.version}</version>
</dependency>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-grpc-1.6</artifactId>
<version>${opentelemetry-grpc-instrumentation.version}</version>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-bom</artifactId>
<version>${opentelemetry.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-grpc-1.6</artifactId>
<version>${opentelemetry-grpc-instrumentation.version}</version>
</dependency>

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

0 comments on commit 4ecc89b

Please sign in to comment.