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

The Wrath of Indonesia: JavaX -> Jakarta Migration #4677

Merged
merged 20 commits into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
| [guava, v. 18.0](https://github.com/google/guava) | [Apache License, Version 2.0](http://www.apache.org/licenses/) |
| [jackson, v. 2.5.0](https://github.com/FasterXML/jackson) | [Apache License, Version 2.0](http://www.apache.org/licenses/) |
| [javax.ws.rs, v. 2.0.1](https://jax-rs-spec.java.net/) | [Common Development and Distribution License Version 1.0](http://opensource.org/licenses/cddl1.php) |
| [jakarta.ws.rs, v. 2.1.6](https://github.com/eclipse-ee4j/jakartaee-platform) | [Eclipse Public License, Version 2.0](https://github.com/eclipse-ee4j/jakartaee-platform/blob/master/LICENSE) |
| [jmock](http://www.jmock.org/) | [New BSD License](http://opensource.org/licenses/BSD-3-Clause) |
| [jruby, v. 1.6.7.2](http://jruby.org/) | [Lesser General Public License, Version 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) |
| [json-simple, v. 1.1.1](https://github.com/fangyidong/json-simple) | [Apache License, Version 2.0](http://www.apache.org/licenses/) |
| [jsr305, v. 1.3.9](https://code.google.com/p/jsr-305/) | [New BSD License](https://code.google.com/p/jsr-305/source/ browse/trunk/ri/LICENSE) |
| [jsr305, v. 1.3.9](https://code.google.com/p/jsr-305/) | [New BSD License](https://code.google.com/p/jsr-305/source/browse/trunk/ri/LICENSE) |
| [junit, v. 4.10](https://github.com/junit-team/junit) | [Eclipse Public License](https://github.com/junit-team/junit/blob/master/LICENSE-junit.txt) |
| [okjson](https://github.com/kr/okjson) | [MIT License](https://github.com/kr/okjson/blob/master/okjson.rb) |
| [Palantir Cinch](https://github.com/palantir/Cinch) | [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) |
Expand Down
4 changes: 2 additions & 2 deletions atlasdb-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ dependencies {
compile group: 'org.apache.commons', name: 'commons-lang3'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind'
compile group: 'javax.annotation', name: 'javax.annotation-api'
compile group: 'javax.validation', name: 'validation-api'
compile group: 'jakarta.annotation', name: 'jakarta.annotation-api'
compile group: 'jakarta.validation', name: 'jakarta.validation-api'

compile 'com.github.ben-manes.caffeine:caffeine'
compile group: 'com.palantir.conjure.java.api', name: 'ssl-config'
Expand Down
1 change: 1 addition & 0 deletions atlasdb-cassandra-integration-tests/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

apply from: "../gradle/shared.gradle"
apply from: "../gradle/tests.gradle"

dependencies {
testCompile project(":atlasdb-cassandra")
Expand Down
4 changes: 2 additions & 2 deletions atlasdb-config/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies {
compile project(':lock-impl')
compile project(':timestamp-client')

compile group: 'javax.validation', name: 'validation-api'
compile group: 'jakarta.validation', name: 'jakarta.validation-api'
compile group: 'com.palantir.config.crypto', name: 'encrypted-config-value-module'
compile group: 'com.palantir.remoting2', name: 'error-handling' // needed for backwards compatibility
compile group: 'com.palantir.safe-logging', name: 'safe-logging'
Expand Down Expand Up @@ -43,7 +43,7 @@ dependencies {
exclude group: 'org.hamcrest'
}
testCompile group: 'org.mockito', name: 'mockito-core'
testCompile group: 'com.github.tomakehurst', name: 'wiremock'
testCompile group: 'com.github.tomakehurst', name: 'wiremock-standalone'
testCompile group: 'org.assertj', name: 'assertj-core'
testCompile group: 'org.awaitility', name: 'awaitility'
testCompile group: 'com.github.stefanbirkner', name: 'system-rules'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.apache.http.HttpStatus;
import org.junit.Test;

import com.google.common.collect.ImmutableList;
import com.google.common.net.HttpHeaders;
import com.palantir.remoting2.errors.SerializableError;

import wiremock.org.eclipse.jetty.http.HttpStatus;

public class ExceptionMappersTest {
private static final Exception RUNTIME_EXCEPTION = new RuntimeException("foo");
private static final Response RESPONSE_503_WITHOUT_RETRY_AFTER
Expand All @@ -43,7 +44,7 @@ public void responseWithoutRetryAfterShouldHaveContentTypeApplicationJson() {
@Test
public void responseWithoutRetryAfterShouldHaveClaimedStatusCode() {
assertThat(RESPONSE_503_WITHOUT_RETRY_AFTER.getStatus())
.isEqualTo(HttpStatus.SC_SERVICE_UNAVAILABLE);
.isEqualTo(HttpStatus.SERVICE_UNAVAILABLE_503);
}

@Test
Expand All @@ -68,7 +69,7 @@ public void responseWithRetryAfterShouldHaveContentTypeApplicationJson() {
@Test
public void responseWithRetryAfterShouldHaveClaimedStatusCode() {
assertThat(RESPONSE_503_WITH_RETRY_AFTER.getStatus())
.isEqualTo(HttpStatus.SC_SERVICE_UNAVAILABLE);
.isEqualTo(HttpStatus.SERVICE_UNAVAILABLE_503);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public ClientConfiguration serverListToClient(ServerListConfig serverConfig) {
.from(ClientConfigurations.of(partialConfig))
.failedUrlCooldown(failedUrlCooldown())
.enableGcmCipherSuites(true)
.enableHttp2(true)
.fallbackToCommonNameVerification(true)
.clientQoS(clientQoS())
.build();
Expand All @@ -114,6 +115,7 @@ public ClientConfiguration create(
.failedUrlCooldown(failedUrlCooldown())
.maxNumRetries(maxNumRetries())
.enableGcmCipherSuites(true)
.enableHttp2(true)
.fallbackToCommonNameVerification(true)
.clientQoS(clientQoS())
.serverQoS(serverQoS());
Expand Down
25 changes: 25 additions & 0 deletions atlasdb-impl-shared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,28 @@ dependencies {

testRuntime group: 'ch.qos.logback', name: 'logback-classic'
}

configurations.testCompile {
resolutionStrategy {
// It sucks, but at least we can validate only on test
force 'io.dropwizard.metrics:metrics-jmx:4.1.5'
}
}
configurations.testCompileClasspath {
resolutionStrategy {
// It sucks, but at least we can validate only on test
force 'io.dropwizard.metrics:metrics-jmx:4.1.5'
}
}
configurations.testRuntime {
resolutionStrategy {
// It sucks, but at least we can validate only on test
force 'io.dropwizard.metrics:metrics-jmx:4.1.5'
}
}
configurations.testRuntimeClasspath {
resolutionStrategy {
// It sucks, but at least we can validate only on test
force 'io.dropwizard.metrics:metrics-jmx:4.1.5'
}
}
2 changes: 1 addition & 1 deletion atlasdb-persistent-lock-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ libsDirName = file('build/artifacts')

dependencies {
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind'
compile group: 'javax.ws.rs', name: 'javax.ws.rs-api'
compile group: 'jakarta.ws.rs', name: 'jakarta.ws.rs-api'

annotationProcessor group: 'org.immutables', name: 'value'
compileOnly 'org.immutables:value::annotations'
Expand Down
2 changes: 1 addition & 1 deletion atlasdb-service/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dependencies {
compile project(':lock-impl')
compile project(':leader-election-impl')
compile project(':atlasdb-config')
compile 'javax.inject:javax.inject:1'
compile group: 'jakarta.inject', name: 'jakarta.inject-api'

testCompile group: 'org.mockito', name: 'mockito-core'

Expand Down
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,22 @@ allprojects {
details.useTarget group: 'com.palantir.docker.compose', name: 'docker-compose-rule-junit4', version: dependencyRecommendations.getRecommendedVersion('com.palantir.docker.compose', 'docker-compose-rule-junit4')
}
}

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.inject:javax.inject') with it.module('jakarta.inject:jakarta.inject-api:1.0')
it.substitute it.module('org.glassfish.hk2.external:javax.inject') with it.module('jakarta.inject:jakarta.inject-api:1.0')
it.substitute it.module('org.glassfish.hk2.external:jakarta.inject') with it.module('jakarta.inject:jakarta.inject-api:1.0')

// 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.3')
it.substitute it.module('jakarta.el:jakarta.el-api') with it.module('org.glassfish:jakarta.el:3.0.3')
it.substitute it.module('org.glassfish:javax.el') with it.module('org.glassfish:jakarta.el:3.0.3')
it.substitute it.module('org.glassfish.web:javax.el') with it.module('org.glassfish:jakarta.el:3.0.3')
}
}
}

Expand Down
5 changes: 5 additions & 0 deletions changelog/@unreleased/pr-4677.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: improvement
improvement:
description: Conjure Java Runtime is upgraded to `4.70.1`.
links:
- https://github.com/palantir/atlasdb/pull/4677
2 changes: 1 addition & 1 deletion leader-election-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies {
compile project(":atlasdb-commons")
compile project(":leader-election-api-protobufs")
compile group: 'org.apache.commons', name: 'commons-lang3'
compile group: 'javax.ws.rs', name: 'javax.ws.rs-api'
compile group: 'jakarta.ws.rs', name: 'jakarta.ws.rs-api'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations'
compile group: 'com.github.stephenc.jcip', name: 'jcip-annotations'

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 @@ -11,7 +11,7 @@ dependencies {
compile project(":atlasdb-commons")
compile project(":timestamp-api")
compile project(":timestamp-client")
compile group: 'javax.ws.rs', name: 'javax.ws.rs-api'
compile group: 'jakarta.ws.rs', name: 'jakarta.ws.rs-api'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind'
compile group: 'com.palantir.safe-logging', name: '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 @@ -14,7 +14,7 @@ dependencies {
compile project(':timelock-api:timelock-api-jersey')
compile project(":timestamp-api")
compile project(":timestamp-client")
compile group: 'javax.ws.rs', name: 'javax.ws.rs-api'
compile group: 'jakarta.ws.rs', name: 'jakarta.ws.rs-api'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind'
compile group: 'com.palantir.safe-logging', name: 'safe-logging'
Expand Down
16 changes: 10 additions & 6 deletions tests.props
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
ch.qos.logback:* = 1.2.3
io.dropwizard:* = 1.2.9
io.dropwizard.metrics:* = 3.2.6
com.fasterxml:classmate* = 1.3.4
io.dropwizard:* = 2.0.2
io.dropwizard.metrics:metrics-* = 4.1.5
io.github.openfeign:feign-core = 9.5.0
org.eclipse.jetty.http2:* = 9.4.14.v20181114
org.eclipse.jetty:* = 9.4.14.v20181114
org.glassfish.jersey.containers:jersey-container-servlet-core = 2.25.1
org.glassfish.jersey.core:jersey* = 2.25.1
org.eclipse.jetty.http2:* = 9.4.26.v20200117
org.eclipse.jetty:* = 9.4.26.v20200117
org.glassfish.hk2:hk2-* = 2.6.1
org.glassfish.hk2.external:aopalliance-repackaged = 2.6.1
org.glassfish.jersey.containers:jersey-container-servlet* = 2.29.1
org.glassfish.jersey.core:jersey* = 2.29.1
org.hibernate:hibernate-validator = 5.4.3.Final
org.hibernate.validator:hibernate-validator = 6.1.2.Final
org.objenesis:objenesis = 2.6
org.slf4j:* = 1.7.26
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 {
compile group: 'javax.ws.rs', name: 'javax.ws.rs-api'
compile group: 'jakarta.ws.rs', name: 'jakarta.ws.rs-api'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations'
compile group: 'com.palantir.safe-logging', name: 'safe-logging'

Expand Down
29 changes: 19 additions & 10 deletions versions.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
ch.qos.logback:* = 1.1.7
com.ea.agentloader:ea-agent-loader = 1.0.3
com.fasterxml:classmate = 1.3.4
com.fasterxml.jackson.*:* = 2.10.1
com.fasterxml.jackson.datatype:jackson-datatype-jdk7 = 2.6.7
com.github.ben-manes.caffeine:caffeine = 2.8.0
com.github.peterwippermann.junit4:parameterized-suite = 1.1.0
com.github.rholder:guava-retrying = 2.0.0
com.github.stefanbirkner:system-rules = 1.19.0
com.github.tomakehurst:wiremock = 2.25.1
com.github.tomakehurst:wiremock-standalone = 2.25.1
com.github.tomakehurst:wiremock = 2.26.3
com.github.tomakehurst:wiremock-standalone = 2.26.3
com.google.auto:auto-common = 0.10
com.google.auto.service:auto-service = 1.0-rc6
com.google.code.findbugs:findbugs-annotations = 3.0.1
Expand All @@ -26,14 +27,14 @@ com.palantir.config.crypto:encrypted-config-value-module = 2.1.0
com.palantir.conjure:conjure = 4.7.0
com.palantir.conjure.java.api:* = 2.9.0
com.palantir.conjure.java:* = 5.2.0
com.palantir.conjure.java.runtime:* = 4.43.0
com.palantir.conjure.java.runtime:* = 4.70.1
com.palantir.docker.compose:docker-compose-rule* = 1.3.0
com.palantir.docker.proxy:docker-proxy-rule = 0.8.1
com.palantir.remoting2:* = 2.6.3
com.palantir.safe-logging:* = 1.12.0
com.palantir.tokens:auth-tokens = 3.6.1
com.palantir.tracing:* = 4.4.0
com.palantir.tritium:* = 0.15.8
com.palantir.tritium:* = 0.16.7
com.squareup.okhttp3:* = 3.12.0
com.squareup:javapoet = 1.11.1
commons-cli:commons-cli = 1.2
Expand All @@ -43,13 +44,17 @@ io.airlift:airline = 0.8
io.atomix.catalyst:* = 1.1.2
io.atomix.copycat:* = 1.2.0
io.atomix:* = 1.0.0-rc9
io.dropwizard.metrics:metrics-* = 3.2.3
io.dropwizard.metrics:metrics-* = 3.2.6
io.dropwizard.modules:* = 0.9.0-1
io.dropwizard:* = 0.9.3
io.dropwizard:* = 2.0.2
io.netty:* = 4.1.39.Final
jakarta.annotation:jakarta.annotation-api = 1.3.5
jakarta.inject:jakarta.inject-api = 1.0
jakarta.validation:jakarta.validation-api = 2.0.2
jakarta.ws.rs:jakarta.ws.rs-api = 2.1.6
javax.annotation:javax.annotation-api = 1.3.2
javax.validation:validation-api = 1.1.0.Final
javax.ws.rs:javax.ws.rs-api = 2.0.1
javax.ws.rs:javax.ws.rs-api = 2.1
joda-time:joda-time = 2.10.1
jp.skypencil.findbugs.slf4j:* = 1.2.4
junit:junit = 4.12
Expand All @@ -70,13 +75,17 @@ org.clojure:clojure = 1.8.0
org.codehaus.groovy:* = 2.4.4
org.derive4j:* = 1.1.1
org.eclipse.jetty.http2:* = 9.3.9.v20160517
org.eclipse.jetty:jetty-* = 9.4.27.v20200227
org.glassfish.hk2.external:javax.inject = 2.5.0-b05
org.glassfish.jersey.containers:jersey-container-servlet-core = 2.23.2
org.glassfish.jersey.core:jersey* = 2.25.1
org.glassfish.jersey.ext:* = 2.25.1
org.glassfish.jersey.containers:jersey-container-servlet* = 2.29.1
org.glassfish.jersey.core:jersey* = 2.29.1
org.glassfish.jersey.ext:* = 2.29.1
org.glassfish.jersey.inject:* = 2.29.1
org.glassfish:jakarta.el = 3.0.3
org.hamcrest:* = 1.3
org.hdrhistogram:HdrHistogram = 2.1.11
org.hibernate:hibernate-validator = 5.1.3.Final
org.hibernate.validator:hibernate-validator = 6.1.2.Final
org.immutables:* = 2.8.2
org.javassist:javassist = 3.18.2-GA
org.jmock:jmock* = 2.12.0
Expand Down