Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
[java-spring-boot2]: final from adoptopenjdk; fix missing xmlstarlet (#…
Browse files Browse the repository at this point in the history
…32)

* Final from adoptopenjdk; fix missing xmlstarlet

* Change Readme: OpenJDK / OpenJ9
  • Loading branch information
Erin Schnabel authored and neeraj-laad committed Jun 28, 2019
1 parent 3949af2 commit 6482fa7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions incubator/java-spring-boot2/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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.
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.
4 changes: 2 additions & 2 deletions incubator/java-spring-boot2/image/java-spring-boot2-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
9 changes: 5 additions & 4 deletions incubator/java-spring-boot2/image/project/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/*
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>dev.appsody</groupId>
<artifactId>spring-boot2-stack</artifactId>
<version>0.2.0</version>
<version>0.2.1</version>
<packaging>pom</packaging>

<name>Appsody Spring Boot2 stack</name>
Expand Down
2 changes: 1 addition & 1 deletion incubator/java-spring-boot2/stack.yaml
Original file line number Diff line number Diff line change
@@ -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 <schnabel@us.ibm.com>
default-template: default
Expand Down
2 changes: 1 addition & 1 deletion incubator/java-spring-boot2/templates/default/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent><!--required parent POM-->
<groupId>dev.appsody</groupId>
<artifactId>spring-boot2-stack</artifactId>
<version>0.2.0</version>
<version>0.2.1</version>
<relativePath/>
</parent>

Expand Down

0 comments on commit 6482fa7

Please sign in to comment.