From 6482fa7bac0a9bc83933db1a003a8c9fe92146bd Mon Sep 17 00:00:00 2001 From: Erin Schnabel Date: Fri, 28 Jun 2019 10:11:39 -0400 Subject: [PATCH] [java-spring-boot2]: final from adoptopenjdk; fix missing xmlstarlet (#32) * Final from adoptopenjdk; fix missing xmlstarlet * Change Readme: OpenJDK / OpenJ9 --- incubator/java-spring-boot2/README.md | 4 ++-- .../java-spring-boot2/image/java-spring-boot2-build.sh | 4 ++-- incubator/java-spring-boot2/image/project/Dockerfile | 9 +++++---- .../image/project/appsody-boot2-pom.xml | 2 +- incubator/java-spring-boot2/stack.yaml | 2 +- incubator/java-spring-boot2/templates/default/pom.xml | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/incubator/java-spring-boot2/README.md b/incubator/java-spring-boot2/README.md index 56b2631a7..74c949f40 100644 --- a/incubator/java-spring-boot2/README.md +++ b/incubator/java-spring-boot2/README.md @@ -1,6 +1,6 @@ # Spring Boot 2 Stack -The Spring Boot 2 stack supports the development of [Spring Boot 2](https://spring.io/projects/spring-boot) applications using [IBM® SDK, Java Technology Edition, Version 8 with OpenJ9](https://developer.ibm.com/javasdk/) and [Maven](https://maven.apache.org). +The Spring Boot 2 stack supports the development of [Spring Boot 2](https://spring.io/projects/spring-boot) applications using OpenJDK 8 and OpenJ9 from [AdoptOpenJDK](https://adoptopenjdk.net/). The Spring Boot 2 stack uses a parent Maven project object model (POM) to manage dependency versions and provide required capabilities and plugins. Specifically, this stack enables [Spring Boot Actuator](https://github.com/spring-projects/spring-boot/tree/master/spring-boot-project/spring-boot-actuator), the Prometheus Micrometer reporter, and OpenTracing support for Spring using a Jaeger tracer. @@ -49,4 +49,4 @@ Kubernetes defines two integral mechanisms for checking the health of a containe The Spring Boot 2 Actuator defines an `/actuator/health` endpoint, which returns a {"status": "UP"} payload when all is well. This endpoint is enabled by default, and requires no application code. This actuator works well as a Kubernetes readiness probe, as it automatically includes the status of required resources. -The health endpoint is less useful as a liveness check. In Spring Boot 2, the Actuator framework can be trivially extended with custom endpoints. Your application will include a trivial endpoint to be used as a Kubernetes liveness probe. \ No newline at end of file +The health endpoint is less useful as a liveness check. In Spring Boot 2, the Actuator framework can be trivially extended with custom endpoints. Your application will include a trivial endpoint to be used as a Kubernetes liveness probe. diff --git a/incubator/java-spring-boot2/image/java-spring-boot2-build.sh b/incubator/java-spring-boot2/image/java-spring-boot2-build.sh index 40476af96..60c1c257a 100755 --- a/incubator/java-spring-boot2/image/java-spring-boot2-build.sh +++ b/incubator/java-spring-boot2/image/java-spring-boot2-build.sh @@ -83,8 +83,8 @@ common() { major=$(echo ${VERSION} | cut -d'.' -f1) ((next=major+1)) - note "Updating parent version and resolving dependencies" - run_mvn -q versions:update-parent "-DparentVersion=[${major},${next})" dependency:go-offline + note "Updating parent version" + run_mvn -q versions:update-parent "-DparentVersion=[${major},${next})" unset GROUP_ID ARTIFACT_ID VERSION } diff --git a/incubator/java-spring-boot2/image/project/Dockerfile b/incubator/java-spring-boot2/image/project/Dockerfile index 468f80443..ed03b4e23 100644 --- a/incubator/java-spring-boot2/image/project/Dockerfile +++ b/incubator/java-spring-boot2/image/project/Dockerfile @@ -3,7 +3,7 @@ LABEL maintainer="IBM Java Engineering at IBM Cloud" # Ensure up to date / patched OS RUN apt-get -qq update \ - && apt-get -qq install -y curl wget \ + && apt-get -qq install -y curl wget xmlstarlet \ && DEBIAN_FRONTEND=noninteractive apt-get -qq upgrade -y \ && apt-get -qq clean \ && rm -rf /tmp/* /var/lib/apt/lists/* @@ -12,11 +12,12 @@ RUN apt-get -qq update \ COPY . /project COPY ./.mvn-stack-settings.xml /usr/share/maven/conf/settings.xml -WORKDIR "/project" +WORKDIR /project -RUN ./java-spring-boot2-build.sh package +RUN mkdir -p /mvn/repository && ./java-spring-boot2-build.sh package -FROM ibmjava:8-sdk +#### +FROM adoptopenjdk:8-jdk-openj9 ARG artifactId=serverless ARG version=1.0-SNAPSHOT diff --git a/incubator/java-spring-boot2/image/project/appsody-boot2-pom.xml b/incubator/java-spring-boot2/image/project/appsody-boot2-pom.xml index 749a2b7c8..39a0ba066 100644 --- a/incubator/java-spring-boot2/image/project/appsody-boot2-pom.xml +++ b/incubator/java-spring-boot2/image/project/appsody-boot2-pom.xml @@ -5,7 +5,7 @@ dev.appsody spring-boot2-stack - 0.2.0 + 0.2.1 pom Appsody Spring Boot2 stack diff --git a/incubator/java-spring-boot2/stack.yaml b/incubator/java-spring-boot2/stack.yaml index 64d7a6564..5a8a1a7e6 100644 --- a/incubator/java-spring-boot2/stack.yaml +++ b/incubator/java-spring-boot2/stack.yaml @@ -1,6 +1,6 @@ id: java-spring-boot2 name: Java application using Spring Boot 2 -version: 0.2.0 +version: 0.2.1 description: Spring Boot 2 project with health and metrics actuators enabled. Metrics support is provided by Micrometer, and is configured with Prometheus support. maintainer: Erin Schnabel default-template: default diff --git a/incubator/java-spring-boot2/templates/default/pom.xml b/incubator/java-spring-boot2/templates/default/pom.xml index 7ed1f1a54..24d78fa2a 100644 --- a/incubator/java-spring-boot2/templates/default/pom.xml +++ b/incubator/java-spring-boot2/templates/default/pom.xml @@ -6,7 +6,7 @@ dev.appsody spring-boot2-stack - 0.2.0 + 0.2.1