Skip to content

Commit

Permalink
Changes necessary to compile M2 with JDK20.
Browse files Browse the repository at this point in the history
Signed-off-by: Santiago Pericasgeertsen <[email protected]>
  • Loading branch information
spericas committed Oct 5, 2023
1 parent b636dde commit 41dab86
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 15 deletions.
4 changes: 2 additions & 2 deletions applications/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.source>20</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.11.0</version.plugin.compiler>
Expand Down Expand Up @@ -68,7 +68,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${version.plugin.compiler}</version>
<configuration>
<proc>full</proc>
<!-- proc>full</proc -->
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# 1st stage, build the app
FROM container-registry.oracle.com/java/openjdk:21 as build
FROM container-registry.oracle.com/java/openjdk:20 as build

# Install maven
WORKDIR /usr/share
Expand Down Expand Up @@ -31,7 +31,7 @@ RUN mvn package -DskipTests
RUN echo "done!"

# 2nd stage, build the runtime image
FROM container-registry.oracle.com/java/openjdk:21
FROM container-registry.oracle.com/java/openjdk:20
WORKDIR /helidon

# Copy the binary built in the 1st stage
Expand Down
1 change: 1 addition & 0 deletions common/configurable/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<compilerArgs>--enable-preview</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>io.helidon.config</groupId>
Expand Down
1 change: 1 addition & 0 deletions common/socket/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<compilerArgs>--enable-preview</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>io.helidon.config</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static JdbcConnectionPool create(Config config) {
if (poolProviders.isEmpty()) {
throw new DbClientException("No JDBC connection pool provider is available");
}
return poolProviders.getFirst().create(config, config.name());
return poolProviders.get(0).create(config, config.name());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#

# 1st stage, build the app
FROM container-registry.oracle.com/java/openjdk:21 as maven
FROM container-registry.oracle.com/java/openjdk:20 as maven

# Install maven
WORKDIR /usr/share
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<helidon.version>4.0.0-M2</helidon.version>
<mainClass>io.helidon.microprofile.cdi.Main</mainClass>

<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
<maven.site.skip>true</maven.site.skip>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#

# 1st stage, build the app
FROM container-registry.oracle.com/java/openjdk:21 as maven
FROM container-registry.oracle.com/java/openjdk:20 as maven

# Install maven
WORKDIR /usr/share
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<helidon.version>4.0.0-M2</helidon.version>
<mainClass>io.helidon.examples.quickstart.se.Main</mainClass>

<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.source>20</maven.compiler.source>
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
<maven.site.skip>true</maven.site.skip>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
1 change: 1 addition & 0 deletions integrations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-parameters</arg>
<arg>--enable-preview</arg>
</compilerArgs>
</configuration>
</plugin>
Expand Down
3 changes: 3 additions & 0 deletions lra/coordinator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
<name>Helidon LRA Coordinator Project</name>

<packaging>pom</packaging>
<properties>
<java.version>20</java.version>
</properties>

<modules>
<module>client</module>
Expand Down
4 changes: 2 additions & 2 deletions lra/coordinator/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

FROM container-registry.oracle.com/java/openjdk:21 as build
FROM container-registry.oracle.com/java/openjdk:20 as build

WORKDIR /usr/share

Expand All @@ -41,7 +41,7 @@ RUN wget -q -O helidon_repo.zip https://github.com/${HELIDON_REPOSITORY}/archive
RUN mvn install -pl :helidon-lra-coordinator-server -am -DskipTests && \
echo "Helidon LRA Coordinator build successfully finished"

FROM container-registry.oracle.com/java/openjdk:21
FROM container-registry.oracle.com/java/openjdk:20
WORKDIR /helidon

COPY --from=build /helidon/lra/coordinator/server/target/helidon-lra-coordinator-server.jar ./
Expand Down
9 changes: 5 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
<description>Java libraries for writing microservices</description>

<properties>
<version.java>21</version.java>
<version.java>20</version.java>

<doclint>all</doclint>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<surefire.argLine>-Xmx1024m -Dfile.encoding=UTF-8</surefire.argLine>
<failsafe.argLine>-Xmx1024m -Dfile.encoding=UTF-8</failsafe.argLine>
<surefire.argLine>-Xmx1024m -Dfile.encoding=UTF-8 --enable-preview</surefire.argLine>
<failsafe.argLine>-Xmx1024m -Dfile.encoding=UTF-8 --enable-preview</failsafe.argLine>
<surefire.coverage.argline />
<failsafe.coverage.argline />

Expand Down Expand Up @@ -232,13 +232,14 @@
<target>${version.java}</target>
<release>${version.java}</release>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<proc>full</proc>
<!-- proc>full</proc -->
<compilerArgs>
<arg>-Xlint:unchecked</arg>
<!--
https://issues.apache.org/jira/browse/MCOMPILER-368
-->
<arg>-Xpkginfo:always</arg>
<arg>--enable-preview</arg>
</compilerArgs>
</configuration>
<dependencies>
Expand Down
1 change: 1 addition & 0 deletions webclient/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>--enable-preview</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>io.helidon.common.features</groupId>
Expand Down
1 change: 1 addition & 0 deletions webserver/webserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>--enable-preview</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>io.helidon.common.features</groupId>
Expand Down

0 comments on commit 41dab86

Please sign in to comment.