Browse Source

Upgrade jdk for voovan and wicket to 25 (#9954)

* update wicket to jdk 25

* Update voovan jdk to 25

---------

Co-authored-by: jj <[email protected]>
ruroru 2 months ago
parent
commit
3aa401e4cc

+ 2 - 2
frameworks/Java/voovan/pom.xml

@@ -6,8 +6,8 @@
     <version>0.1</version>
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>11</maven.compiler.source>
-        <maven.compiler.target>11</maven.compiler.target>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
         <main.class>org.voovan.VoovanTFB</main.class>
     </properties>
     <dependencies>

+ 10 - 3
frameworks/Java/voovan/voovan.dockerfile

@@ -1,11 +1,11 @@
-FROM maven:3.6.1-jdk-11-slim as maven
+FROM maven:3-eclipse-temurin-24-alpine as maven
 WORKDIR /voovan
 COPY pom.xml pom.xml
 COPY src src
 COPY config/framework.properties config/framework.properties
 RUN mvn package -q
 
-FROM openjdk:11.0.3-jdk-slim
+FROM openjdk:25-ea-slim-bullseye
 WORKDIR /voovan
 COPY --from=maven /voovan/target/voovan-bench-0.1-jar-with-dependencies.jar app.jar
 COPY --from=maven /voovan/config/framework.properties config/framework.properties
@@ -24,5 +24,12 @@ CMD java -DCheckTimeout=false \
     -XX:+AlwaysPreTouch \
     -XX:-RestrictContended \
     -XX:+UseParallelGC -XX:+UseNUMA \
-    -XX:+AggressiveOpts -XX:+UseBiasedLocking \
+    --add-opens java.base/java.lang=ALL-UNNAMED \
+    --add-opens java.base/java.util=ALL-UNNAMED \
+    --add-opens java.base/java.io=ALL-UNNAMED \
+    --add-opens java.base/java.nio=ALL-UNNAMED \
+    --add-opens java.base/sun.nio.ch=ALL-UNNAMED \
+    --add-opens java.base/java.security=ALL-UNNAMED \
+    --add-opens java.base/java.util.concurrent=ALL-UNNAMED \
+    --add-opens java.base/java.net=ALL-UNNAMED \
     -cp ./config:voovan.jar:app.jar org.voovan.VoovanTFB

+ 120 - 120
frameworks/Java/wicket/pom.xml

@@ -1,128 +1,128 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>hellowicket</groupId>
-	<artifactId>hellowicket</artifactId>
-	<packaging>war</packaging>
-	<version>1.0</version>
-	<name>Hello Wicket</name>
-	<description>Wicket project for the TechEmpower Benchmark</description>
-	<organization>
-		<name>TechEmpower</name>
-		<url>https://github.com/TechEmpower/FrameworkBenchmarks</url>
-	</organization>
-	<licenses>
-		<license>
-			<name>The Apache Software License, Version 2.0</name>
-			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
-			<distribution>repo</distribution>
-		</license>
-	</licenses>
-	<properties>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>11</maven.compiler.source>
-		<maven.compiler.target>11</maven.compiler.target>
-		<jackson.version>2.13.0</jackson.version>
-		<slf4j.version>1.7.25</slf4j.version>
-		<wicket.version>9.19.0</wicket.version>
-	</properties>
-	<dependencies>
-		<!-- WICKET DEPENDENCIES -->
-		<dependency>
-			<groupId>org.apache.wicket</groupId>
-			<artifactId>wicket-core</artifactId>
-			<version>${wicket.version}</version>
-		</dependency>
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>hellowicket</groupId>
+    <artifactId>hellowicket</artifactId>
+    <packaging>war</packaging>
+    <version>1.0</version>
+    <name>Hello Wicket</name>
+    <description>Wicket project for the TechEmpower Benchmark</description>
+    <organization>
+        <name>TechEmpower</name>
+        <url>https://github.com/TechEmpower/FrameworkBenchmarks</url>
+    </organization>
+    <licenses>
+        <license>
+            <name>The Apache Software License, Version 2.0</name>
+            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+            <distribution>repo</distribution>
+        </license>
+    </licenses>
+    <properties>
+        <maven.compiler.source>17</maven.compiler.source>
+        <maven.compiler.target>17</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <jackson.version>2.13.0</jackson.version>
+        <slf4j.version>1.7.25</slf4j.version>
+        <wicket.version>9.19.0</wicket.version>
+    </properties>
+    <dependencies>
+        <!-- WICKET DEPENDENCIES -->
+        <dependency>
+            <groupId>org.apache.wicket</groupId>
+            <artifactId>wicket-core</artifactId>
+            <version>${wicket.version}</version>
+        </dependency>
 
-		<!-- a faster DataSource -->
-		<dependency>
-			<groupId>com.zaxxer</groupId>
-			<artifactId>HikariCP</artifactId>
-			<version>5.0.0</version>
-			<scope>compile</scope>
-		</dependency>
+        <!-- a faster DataSource -->
+        <dependency>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+            <version>5.0.0</version>
+            <scope>compile</scope>
+        </dependency>
 
-		<!-- LOGGING DEPENDENCIES - LOG4J -->
-		<dependency>
-			<groupId>org.slf4j</groupId>
-			<artifactId>slf4j-simple</artifactId>
-			<version>${slf4j.version}</version>
-		</dependency>
+        <!-- LOGGING DEPENDENCIES - LOG4J -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
 
-		<dependency>
-			<groupId>com.fasterxml.jackson.module</groupId>
-			<artifactId>jackson-module-afterburner</artifactId>
-			<version>${jackson.version}</version>
-		</dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.module</groupId>
+            <artifactId>jackson-module-afterburner</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
 
-		<dependency>
-			<groupId>com.fasterxml.jackson.core</groupId>
-			<artifactId>jackson-annotations</artifactId>
-			<version>${jackson.version}</version>
-		</dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
 
-		<dependency>
-			<groupId>mysql</groupId>
-			<artifactId>mysql-connector-java</artifactId>
-			<version>8.0.28</version>
-		</dependency>
-	</dependencies>
-	<build>
-		<resources>
-			<resource>
-				<filtering>false</filtering>
-				<directory>src/main/resources</directory>
-			</resource>
-			<resource>
-				<filtering>false</filtering>
-				<directory>src/main/java</directory>
-				<includes>
-					<include>**</include>
-				</includes>
-				<excludes>
-					<exclude>**/*.java</exclude>
-				</excludes>
-			</resource>
-		</resources>
-		<testResources>
-			<testResource>
-				<filtering>false</filtering>
-				<directory>src/test/resources</directory>
-			</testResource>
-			<testResource>
-				<filtering>false</filtering>
-				<directory>src/test/java</directory>
-				<includes>
-					<include>**</include>
-				</includes>
-				<excludes>
-					<exclude>**/*.java</exclude>
-				</excludes>
-			</testResource>
-		</testResources>
-		<plugins>
-			<plugin>
-				<inherited>true</inherited>
-				<groupId>org.apache.maven.plugins</groupId>
-				<artifactId>maven-compiler-plugin</artifactId>
-				<version>3.8.1</version>
-				<configuration>
-					<debug>false</debug>
-				</configuration>
-			</plugin>
-		</plugins>
-	</build>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>8.0.28</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <resources>
+            <resource>
+                <filtering>false</filtering>
+                <directory>src/main/resources</directory>
+            </resource>
+            <resource>
+                <filtering>false</filtering>
+                <directory>src/main/java</directory>
+                <includes>
+                    <include>**</include>
+                </includes>
+                <excludes>
+                    <exclude>**/*.java</exclude>
+                </excludes>
+            </resource>
+        </resources>
+        <testResources>
+            <testResource>
+                <filtering>false</filtering>
+                <directory>src/test/resources</directory>
+            </testResource>
+            <testResource>
+                <filtering>false</filtering>
+                <directory>src/test/java</directory>
+                <includes>
+                    <include>**</include>
+                </includes>
+                <excludes>
+                    <exclude>**/*.java</exclude>
+                </excludes>
+            </testResource>
+        </testResources>
+        <plugins>
+            <plugin>
+                <inherited>true</inherited>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.8.1</version>
+                <configuration>
+                    <debug>false</debug>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
-	<repositories>
-		<repository>
-			<id>Apache Nexus</id>
-			<url>https://repository.apache.org/content/repositories/snapshots/</url>
-			<releases>
-				<enabled>false</enabled>
-			</releases>
-			<snapshots>
-				<enabled>true</enabled>
-			</snapshots>
-		</repository>
-	</repositories>
+    <repositories>
+        <repository>
+            <id>Apache Nexus</id>
+            <url>https://repository.apache.org/content/repositories/snapshots/</url>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </repository>
+    </repositories>
 </project>

+ 4 - 4
frameworks/Java/wicket/resin.xml

@@ -2,12 +2,12 @@
        xmlns:resin="http://caucho.com/ns/resin/core">
 
     <cluster id="">
-        <resin:import path="/resin/conf/app-default.xml" />
-        
-        <log name="" level="config" path="stdout:" timestamp="[%H:%M:%S.%s] " />
+        <resin:import path="/resin/conf/app-default.xml"/>
+
+        <log name="" level="config" path="stdout:" timestamp="[%H:%M:%S.%s] "/>
 
         <server id="">
-            <http port="8080" />
+            <http port="8080"/>
         </server>
 
         <host>

+ 9 - 4
frameworks/Java/wicket/wicket.dockerfile

@@ -1,16 +1,21 @@
-FROM maven:3.6.1-jdk-11-slim as maven
+FROM maven:3-eclipse-temurin-24-alpine as maven
 WORKDIR /wicket
 COPY src src
 COPY pom.xml pom.xml
 RUN mvn compile war:war -q
 
-FROM openjdk:11.0.3-jdk-stretch
+FROM alpine/curl:8.1.2 as curl
+WORKDIR /wicket
+RUN curl -sL http://caucho.com/download/resin-4.0.61.tar.gz >resin.tar.gz
+
+FROM openjdk:25-ea-slim-bullseye
 WORKDIR /resin
-RUN curl -sL http://caucho.com/download/resin-4.0.61.tar.gz | tar xz --strip-components=1
+COPY --from=curl /wicket/resin.tar.gz .
+RUN tar xzf ./resin.tar.gz --strip-components=1
 RUN rm -rf webapps/*
 COPY --from=maven /wicket/target/hellowicket-1.0.war webapps/ROOT.war
 COPY resin.xml conf/resin.xml
 
 EXPOSE 8080
 
-CMD ["java", "-Xms2G", "-Xmx2G", "-server", "-XX:+UseNUMA", "-XX:+UseParallelGC", "-XX:+AggressiveOpts", "-jar", "lib/resin.jar", "console"]
+CMD ["java", "-Xms2G", "-Xmx2G", "-server", "-XX:+UseParallelGC", "-jar", "lib/resin.jar", "console"]