Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support packaging the project in JDK21 #11528

Merged
merged 3 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/skywalking.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ jobs:
include:
- os: ubuntu
java-version: 17
- os: ubuntu
java-version: 21
steps:
- uses: actions/checkout@v3
with:
Expand Down
1 change: 1 addition & 0 deletions docs/en/changes/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Bump Java agent to 9.1-dev in the e2e tests.
* Bump up netty to 4.1.100.
* Update Groovy 3 to 4.0.15.
* Support packaging the project in JDK21. Compiler source and target remain in JDK11.

#### OAP Server

Expand Down
2 changes: 1 addition & 1 deletion docs/en/guides/How-to-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ If you need to execute build behind the proxy, edit the *.mvn/jvm.config* and se
```

### Building from GitHub
1. Prepare git, JDK11+, and Maven 3.6+.
1. Prepare git, JDK 11 or 17 (LTS versions), and Maven 3.6+.
1. Clone the project.

If you want to build a release from source codes, set a `tag name` by using `git clone -b [tag_name] ...` while cloning.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/setup/backend/backend-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SkyWalking's backend distribution package consists of the following parts:

## Requirements and default settings

Requirement: **JDK11 to JDK17 are tested**. Other versions are not tested and may or may not work.
Requirement: **JDK11 or JDK17**.

Before you begin, you should understand that the main purpose of the following quickstart is to help you obtain a basic configuration for previews/demos. Performance and long-term running are **NOT** among the purposes of the quickstart.

Expand Down
39 changes: 36 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,14 @@
<!-- `project.build.outputTimestamp` is required for reproducible builds: https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
<project.build.outputTimestamp>1693572743</project.build.outputTimestamp>

<!-- Compiling and test stages tools. -->
<powermock.version>2.0.9</powermock.version>
<checkstyle.version>6.18</checkstyle.version>
<junit.version>5.9.2</junit.version>
<mockito-core.version>4.11.0</mockito-core.version>
<lombok.version>1.18.22</lombok.version>
<system-stubs.version>2.1.4</system-stubs.version>
<lombok.version>1.18.30</lombok.version>
<byte-buddy.version>1.14.9</byte-buddy.version>

<!-- core lib dependency -->
<grpc.version>1.53.0</grpc.version>
Expand Down Expand Up @@ -194,8 +197,6 @@
<skipUTs>false</skipUTs>
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>

<system-stubs.version>2.0.2</system-stubs.version>

<delombok.output.dir>${project.build.directory}/delombok</delombok.output.dir>
</properties>

Expand Down Expand Up @@ -284,6 +285,28 @@
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito-core.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
</exclusion>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>${byte-buddy.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>${byte-buddy.version}</version>
<scope>test</scope>
Comment on lines +299 to +309
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

byte-buddy.version=1.14.9 is the key to support JRE21, as mockito and system-stubs-jupiter are using the agent mechanism for the test mock.

</dependency>

<dependency>
Expand All @@ -303,6 +326,16 @@
<artifactId>system-stubs-jupiter</artifactId>
<version>${system-stubs.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
</exclusion>
<exclusion>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down