Browse Source

build: drop the direct dependency on javax.annotation-api, which is CDDL-1.0 or GPL-2.0 with the Classpath exception

Two classes used its @PostConstruct and @PreDestroy; they use the jakarta.annotation ones instead, which Spring handles the same way. proto and edge-api declared it for generated gRPC code that no longer uses it: gRPC 1.76 marks its stubs with @GrpcGenerated.

Google libraries still bring it transitively.
pull/16681/head
Dmytro Skarzhynets 3 weeks ago
parent
commit
db528158c6
No known key found for this signature in database GPG Key ID: 2B51652F224037DF
  1. 4
      common/edge-api/pom.xml
  2. 4
      common/proto/pom.xml
  3. 2
      common/queue/src/main/java/org/thingsboard/server/queue/settings/TbQueueIntegrationExecutorSettings.java
  4. 4
      dao/src/main/java/org/thingsboard/server/dao/subscription/BasicLicenseActivationService.java
  5. 6
      pom.xml

4
common/edge-api/pom.xml

@ -26,10 +26,6 @@
</properties>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>org.thingsboard.common</groupId>
<artifactId>data</artifactId>

4
common/proto/pom.xml

@ -26,10 +26,6 @@
</properties>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>org.thingsboard.common</groupId>
<artifactId>data</artifactId>

2
common/queue/src/main/java/org/thingsboard/server/queue/settings/TbQueueIntegrationExecutorSettings.java

@ -2,6 +2,7 @@
// SPDX-License-Identifier: BUSL-1.1
package org.thingsboard.server.queue.settings;
import jakarta.annotation.PostConstruct;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
@ -9,7 +10,6 @@ import org.springframework.stereotype.Component;
import org.thingsboard.server.common.data.integration.IntegrationType;
import org.thingsboard.server.queue.util.PropertyUtils;
import javax.annotation.PostConstruct;
import java.util.Map;
@Lazy

4
dao/src/main/java/org/thingsboard/server/dao/subscription/BasicLicenseActivationService.java

@ -2,6 +2,8 @@
// SPDX-License-Identifier: BUSL-1.1
package org.thingsboard.server.dao.subscription;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
@ -31,8 +33,6 @@ import org.thingsboard.server.dao.asset.AssetService;
import org.thingsboard.server.dao.device.DeviceService;
import org.thingsboard.server.dao.subscription.LicenseCapacity.CappedEntity;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.text.ParseException;

6
pom.xml

@ -100,7 +100,6 @@
<httpclient5.version>5.6.4</httpclient5.version> <!-- to fix CVE-2026-71290. Pinned via the httpclient5 overrides below: spring-boot-dependencies is imported as a BOM, so this property alone would not win. TODO: remove when fixed in spring-boot-dependencies -->
<zstd-jni.version>1.5.7-14</zstd-jni.version> <!-- to fix CVE-2026-87795, CVE-2026-87823, CVE-2026-87824, CVE-2026-87825, CVE-2026-87877, CVE-2026-90560 and CVE-2026-90852. Transitive dependency of kafka-clients 3.9.2; not managed by any BOM, so the override below is the sole source of the version. TODO: remove once kafka-clients pulls zstd-jni >= 1.5.7-14 -->
<freemarker.version>2.3.35</freemarker.version> <!-- to fix CVE-2026-84939. Pinned via the freemarker override below: spring-boot-dependencies is imported as a BOM, so this property alone would not win. TODO: remove when fixed in spring-boot-dependencies -->
<javax-annotation.version>1.3.2</javax-annotation.version> <!-- fixme Remove when generate proto will use jakarta -->
<javax.xml.bind-api.version>2.4.0-b180830.0359</javax.xml.bind-api.version>
<jjwt.version>0.12.5</jjwt.version>
<rat.version>0.10</rat.version> <!-- unused -->
@ -1746,11 +1745,6 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>${javax-annotation.version}</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>

Loading…
Cancel
Save