Skip to content

Commit d24eefa

Browse files
committed
fix(deps): drop unused declared dependencies and declare opentelemetry-context
Remove jackson-databind-nullable, bcpkix-jdk18on, testcontainers, testcontainers junit-jupiter, classgraph, java-dotenv, kotlin-stdlib, and commons-compress, none of which the SDK references. Declare the directly used opentelemetry-context. Ignore annotation-only false positives (junit-jupiter-api, jakarta.annotation-api, error_prone_annotations) in the dependency plugin so analyze reports no problems.
1 parent 82c63be commit d24eefa

1 file changed

Lines changed: 15 additions & 46 deletions

File tree

‎pom.xml‎

Lines changed: 15 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,16 @@
136136
</plugin>
137137
<plugin>
138138
<artifactId>maven-dependency-plugin</artifactId>
139+
<configuration>
140+
<!-- These are referenced only through annotations or the JUnit
141+
runtime, so bytecode analysis cannot see the usage and reports
142+
them as unused. They are genuinely required. -->
143+
<ignoredUnusedDeclaredDependencies>
144+
<ignoredUnusedDeclaredDependency>org.junit.jupiter:junit-jupiter-api</ignoredUnusedDeclaredDependency>
145+
<ignoredUnusedDeclaredDependency>jakarta.annotation:jakarta.annotation-api</ignoredUnusedDeclaredDependency>
146+
<ignoredUnusedDeclaredDependency>com.google.errorprone:error_prone_annotations</ignoredUnusedDeclaredDependency>
147+
</ignoredUnusedDeclaredDependencies>
148+
</configuration>
139149
<executions>
140150
<execution>
141151
<phase>package</phase>
@@ -486,6 +496,11 @@
486496
<artifactId>opentelemetry-api</artifactId>
487497
<version>1.62.0</version>
488498
</dependency>
499+
<dependency>
500+
<groupId>io.opentelemetry</groupId>
501+
<artifactId>opentelemetry-context</artifactId>
502+
<version>1.62.0</version>
503+
</dependency>
489504
<dependency>
490505
<groupId>jakarta.annotation</groupId>
491506
<artifactId>jakarta.annotation-api</artifactId>
@@ -523,63 +538,17 @@
523538
<artifactId>jackson-datatype-jsr310</artifactId>
524539
<version>${jackson-version}</version>
525540
</dependency>
526-
<dependency>
527-
<groupId>org.openapitools</groupId>
528-
<artifactId>jackson-databind-nullable</artifactId>
529-
<version>0.2.6</version>
530-
</dependency>
531541
<dependency>
532542
<groupId>org.bouncycastle</groupId>
533543
<artifactId>bcprov-jdk18on</artifactId>
534544
<version>1.84</version>
535545
</dependency>
536-
<dependency>
537-
<groupId>org.bouncycastle</groupId>
538-
<artifactId>bcpkix-jdk18on</artifactId>
539-
<version>1.84</version>
540-
</dependency>
541546
<dependency>
542547
<groupId>org.junit.jupiter</groupId>
543548
<artifactId>junit-jupiter-api</artifactId>
544549
<version>5.13.4</version>
545550
<scope>test</scope>
546551
</dependency>
547-
<dependency>
548-
<groupId>org.testcontainers</groupId>
549-
<artifactId>testcontainers</artifactId>
550-
<version>1.21.4</version>
551-
<scope>test</scope>
552-
</dependency>
553-
<dependency>
554-
<groupId>org.testcontainers</groupId>
555-
<artifactId>junit-jupiter</artifactId>
556-
<version>1.21.4</version>
557-
<scope>test</scope>
558-
</dependency>
559-
<dependency>
560-
<groupId>io.github.classgraph</groupId>
561-
<artifactId>classgraph</artifactId>
562-
<version>4.8.181</version>
563-
<scope>test</scope>
564-
</dependency>
565-
<dependency>
566-
<groupId>io.github.cdimascio</groupId>
567-
<artifactId>java-dotenv</artifactId>
568-
<version>5.2.2</version>
569-
<scope>test</scope>
570-
</dependency>
571-
<dependency>
572-
<groupId>org.jetbrains.kotlin</groupId>
573-
<artifactId>kotlin-stdlib</artifactId>
574-
<version>2.1.10</version>
575-
<scope>test</scope>
576-
</dependency>
577-
<dependency>
578-
<groupId>org.apache.commons</groupId>
579-
<artifactId>commons-compress</artifactId>
580-
<version>1.27.1</version>
581-
<scope>test</scope>
582-
</dependency>
583552
<dependency>
584553
<groupId>com.google.errorprone</groupId>
585554
<artifactId>error_prone_annotations</artifactId>

0 commit comments

Comments
 (0)