Skip to content

Commit

Permalink
🔧 Bump to Java 16 (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
celinepelletier authored May 28, 2024
1 parent e4dfe2e commit 70e4e13
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM openjdk:11.0.15-jdk-slim as build-keys
FROM openjdk:16-jdk-slim as build-keys

WORKDIR /tmp/kf-key-management
COPY . .

RUN ./mvnw package -DskipTests

FROM openjdk:11.0.15-jre-slim
FROM openjdk:16-jdk-slim

RUN mkdir -p /opt/kidsfirst/keys
COPY --from=build-keys /tmp/kf-key-management/target/keys.jar /opt/kidsfirst/keys/keys.jar
Expand Down
15 changes: 8 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.7</version>
<version>2.7.18</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

Expand All @@ -16,10 +16,10 @@
<description>Kidsfirst key management</description>

<properties>
<java.version>11</java.version>
<java.version>16</java.version>
<spring-cloud.version>2021.0.1</spring-cloud.version>
<testcontainers.version>1.15.1</testcontainers.version>
<log4j2.version>2.17.1</log4j2.version>
<testcontainers.version>1.19.8</testcontainers.version>
<log4j2.version>2.23.1</log4j2.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -77,6 +77,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.32</version>
<optional>true</optional>
</dependency>

Expand Down Expand Up @@ -128,9 +129,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<version>2.35.1</version>
<groupId>org.wiremock</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>3.6.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/kidsfirst/keys/AbstractTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.springframework.test.context.DynamicPropertySource;
import org.springframework.test.web.reactive.server.WebTestClient;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.shaded.org.apache.commons.lang.RandomStringUtils;
import org.testcontainers.shaded.org.apache.commons.lang3.RandomStringUtils;
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
import software.amazon.awssdk.enhanced.dynamodb.DynamoDbAsyncTable;
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/io/kidsfirst/keys/CavaticaTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import org.springframework.test.context.DynamicPropertyRegistry;
import org.springframework.test.context.DynamicPropertySource;

import static com.github.tomakehurst.wiremock.client.WireMock.get;
import static com.github.tomakehurst.wiremock.client.WireMock.ok;
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
import static com.github.tomakehurst.wiremock.client.WireMock.*;


@Slf4j
public class CavaticaTests extends AbstractTest {
Expand Down Expand Up @@ -46,7 +46,7 @@ public class CavaticaTests extends AbstractTest {
"}";

@BeforeAll
private static void initTest(){
static void initTest(){
val userAndToken = createUserAndSecretAndObtainAccessToken("cavatica", "cavatica_secret");
defaultAccessToken = userAndToken.getAccessToken();
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/kidsfirst/keys/DynamicProxyTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class DynamicProxyTests extends AbstractTest {
protected static String defaultAccessToken = "";

@BeforeAll
private static void initTest() {
static void initTest() {
val userAndToken = createUserAndSecretAndObtainAccessToken("gen3", "cavatica_secret");
defaultAccessToken = userAndToken.getAccessToken();
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/kidsfirst/keys/FenceDeprecatedTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class FenceDeprecatedTests extends AbstractTest {

protected static String defaultAccessToken = "";
@BeforeAll
private static void initTest(){
static void initTest(){
val userAndToken = createUserAndSecretAndObtainAccessToken("cavatica", "cavatica_secret");
defaultAccessToken = userAndToken.getAccessToken();
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/kidsfirst/keys/FenceTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class FenceTests extends AbstractTest {
protected static String defaultAccessToken = "";

@BeforeAll
private static void initTest() {
static void initTest() {
val userAndToken = createUserAndSecretAndObtainAccessToken("gen3", "cavatica_secret");
defaultAccessToken = userAndToken.getAccessToken();
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/io/kidsfirst/keys/KeyStoreTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class KeyStoreTests extends AbstractTest {
private final String keyStoreUri = "/key-store";
protected static String defaultAccessToken = "";
@BeforeAll
private static void initTest(){
static void initTest(){
val userAndToken = createUserAndSecretAndObtainAccessToken("cavatica", "cavatica_secret");
defaultAccessToken = userAndToken.getAccessToken();
}
Expand Down

0 comments on commit 70e4e13

Please sign in to comment.