From bb5887991b153c3ab78f41b5d0c0d389c319c1eb Mon Sep 17 00:00:00 2001 From: Pete Stevenson Date: Mon, 16 May 2022 14:48:14 -0700 Subject: [PATCH 1/2] Upgrade to Java 18. Signed-off-by: Pete Stevenson --- pom.xml | 48 ++++++++++++++++--- .../weave/socks/cart/CartApplication.java | 2 - 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 8f1ef5182..cd35fd868 100644 --- a/pom.xml +++ b/pom.xml @@ -14,28 +14,60 @@ org.springframework.boot spring-boot-starter-parent - 2.0.4.RELEASE + 2.4.0 + UTF-8 - 1.8 + 18 0.0.21 + + org.hibernate.validator + hibernate-validator + + + com.h2database + h2 + + + org.springframework.boot + spring-boot-starter-data-jpa + 2.6.7 + + + org.springframework + spring-core + 5.3.19 + + + javax.validation + validation-api + 2.0.1.Final + + + org.mongodb + mongo-java-driver + 3.12.10 + + + junit + junit + 4.13.2 + test + org.springframework.boot spring-boot-starter-data-rest + 2.6.6 org.springframework.boot spring-boot-starter-data-mongodb - - - org.springframework.cloud - spring-cloud-starter-zipkin - 1.1.0.RELEASE + 2.6.6 io.prometheus @@ -55,6 +87,7 @@ org.springframework.data spring-data-rest-hal-browser + 3.3.9.RELEASE org.springframework.boot @@ -81,6 +114,7 @@ org.springframework.boot spring-boot-maven-plugin + 1.5.22.RELEASE org.apache.maven.plugins diff --git a/src/main/java/works/weave/socks/cart/CartApplication.java b/src/main/java/works/weave/socks/cart/CartApplication.java index 51d9a8d45..edef51ae7 100644 --- a/src/main/java/works/weave/socks/cart/CartApplication.java +++ b/src/main/java/works/weave/socks/cart/CartApplication.java @@ -1,11 +1,9 @@ package works.weave.socks.cart; -import io.prometheus.client.spring.boot.EnablePrometheusEndpoint; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication -@EnablePrometheusEndpoint public class CartApplication { public static void main(String[] args) { SpringApplication.run(CartApplication.class, args); From 5fa21d82073c34e2f4c68d7a1f9ada400369b15b Mon Sep 17 00:00:00 2001 From: Pete Stevenson Date: Mon, 16 May 2022 14:52:01 -0700 Subject: [PATCH 2/2] Use maven on Java v18 for Java upgrade. Signed-off-by: Pete Stevenson --- scripts/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.sh b/scripts/build.sh index 7f6271768..ef8955c96 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -24,7 +24,7 @@ else fi CODE_DIR=$(cd $SCRIPT_DIR/..; pwd) echo $CODE_DIR -$DOCKER_CMD run --rm -v $HOME/.m2:/root/.m2 -v $CODE_DIR:/usr/src/mymaven -w /usr/src/mymaven maven:3.6-jdk-11 mvn -q -DskipTests package +$DOCKER_CMD run --rm -v $HOME/.m2:/root/.m2 -v $CODE_DIR:/usr/src/mymaven -w /usr/src/mymaven maven:3.8.5-openjdk-18 mvn -q -DskipTests package cp $CODE_DIR/target/*.jar $CODE_DIR/docker/carts