Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Excavator: Enforce that Jakarta dependency versions use the new 'jaka…
Browse files Browse the repository at this point in the history
…rta' namespace, or replace it with an equivalent Java EE dependency instead (#6442)
  • Loading branch information
svc-excavator-bot authored Sep 25, 2023
1 parent 62437c2 commit 64e7944
Show file tree
Hide file tree
Showing 24 changed files with 43 additions and 50 deletions.
6 changes: 3 additions & 3 deletions atlasdb-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ dependencies {
implementation 'org.apache.commons:commons-lang3'
implementation 'com.fasterxml.jackson.core:jackson-annotations'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'jakarta.annotation:jakarta.annotation-api'
implementation 'jakarta.validation:jakarta.validation-api'
implementation 'jakarta.xml.bind:jakarta.xml.bind-api'
implementation 'javax.annotation:javax.annotation-api'
implementation 'javax.validation:validation-api'
implementation 'javax.xml.bind:jaxb-api'

implementation 'com.github.ben-manes.caffeine:caffeine'
implementation 'com.palantir.conjure.java.api:ssl-config'
Expand Down
2 changes: 1 addition & 1 deletion atlasdb-cassandra/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ dependencies {
testImplementation 'com.palantir.tracing:tracing-api'
testImplementation 'com.palantir.tritium:tritium-registry'
testImplementation 'io.dropwizard.metrics:metrics-core'
testImplementation 'jakarta.xml.bind:jakarta.xml.bind-api'
testImplementation 'javax.xml.bind:jaxb-api'
testImplementation 'org.apache.commons:commons-lang3'
testImplementation 'org.apache.thrift:libthrift'
testImplementation 'com.palantir.safe-logging:preconditions-assertj'
Expand Down
2 changes: 1 addition & 1 deletion atlasdb-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies {
api 'com.google.code.findbugs:jsr305'
api 'com.google.guava:guava'
api 'com.google.protobuf:protobuf-java'
api 'jakarta.annotation:jakarta.annotation-api'
api 'javax.annotation:javax.annotation-api'
api 'org.slf4j:slf4j-api'
api project(':atlasdb-api')
api project(':atlasdb-client-protobufs')
Expand Down
6 changes: 3 additions & 3 deletions atlasdb-config/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies {
implementation project(':atlasdb-impl-shared')
implementation project(':lock-impl')

implementation 'jakarta.validation:jakarta.validation-api'
implementation 'javax.validation:validation-api'
implementation 'com.palantir.config.crypto:encrypted-config-value-module'
implementation 'com.palantir.refreshable:refreshable'
implementation 'com.palantir.safe-logging:safe-logging'
Expand Down Expand Up @@ -40,8 +40,8 @@ dependencies {
implementation 'com.palantir.tokens:auth-tokens'
implementation 'com.palantir.tritium:tritium-registry'
implementation 'io.dropwizard.metrics:metrics-core'
implementation 'jakarta.inject:jakarta.inject-api'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.inject:javax.inject'
implementation 'javax.ws.rs:javax.ws.rs-api'
implementation 'org.glassfish.jersey.core:jersey-common'
implementation 'org.slf4j:slf4j-api'
implementation project(':atlasdb-client')
Expand Down
2 changes: 1 addition & 1 deletion atlasdb-dagger/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies {
implementation 'com.palantir.refreshable:refreshable'
implementation 'com.palantir.tritium:tritium-registry'
implementation 'io.dropwizard.metrics:metrics-core'
implementation 'jakarta.inject:jakarta.inject-api'
implementation 'javax.inject:javax.inject'
implementation project(':atlasdb-api')
implementation project(':atlasdb-client')
implementation project(':atlasdb-config')
Expand Down
2 changes: 1 addition & 1 deletion atlasdb-ete-test-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies {

implementation 'junit:junit'
implementation 'commons-io:commons-io'
implementation 'jakarta.annotation:jakarta.annotation-api'
implementation 'javax.annotation:javax.annotation-api'
implementation 'org.assertj:assertj-core'
implementation 'com.google.guava:guava'
implementation 'com.google.protobuf:protobuf-java'
Expand Down
2 changes: 1 addition & 1 deletion atlasdb-ete-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies {
implementation 'io.dropwizard:dropwizard-configuration'
implementation 'io.dropwizard:dropwizard-core'
implementation 'io.dropwizard:dropwizard-jersey'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.ws.rs:javax.ws.rs-api'
implementation 'org.awaitility:awaitility'
implementation 'org.slf4j:slf4j-api'
implementation project(':atlasdb-api')
Expand Down
6 changes: 3 additions & 3 deletions atlasdb-impl-shared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ dependencies {
implementation 'com.palantir.tokens:auth-tokens'
implementation 'com.palantir.tracing:tracing'
implementation 'io.dropwizard.metrics:metrics-core'
implementation 'jakarta.validation:jakarta.validation-api'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.validation:validation-api'
implementation 'javax.ws.rs:javax.ws.rs-api'
implementation 'org.apache.commons:commons-lang3'
implementation 'org.checkerframework:checker-qual'
implementation 'org.eclipse.collections:eclipse-collections'
Expand Down Expand Up @@ -83,7 +83,7 @@ dependencies {
testImplementation 'io.dropwizard:dropwizard-core'
testImplementation 'io.dropwizard:dropwizard-jersey'
testImplementation 'io.dropwizard:dropwizard-jetty'
testImplementation 'jakarta.ws.rs:jakarta.ws.rs-api'
testImplementation 'javax.ws.rs:javax.ws.rs-api'
testImplementation 'org.eclipse.jetty:jetty-util'
testImplementation 'org.slf4j:slf4j-api'
testImplementation project(':atlasdb-api')
Expand Down
4 changes: 2 additions & 2 deletions atlasdb-perf/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ dependencies {
implementation 'com.palantir.safe-logging:safe-logging'
implementation 'commons-io:commons-io'
implementation 'io.airlift:airline'
implementation 'jakarta.inject:jakarta.inject-api'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.inject:javax.inject'
implementation 'javax.ws.rs:javax.ws.rs-api'
implementation 'org.assertj:assertj-core'
implementation 'org.awaitility:awaitility'
implementation 'org.openjdk.jmh:jmh-core'
Expand Down
4 changes: 2 additions & 2 deletions atlasdb-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies {
implementation project(':lock-impl')
implementation project(':leader-election-impl')
implementation project(':atlasdb-config')
implementation 'jakarta.inject:jakarta.inject-api'
implementation 'javax.inject:javax.inject'

testImplementation 'org.mockito:mockito-core'

Expand All @@ -17,7 +17,7 @@ dependencies {
implementation 'com.palantir.safe-logging:preconditions'
implementation 'com.palantir.safe-logging:safe-logging'
implementation 'com.palantir.tritium:tritium-ids'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.ws.rs:javax.ws.rs-api'
implementation project(':atlasdb-api')
implementation project(':atlasdb-client')
implementation project(':atlasdb-client-protobufs')
Expand Down
15 changes: 4 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ buildscript {
}

dependencies {
classpath 'com.palantir.jakartapackagealignment:jakarta-package-alignment:0.5.0'
classpath 'com.netflix.nebula:gradle-info-plugin:12.1.6'
classpath 'com.netflix.nebula:nebula-publishing-plugin:20.3.0'
classpath 'com.palantir.baseline:gradle-baseline-java:5.21.0'
Expand Down Expand Up @@ -71,6 +72,7 @@ allprojects {
apply plugin: 'java-library'
apply plugin: 'org.inferred.processors' // installs the "processor" configuration needed for baseline-error-prone
apply plugin: 'com.palantir.java-format'
apply plugin: 'com.palantir.jakarta-package-alignment'

// temporary until this is merged/fixed inside gradle-processors
configurations.allProcessors {
Expand All @@ -82,23 +84,14 @@ allprojects {

configurations.all {
resolutionStrategy.dependencySubstitution {
it.substitute it.module('javax.annotation:javax.annotation-api') with it.module('jakarta.annotation:jakarta.annotation-api:1.3.5')
it.substitute it.module('javax.validation:validation-api') with it.module('jakarta.validation:jakarta.validation-api:2.0.2')
it.substitute it.module('javax.ws.rs:javax.ws.rs-api') with it.module('jakarta.ws.rs:jakarta.ws.rs-api:2.1.6')
it.substitute it.module('javax.servlet:javax.servlet-api') with it.module('jakarta.servlet:jakarta.servlet-api:4.0.4')

it.substitute it.module('javax.inject:javax.inject') with it.module('jakarta.inject:jakarta.inject-api:1.0.5')
it.substitute it.module('org.glassfish.hk2.external:javax.inject') with it.module('jakarta.inject:jakarta.inject-api:1.0.5')
it.substitute it.module('org.glassfish.hk2.external:jakarta.inject') with it.module('jakarta.inject:jakarta.inject-api:1.0.5')
it.substitute it.module('org.glassfish.hk2.external:javax.inject') with it.module('javax.inject:javax.inject:1')
it.substitute it.module('org.glassfish.hk2.external:jakarta.inject') with it.module('javax.inject:javax.inject:1')

// See internal migration plugin PR 26: this direction is intentional.
it.substitute it.module('javax.el:javax.el-api') with it.module('org.glassfish:jakarta.el:3.0.4')
it.substitute it.module('jakarta.el:jakarta.el-api') with it.module('org.glassfish:jakarta.el:3.0.4')
it.substitute it.module('org.glassfish:javax.el') with it.module('org.glassfish:jakarta.el:3.0.4')
it.substitute it.module('org.glassfish.web:javax.el') with it.module('org.glassfish:jakarta.el:3.0.4')

// Force errorprone 2.10.0
it.substitute it.module('com.google.errorprone:error_prone_annotations') with it.module('com.google.errorprone:error_prone_annotations:2.10.0')
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/profile-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies {
implementation 'com.palantir.common:streams'
implementation 'com.palantir.safe-logging:preconditions'
implementation 'com.palantir.safe-logging:safe-logging'
implementation 'jakarta.annotation:jakarta.annotation-api'
implementation 'javax.annotation:javax.annotation-api'
implementation 'org.slf4j:slf4j-api'
implementation project(':atlasdb-api')
implementation project(':atlasdb-client-protobufs')
Expand Down
2 changes: 1 addition & 1 deletion leader-election-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependencies {
implementation project(":atlasdb-commons")
implementation project(":leader-election-api-protobufs")
implementation 'org.apache.commons:commons-lang3'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.ws.rs:javax.ws.rs-api'
implementation 'com.fasterxml.jackson.core:jackson-annotations'

implementation 'com.palantir.sls.versions:sls-versions'
Expand Down
2 changes: 1 addition & 1 deletion lock-api-objects/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies {
api project(":timestamp-api")
api project(":timestamp-client")
implementation project(":atlasdb-commons")
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.ws.rs:javax.ws.rs-api'
implementation 'com.fasterxml.jackson.core:jackson-annotations'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'com.palantir.safe-logging:safe-logging'
Expand Down
2 changes: 1 addition & 1 deletion lock-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies {
implementation project(":atlasdb-autobatch")
implementation project(":atlasdb-commons")
implementation project(":atlasdb-buggify")
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.ws.rs:javax.ws.rs-api'
implementation 'com.fasterxml.jackson.core:jackson-annotations'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'com.palantir.safe-logging:safe-logging'
Expand Down
2 changes: 1 addition & 1 deletion timelock-agent/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
implementation 'com.palantir.tritium:tritium-registry'
implementation 'com.zaxxer:HikariCP'
implementation 'io.dropwizard.metrics:metrics-core'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.ws.rs:javax.ws.rs-api'
implementation 'org.jdbi:jdbi3-core'
implementation 'org.jdbi:jdbi3-sqlobject'
implementation 'org.slf4j:slf4j-api'
Expand Down
2 changes: 1 addition & 1 deletion timelock-corruption-detection/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {
implementation 'com.palantir.safe-logging:safe-logging'
implementation 'com.palantir.tokens:auth-tokens'
implementation 'io.undertow:undertow-core'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.ws.rs:javax.ws.rs-api'
implementation 'org.jdbi:jdbi3-core'
implementation 'org.jdbi:jdbi3-sqlobject'
implementation 'org.slf4j:slf4j-api'
Expand Down
2 changes: 1 addition & 1 deletion timelock-impl/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies {
implementation 'com.palantir.tritium:tritium-ids'
implementation 'com.palantir.tritium:tritium-registry'
implementation 'io.dropwizard.metrics:metrics-core'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.ws.rs:javax.ws.rs-api'
implementation 'org.apache.commons:commons-lang3'
implementation 'org.jdbi:jdbi3-core'
implementation 'org.jdbi:jdbi3-sqlobject'
Expand Down
2 changes: 1 addition & 1 deletion timelock-server-benchmark-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies {
implementation 'io.dropwizard.metrics:metrics-core'
implementation 'io.dropwizard:dropwizard-core'
implementation 'io.dropwizard:dropwizard-jersey'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.ws.rs:javax.ws.rs-api'
implementation 'org.apache.commons:commons-lang3'
implementation 'org.slf4j:slf4j-api'
implementation project(':atlasdb-api')
Expand Down
2 changes: 1 addition & 1 deletion timelock-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dependencies {
implementation 'io.dropwizard:dropwizard-lifecycle'
implementation 'io.dropwizard:dropwizard-logging'
implementation 'io.dropwizard:dropwizard-request-logging'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.ws.rs:javax.ws.rs-api'
implementation 'org.eclipse.jetty:jetty-util'
implementation 'org.slf4j:slf4j-api'
implementation project(':atlasdb-api')
Expand Down
2 changes: 1 addition & 1 deletion timestamp-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply from: "../gradle/shared.gradle"

dependencies {
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.ws.rs:javax.ws.rs-api'
implementation 'com.fasterxml.jackson.core:jackson-annotations'
implementation 'com.palantir.safe-logging:safe-logging'

Expand Down
2 changes: 1 addition & 1 deletion timestamp-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies {

implementation 'com.google.guava:guava'
implementation 'com.palantir.safe-logging:preconditions'
implementation 'jakarta.ws.rs:jakarta.ws.rs-api'
implementation 'javax.ws.rs:javax.ws.rs-api'

testImplementation 'com.google.errorprone:error_prone_annotations'
testImplementation 'com.google.guava:guava'
Expand Down
16 changes: 8 additions & 8 deletions versions.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ com.google.dagger:dagger-compiler:2.48 (1 constraints: e2040331)
com.google.dagger:dagger-producers:2.48 (2 constraints: 3c1aa732)
com.google.dagger:dagger-spi:2.48 (1 constraints: 260e6940)
com.google.devtools.ksp:symbol-processing-api:1.9.0-1.0.12 (3 constraints: ae251e6f)
com.google.errorprone:error_prone_annotations:2.10.0 (26 constraints: 23b5f106)
com.google.errorprone:error_prone_annotations:2.21.1 (26 constraints: 23b5f106)
com.google.errorprone:javac-shaded:9-dev-r4023-3 (1 constraints: 151671fc)
com.google.googlejavaformat:google-java-format:1.5 (1 constraints: ee0d4132)
com.google.guava:failureaccess:1.0.1 (4 constraints: 563320fd)
Expand Down Expand Up @@ -191,13 +191,13 @@ io.undertow:undertow-core:2.2.24.Final (3 constraints: 873676e0)
io.vavr:vavr:0.10.4 (1 constraints: 3705273b)
io.vavr:vavr-match:0.10.4 (1 constraints: 8b061d57)
it.unimi.dsi:fastutil:6.5.7 (1 constraints: 6d0e414b)
jakarta.activation:jakarta.activation-api:1.2.2 (3 constraints: 4e3741b6)
jakarta.annotation:jakarta.annotation-api:1.3.5 (7 constraints: 396987f4)
jakarta.inject:jakarta.inject-api:1.0.5 (13 constraints: decbc9f9)
jakarta.servlet:jakarta.servlet-api:4.0.4 (10 constraints: 7b9def70)
jakarta.validation:jakarta.validation-api:2.0.2 (16 constraints: b3ee38f8)
jakarta.ws.rs:jakarta.ws.rs-api:2.1.6 (17 constraints: 6f283f6d)
jakarta.xml.bind:jakarta.xml.bind-api:2.3.3 (4 constraints: dc4625b3)
javax.activation:javax.activation-api:1.2.0 (3 constraints: 053284b7)
javax.annotation:javax.annotation-api:1.3.2 (7 constraints: 396987f4)
javax.inject:javax.inject:1 (13 constraints: decbc9f9)
javax.servlet:javax.servlet-api:4.0.1 (10 constraints: 7b9def70)
javax.validation:validation-api:2.0.1.Final (16 constraints: caf08980)
javax.ws.rs:javax.ws.rs-api:2.1.1 (17 constraints: 6f283f6d)
javax.xml.bind:jaxb-api:2.3.1 (4 constraints: da46b9b1)
jline:jline:2.14.6 (1 constraints: f90f6890)
joda-time:joda-time:2.12.5 (6 constraints: b6591630)
junit:junit:4.13.2 (7 constraints: 246fdbc7)
Expand Down
4 changes: 2 additions & 2 deletions versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ io.airlift:airline = 0.9
io.netty:* = 4.1.96.Final
io.undertow:* = 2.2.24.Final
io.vavr:* = 0.10.4
jakarta.xml.bind:jakarta.xml.bind-api = 2.3.3
jakarta.validation:jakarta.validation-api = 2.0.2
javax.xml.bind:jaxb-api = 2.3.1
javax.validation:validation-api = 2.0.1.Final
joda-time:joda-time = 2.12.5
junit:junit = 4.13.2
net.jcip:jcip-annotations = 1.0
Expand Down

0 comments on commit 64e7944

Please sign in to comment.