Skip to content

Commit aee6f46

Browse files
authored
Add the JDK 25 support (#783)
1 parent 92292a5 commit aee6f46

File tree

10 files changed

+111
-5
lines changed

10 files changed

+111
-5
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
FROM tomcat:10.1.50-jdk25-temurin
18+
19+
RUN apt-get update \
20+
&& apt-get install -y --no-install-recommends curl \
21+
&& rm -rf /var/lib/apt/lists/*

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
include:
5353
- os: ubuntu
5454
java-version: 21
55+
- os: ubuntu
56+
java-version: 25
5557
steps:
5658
- if: matrix.os == 'windows'
5759
name: Support longpaths
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
name: Test
18+
19+
on:
20+
pull_request:
21+
paths:
22+
- '.github/workflows/plugins-*.yaml'
23+
- 'apm-application-toolkit/**'
24+
- 'apm-commons/**'
25+
- 'apm-protocol/**'
26+
- 'apm-sniffer/**'
27+
- 'test/plugin/**'
28+
- '**/pom.xml'
29+
- '!**.md'
30+
31+
concurrency:
32+
group: plugins-jdk25-1-${{ github.event.pull_request.number || github.ref }}
33+
cancel-in-progress: true
34+
35+
jobs:
36+
build:
37+
name: Build
38+
runs-on: ubuntu-latest
39+
timeout-minutes: 30
40+
steps:
41+
- uses: actions/checkout@v2
42+
with:
43+
submodules: true
44+
- name: Build local tomcat-curl image
45+
run: |
46+
docker build -t tomcat-curl:10.1.50-jdk25-temurin \
47+
-f ./.github/workflows/Dockerfile-tomcat-jdk25-withCurl .
48+
- name: Build
49+
uses: ./.github/actions/build
50+
with:
51+
base_image_java: eclipse-temurin:25-jdk
52+
base_image_tomcat: tomcat-curl:10.1.50-jdk25-temurin
53+
54+
test:
55+
needs: [ build ]
56+
name: ${{ matrix.case }}-jdk25
57+
runs-on: ubuntu-latest
58+
timeout-minutes: 90
59+
strategy:
60+
matrix:
61+
case:
62+
- spring-6.x-scenario
63+
steps:
64+
- uses: actions/checkout@v2
65+
with:
66+
submodules: true
67+
- uses: actions/setup-java@v2
68+
with:
69+
distribution: 'temurin'
70+
java-version: '25'
71+
- name: Run Test
72+
uses: ./.github/actions/run
73+
with:
74+
test_case: ${{ matrix.case }}

.github/workflows/publish-docker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
timeout-minutes: 60
6565
strategy:
6666
matrix:
67-
java-version: [ 8, 11, 17, 21 ]
67+
java-version: [ 8, 11, 17, 21, 25 ]
6868
env:
6969
TAG: ${{ github.sha }}
7070
steps:

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Release Notes.
2424
* Upgrade kafka-clients version in optional-reporter-plugins to 3.9.1.
2525
* Fix AbstractLogger replaceParam when the replaced string contains a replacement marker.
2626
* Fix `JDBCPluginConfig.Plugin.JDBC.SQL_BODY_MAX_LENGTH` was not working in some plugins.
27+
* Bump up Lombok to v1.18.42 to adopt JDK25 compiling.
28+
* Add `eclipse-temurin:25-jre` as another base image.
29+
* Add JDK25 plugin tests for Spring 6.
2730

2831
All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/242?closed=1)
2932

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@ dist: build
3434

3535
# Docker build
3636

37-
base.all := alpine java8 java11 java17 java21
37+
base.all := alpine java8 java11 java17 java21 java25
3838
base.each = $(word 1, $@)
3939

4040
base.image.alpine := alpine:3
4141
base.image.java8 := eclipse-temurin:8-jre
4242
base.image.java11 := eclipse-temurin:11-jre
4343
base.image.java17 := eclipse-temurin:17-jre
4444
base.image.java21 := eclipse-temurin:21-jre
45+
base.image.java25 := eclipse-temurin:25-jre
4546

4647
docker.%: PLATFORMS =
4748
docker.%: LOAD_OR_PUSH = --load

docs/en/contribution/compiling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Compiling project
22
This document will help you compile and build a project in your maven and set your IDE.
33

4-
Prepare JDK 17 or 21.
4+
Prepare JDK 17, 21 or 25.
55

66
* If you clone codes from https://github.com/apache/skywalking-java
77
```shell

docs/en/setup/service-agent/java-agent/Plugin-test.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ The test case project must be packaged as `project-name.war` by using `mvn packa
3838
Take the following test project as an example
3939
* [spring-4.3.x-scenario](../../../../../test/plugin/scenarios/spring-4.3.x-scenario)
4040

41+
Note on `tomcat:10.1.50-jdk25-temurin` image:
42+
43+
Starting from JDK 22, the Tomcat community removed `curl` from the official Tomcat JDK images. Since `curl` is required by our plugin test framework, we provide a custom `tomcat-jdk25` image built with `curl` installed.
44+
You can refer to the [tomcat-jdk25-dockerFile](../../../../../.github/workflows/Dockerfile-tomcat-jdk25-withCurl) to build the image for local plugin tests.
4145

4246
## Test project hierarchical structure
4347
The test case is an independent maven project, and it must be packaged as a war tar ball or zip file, depending on the chosen base image. Also, two external accessible endpoints usually two URLs) are required.
@@ -682,6 +686,7 @@ You can run `python3 tools/select-group.py` to see which file contains the least
682686

683687
If a test case required to run in JDK 17 environment, please add you test case into file `plugins-jdk17-test.<n>.yaml`.
684688
If a test case required to run in JDK 21 environment, please add you test case into file `plugins-jdk21-test.<n>.yaml`.
689+
If a test case required to run in JDK 25 environment, please add you test case into file `plugins-jdk25-test.<n>.yaml`.
685690

686691
```yaml
687692
jobs:

docs/en/setup/service-agent/java-agent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Setup java agent
22

3-
1. Agent is available for JDK 8 - 21.
3+
1. Agent is available for JDK 8 - 25.
44
1. Find `agent` folder in SkyWalking release package
55
1. Set `agent.service_name` in `config/agent.config`. Could be any String in English.
66
1. Set `collector.backend_service` in `config/agent.config`. Default point to `127.0.0.1:11800`, only works for local

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
<junit.version>4.12</junit.version>
8787
<mockito-core.version>5.0.0</mockito-core.version>
8888
<system-stubs-junit4.version>2.0.2</system-stubs-junit4.version>
89-
<lombok.version>1.18.30</lombok.version>
89+
<lombok.version>1.18.42</lombok.version>
9090

9191
<!-- core lib dependency -->
9292
<bytebuddy.version>1.17.6</bytebuddy.version>

0 commit comments

Comments
 (0)