Skip to content

Commit

Permalink
3.0 preparation: change sources to Java 17 (helidon-io#3633)
Browse files Browse the repository at this point in the history
* Change sources to Java 17
  • Loading branch information
tomas-langer authored Nov 9, 2021
1 parent bef4b1e commit bf9fe2f
Show file tree
Hide file tree
Showing 69 changed files with 158 additions and 201 deletions.
2 changes: 1 addition & 1 deletion applications/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
<maven.compiler.release>${maven.compiler.source}</maven.compiler.release>
<version.plugin.compiler>3.8.1</version.plugin.compiler>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# 1st stage, build the app
FROM maven:3.6.3-jdk-11-slim as build
FROM maven:3.6.3-openjdk-17-slim as build

WORKDIR /helidon

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# 1st stage, build the app
FROM maven:3.6-jdk-11 as build
FROM maven:3.6.3-openjdk-17-slim as build

WORKDIR /helidon

Expand All @@ -17,7 +17,7 @@ RUN mvn package -DskipTests
RUN echo "done!"

# 2nd stage, build the runtime image
FROM openjdk:11-jre-slim
FROM openjdk:17-jdk-slim
WORKDIR /helidon

# Copy the binary built in the 1st stage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# 1st stage, build the app
FROM helidon/jdk11-graalvm-maven:21.3.0 as build
FROM helidon/jdk17-graalvm-maven:21.3.0 as build

WORKDIR /helidon

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# 1st stage, build the app
FROM maven:3.6.3-jdk-11-slim as build
FROM maven:3.6.3-openjdk-17-slim as build

WORKDIR /helidon

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# 1st stage, build the app
FROM maven:3.6-jdk-11 as build
FROM maven:3.6.3-openjdk-17-slim as build

WORKDIR /helidon

Expand All @@ -18,7 +18,7 @@ RUN mvn package -DskipTests
RUN echo "done!"

# 2nd stage, build the runtime image
FROM openjdk:11-jre-slim
FROM openjdk:17-jdk-slim
WORKDIR /helidon

# Copy the binary built in the 1st stage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# 1st stage, build the app
FROM helidon/jdk11-graalvm-maven:21.3.0 as build
FROM helidon/jdk17-graalvm-maven:21.3.0 as build

WORKDIR /helidon

Expand Down
8 changes: 4 additions & 4 deletions common/http/src/main/java/io/helidon/common/http/Content.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020 Oracle and/or its affiliates.
* Copyright (c) 2018, 2021 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,19 +28,19 @@
/**
* Represents an HTTP entity as a {@link Multi multi} of {@link DataChunk chunks} with specific
* features.
* <h3>Default publisher contract</h3>
* <h2>Default publisher contract</h2>
* Default publisher accepts only single subscriber. Other subscribers receives
* {@link Flow.Subscriber#onError(Throwable) onError()}.
* <p>
* {@link DataChunk} provided by {@link Flow.Subscriber#onNext(Object) onNext()} method <b>must</b> be consumed in this
* method call. Buffer can be reused by network infrastructure as soon as {@code onNext()} method returns.
* This behavior can be inconvenient yet it helps to provide excellent performance.
*
* <h3>Publisher Overwrite.</h3>
* <h2>Publisher Overwrite.</h2>
* It is possible to modify contract of the original publisher by registration of a new publisher using
* {@link #registerFilter(Function)} method. It can be used to wrap or replace previously registered (or default) publisher.
*
* <h3>Entity Readers</h3>
* <h2>Entity Readers</h2>
* It is possible to register function to convert publisher to {@link io.helidon.common.reactive.Single} of a single entity using
* {@link #registerReader(Class, Reader)} or {@link #registerReader(Predicate, Reader)} methods. It
* is then possible to use {@link #as(Class)} method to obtain such entity.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,6 @@ public String toString() {

/**
* Tests if this media type has provided Structured Syntax {@code suffix} (RFC 6839).
* <p>
*
* @param suffix Suffix with or without '+' prefix. If null or empty then returns {@code true} if this media type
* has ANY suffix.
Expand Down
16 changes: 8 additions & 8 deletions config/config/src/main/java/io/helidon/config/Config.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2020 Oracle and/or its affiliates.
* Copyright (c) 2017, 2021 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,9 +38,9 @@
import io.helidon.config.spi.OverrideSource;

/**
* <h1>Configuration</h1>
* <h2>Configuration</h2>
* Immutable tree-structured configuration.
* <h2>Loading Configuration</h2>
* <h3>Loading Configuration</h3>
* Load the default configuration using the {@link Config#create} method.
* <pre>{@code
* Config config = Config.create();
Expand Down Expand Up @@ -95,7 +95,7 @@
* </tr>
* </table>
*
* <h2>Navigating in a Configuration Tree</h2>
* <h3>Navigating in a Configuration Tree</h3>
* Each loaded configuration is a tree of {@code Config} objects. The
* application can access an arbitrary node in the tree by passing its
* fully-qualified name to {@link Config#get}:
Expand Down Expand Up @@ -146,8 +146,8 @@
* <p>
* To get node value, use {@link #as(Class)} to access this config node as a {@link ConfigValue}
*
* <h2>Converting Configuration Values to Types</h2>
* <h3>Explicit Conversion by the Application</h3>
* <h3>Converting Configuration Values to Types</h3>
* <h4>Explicit Conversion by the Application</h4>
* The interpretation of a configuration node, including what datatype to use,
* is up to the application. To interpret a node's value as a type other than
* {@code String} the application can invoke one of these convenience methods:
Expand Down Expand Up @@ -231,8 +231,8 @@
* that can handle classes that fulfill some requirements (see documentation), such as a public constructor,
* static "create(Config)" method etc.
*
* <h2><a id="multipleSources">Handling Multiple Configuration
* Sources</a></h2>
* <h3><a id="multipleSources">Handling Multiple Configuration
* Sources</a></h3>
* A {@code Config} instance, including the default {@code Config} returned by
* {@link Config#create}, might be associated with multiple {@link ConfigSource}s. The
* config system merges these together so that values from config sources with higher priority have
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 Oracle and/or its affiliates.
* Copyright (c) 2020, 2021 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,7 +37,7 @@
* will be resolved as:
* <pre>
* {@code message = "Hello Joachim!"}</pre>
* <h1>How to Activate This Filter</h1>
* <h2>How to Activate This Filter</h2>
* Use any of the following techniques to create a {@code ValueResolvingFilter} and
* use it for config look-ups.
* <ol>
Expand All @@ -62,7 +62,7 @@
* every {@code Config.Builder} automatically.
* </li>
* </ol>
* <h2>Handling Missing References</h2>
* <h3>Handling Missing References</h3>
* By default, references to tokens that are not present <em>do not</em> cause
* retrievals to fail. You can customize this behavior in several ways.
* <ol>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2020 Oracle and/or its affiliates.
* Copyright (c) 2017, 2021 Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -69,7 +69,6 @@
* seconds</td>
* </tr>
* </table>
* <p>
* </li>
* <li>{@code class} - fully-qualified class name of a custom polling strategy
* implementation or a builder class that implements a {@code build()} method
Expand All @@ -79,7 +78,7 @@
* For a given config source use either {@code type} or {@code class} to
* indicate a polling strategy but not both. If both appear the config system
* ignores the {@code class} setting.
* <h3>Meta-configuration Support for Custom Polling Strategies</h3>
* <h2>Meta-configuration Support for Custom Polling Strategies</h2>
* To support settings in meta-configuration, a custom polling strategy must
* be capable of processing the meta configuration provided to
* {@link io.helidon.config.spi.PollingStrategyProvider#create(String, io.helidon.config.Config)}
Expand Down
2 changes: 1 addition & 1 deletion docs/shared/common_prereqs/common_prereqs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// tag::common-prereqs-table-contents[]
|A Helidon MP Application | You can use your own application or use the https://helidon.io/docs/v2/#/mp/guides/02_quickstart[Helidon MP Quickstart] to create a sample application.
|https://www.oracle.com/technetwork/java/javase/downloads[Java{nbsp}SE{nbsp}11] (http://jdk.java.net[Open{nbsp}JDK{nbsp}11]) |Helidon requires Java 11+.
|https://www.oracle.com/technetwork/java/javase/downloads[Java{nbsp}SE{nbsp}17] (http://jdk.java.net[Open{nbsp}JDK{nbsp}17]) |Helidon requires Java 17+.
|https://maven.apache.org/download.cgi[Maven 3.6.1+]|Helidon requires Maven 3.6.1+.
|https://docs.docker.com/install/[Docker 18.09+]|You need Docker if you
want to build and deploy Docker containers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN set -x \
&& apt-get -y install curl

RUN curl -O -L \
https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java11-linux-amd64-21.3.0.tar.gz && \
https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-21.3.0/graalvm-ce-java17-linux-amd64-21.3.0.tar.gz && \
tar -xvzf graalvm-*.tar.gz && \
rm graalvm-*.tar.gz && \
mv graalvm-* graalvm && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN set -x && \

RUN echo "done!"

FROM helidon/jdk11-graalvm:21.3.0
FROM helidon/jdk17-graalvm:21.3.0

COPY --from=build /build/maven /usr/share/maven
RUN ln -s /usr/share/maven/bin/mvn /bin/
Expand Down
8 changes: 4 additions & 4 deletions etc/dockerfiles/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ readonly MY_DIR=$(cd $(dirname -- "${SCRIPT_PATH}") ; pwd -P)

readonly GRAALVM_VERSION=21.3.0

docker build -f ${MY_DIR}/Dockerfile.jdk11-graalvm -t helidon/jdk11-graalvm:${GRAALVM_VERSION} ${MY_DIR}
docker build -f ${MY_DIR}/Dockerfile.jdk11-graalvm-maven -t helidon/jdk11-graalvm-maven:${GRAALVM_VERSION} ${MY_DIR}
docker build -f ${MY_DIR}/Dockerfile.jdk17-graalvm -t helidon/jdk17-graalvm:${GRAALVM_VERSION} ${MY_DIR}
docker build -f ${MY_DIR}/Dockerfile.jdk17-graalvm-maven -t helidon/jdk17-graalvm-maven:${GRAALVM_VERSION} ${MY_DIR}

if [ "${PUSH}" = "true" ] ; then
docker push helidon/jdk11-graalvm:${GRAALVM_VERSION}
docker push helidon/jdk11-graalvm-maven:${GRAALVM_VERSION}
docker push helidon/jdk17-graalvm:${GRAALVM_VERSION}
docker push helidon/jdk17-graalvm-maven:${GRAALVM_VERSION}
fi
8 changes: 6 additions & 2 deletions etc/scripts/includes/pipeline-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [ -z "${__PIPELINE_ENV_INCLUDED__}" ]; then
. ${WS_DIR}/etc/scripts/includes/error_handlers.sh

if [ -z "${GRAALVM_HOME}" ]; then
export GRAALVM_HOME="/tools/graalvm-ce-java11-21.3.0"
export GRAALVM_HOME="/tools/graalvm-ce-java17-21.3.0"
fi

require_env() {
Expand All @@ -67,10 +67,14 @@ if [ -z "${__PIPELINE_ENV_INCLUDED__}" ]; then

if [ -n "${JENKINS_HOME}" ] ; then
export PIPELINE="true"
export JAVA_HOME="/tools/jdk-11.0.12"
export JAVA_HOME="/tools/jdk-17"
MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.showDateTime=true"
MAVEN_OPTS="${MAVEN_OPTS} -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS"
# Needed for archetype engine plugin
MAVEN_OPTS="${MAVEN_OPTS} --add-opens=java.base/java.util=ALL-UNNAMED"
# Needed for generating site
MAVEN_OPTS="${MAVEN_OPTS} --add-opens=java.desktop/com.sun.imageio.plugins.png=ALL-UNNAMED"
export MAVEN_OPTS
export PATH="/tools/apache-maven-3.6.3/bin:${JAVA_HOME}/bin:/tools/node-v12/bin:${PATH}"
if [ -n "${GITHUB_SSH_KEY}" ] ; then
Expand Down
6 changes: 3 additions & 3 deletions examples/employee-app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2019, 2020 Oracle and/or its affiliates.
# Copyright (c) 2019, 2021 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
#

# 1st stage, build the app
FROM maven:3.6-jdk-11 as build
FROM maven:3.6.3-openjdk-17-slim as build

WORKDIR /helidon

Expand All @@ -33,7 +33,7 @@ RUN mvn package -DskipTests
RUN echo "done!"

# 2nd stage, build the runtime image
FROM openjdk:11-jre-slim
FROM openjdk:17-jdk-slim
WORKDIR /helidon

# Copy the binary built in the 1st stage
Expand Down
6 changes: 3 additions & 3 deletions examples/grpc/opentracing/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2018, 2020 Oracle and/or its affiliates.
# Copyright (c) 2018, 2021 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
#

# 1st stage, build the app
FROM maven:3.6-jdk-11 as build
FROM maven:3.6.3-openjdk-17-slim as build

WORKDIR /helidon

Expand All @@ -38,7 +38,7 @@ RUN mvn -f opentracing/pom.xml package -DskipTests
RUN echo "done!"

# 2nd stage, build the runtime image
FROM openjdk:11-jre-slim
FROM openjdk:17-jdk-slim
WORKDIR /helidon

# Copy the binary built in the 1st stage
Expand Down
4 changes: 2 additions & 2 deletions examples/integrations/cdi/datasource-hikaricp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#

# 1st stage, build the app
FROM maven:3.6-jdk-11 as build
FROM maven:3.6.3-openjdk-17-slim as build

WORKDIR /helidon

Expand All @@ -32,7 +32,7 @@ RUN mvn package -DskipTests
RUN echo "done!"

# 2nd stage, build the runtime image
FROM openjdk:11-jre-slim
FROM openjdk:17-jdk-slim
WORKDIR /helidon

# Copy the binary built in the 1st stage
Expand Down
6 changes: 3 additions & 3 deletions examples/integrations/cdi/jedis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2018, 2020 Oracle and/or its affiliates.
# Copyright (c) 2018, 2021 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
#

# 1st stage, build the app
FROM maven:3.6-jdk-11 as build
FROM maven:3.6.3-openjdk-17-slim as build

WORKDIR /helidon

Expand All @@ -32,7 +32,7 @@ RUN mvn package -DskipTests
RUN echo "done!"

# 2nd stage, build the runtime image
FROM openjdk:11-jre-slim
FROM openjdk:17-jdk-slim
WORKDIR /helidon

# Copy the binary built in the 1st stage
Expand Down
6 changes: 3 additions & 3 deletions examples/integrations/cdi/oci-objectstorage/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2018, 2020 Oracle and/or its affiliates.
# Copyright (c) 2018, 2021 Oracle and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -15,7 +15,7 @@
#

# 1st stage, build the app
FROM maven:3.6-jdk-11 as build
FROM maven:3.6.3-openjdk-17-slim as build

WORKDIR /helidon

Expand All @@ -32,7 +32,7 @@ RUN mvn package -DskipTests
RUN echo "done!"

# 2nd stage, build the runtime image
FROM openjdk:11-jre-slim
FROM openjdk:17-jdk-slim
WORKDIR /helidon

# Copy the binary built in the 1st stage
Expand Down
Loading

0 comments on commit bf9fe2f

Please sign in to comment.