From c4721346ed42ce9c15b9ddd532bdb0a17a4f8b4d Mon Sep 17 00:00:00 2001 From: Lari Hotari Date: Mon, 24 Jun 2024 14:37:28 +0300 Subject: [PATCH 1/3] Require Java 17 or Java 21 for building Bookkeeper --- .github/workflows/bk-ci.yml | 16 ++--- .github/workflows/bk-streamstorage-python.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/website-deploy.yaml | 2 +- .github/workflows/website-pr-validation.yml | 2 +- circe-checksum/pom.xml | 34 +++++++++ cpu-affinity/pom.xml | 34 +++++++++ pom.xml | 69 +++++++++++++------ 8 files changed, 127 insertions(+), 34 deletions(-) diff --git a/.github/workflows/bk-ci.yml b/.github/workflows/bk-ci.yml index 1f6ffd652ec..b4572e4b820 100644 --- a/.github/workflows/bk-ci.yml +++ b/.github/workflows/bk-ci.yml @@ -78,7 +78,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 11 + java-version: 17 - name: Validate pull request if: steps.check_changes.outputs.docs_only != 'true' @@ -156,7 +156,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 11 + java-version: 17 - name: Build run: | @@ -230,7 +230,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 11 + java-version: 17 - name: Pick ubuntu mirror for the docker image build run: | @@ -315,7 +315,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 8 + java-version: 17 - name: Pick ubuntu mirror for the docker image build run: | @@ -397,7 +397,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 11 + java-version: 17 - name: mvn package run: mvn -B -nsu clean package -DskipTests @@ -429,7 +429,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 11 + java-version: 17 - name: mvn package run: mvn -B -nsu clean package -DskipTests @@ -444,10 +444,6 @@ jobs: fail-fast: false matrix: include: - - step_name: Compatibility Check Java8 - jdk_version: 8 - - step_name: Compatibility Check Java11 - jdk_version: 11 - step_name: Compatibility Check Java17 jdk_version: 17 - step_name: Compatibility Check Java21 diff --git a/.github/workflows/bk-streamstorage-python.yml b/.github/workflows/bk-streamstorage-python.yml index 71dbe610452..d53b730b07c 100644 --- a/.github/workflows/bk-streamstorage-python.yml +++ b/.github/workflows/bk-streamstorage-python.yml @@ -70,7 +70,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 11 + java-version: 17 - name: Build run: mvn -q -T 1C -B -nsu clean install -DskipTests -Dcheckstyle.skip -Dspotbugs.skip -Drat.skip -Dmaven.javadoc.skip - name: Pick ubuntu mirror for the docker image build diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e838fccc36e..76443f9e740 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -83,7 +83,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 11 + java-version: 17 - name: Validate pull request if: steps.check_changes.outputs.docs_only != 'true' diff --git a/.github/workflows/website-deploy.yaml b/.github/workflows/website-deploy.yaml index 868b1db0c7b..253ff26647a 100644 --- a/.github/workflows/website-deploy.yaml +++ b/.github/workflows/website-deploy.yaml @@ -44,7 +44,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 11 + java-version: 17 - name: Setup NodeJS diff --git a/.github/workflows/website-pr-validation.yml b/.github/workflows/website-pr-validation.yml index 9d38cb59f28..5ffa667582c 100644 --- a/.github/workflows/website-pr-validation.yml +++ b/.github/workflows/website-pr-validation.yml @@ -41,7 +41,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: 11 + java-version: 17 - name: Setup NodeJS diff --git a/circe-checksum/pom.xml b/circe-checksum/pom.xml index 9f9ca5f0c6f..5997c02580a 100644 --- a/circe-checksum/pom.xml +++ b/circe-checksum/pom.xml @@ -63,6 +63,10 @@ org.apache.maven.plugins maven-compiler-plugin + + + 8 + com.github.maven-nar @@ -111,6 +115,36 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + ${maven-enforcer-plugin.version} + + + enforce-bytecode-version + + enforce + + + + + 8 + + test + + + + + + + + + org.codehaus.mojo + extra-enforcer-rules + ${extra-enforcer-rules.version} + + + diff --git a/cpu-affinity/pom.xml b/cpu-affinity/pom.xml index 5ba9bc95de5..c77347376da 100644 --- a/cpu-affinity/pom.xml +++ b/cpu-affinity/pom.xml @@ -48,6 +48,10 @@ org.apache.maven.plugins maven-compiler-plugin + + + 8 + com.github.maven-nar @@ -87,6 +91,36 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + ${maven-enforcer-plugin.version} + + + enforce-bytecode-version + + enforce + + + + + 8 + + test + + + + + + + + + org.codehaus.mojo + extra-enforcer-rules + ${extra-enforcer-rules.version} + + + diff --git a/pom.xml b/pom.xml index 1651bfcac71..83ee1c64c97 100644 --- a/pom.xml +++ b/pom.xml @@ -191,6 +191,8 @@ 3.3.1 3.12.1 3.2.5 + 3.5.0 + 1.8.0 9.2.0 3.10.1 1.4.1.Final @@ -883,6 +885,28 @@ + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + 17 + UTF-8 + true + true + + + org.projectlombok + lombok + ${lombok.version} + + + + -parameters + + + org.apache.maven.plugins maven-checkstyle-plugin @@ -940,6 +964,31 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + ${maven-enforcer-plugin.version} + + + enforce-maven + + enforce + + + + + [17,18),[21,22) + Java 17 or Java 21 is required to build Bookkeeper. + + + 3.6.1 + Maven 3.6.1 or newer is required to build Bookkeeper. + + + + + + com.github.spotbugs spotbugs-maven-plugin @@ -948,26 +997,6 @@ ${session.executionRootDirectory}/buildtools/src/main/resources/bookkeeper/findbugsExclude.xml - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - UTF-8 - true - true - - - org.projectlombok - lombok - ${lombok.version} - - - - -parameters - - - org.apache.maven.plugins maven-surefire-plugin From 667f909e2ce0df15db489dfd6ba03a61b0cb18f7 Mon Sep 17 00:00:00 2001 From: Lari Hotari Date: Thu, 16 May 2024 14:14:02 +0300 Subject: [PATCH 2/3] Upgrade to Jetty 12 --- bookkeeper-http/servlet-http-server/pom.xml | 4 ++-- .../http/servlet/JettyHttpServer.java | 4 ++-- pom.xml | 17 ++++++++--------- .../prometheus-metrics-provider/pom.xml | 8 ++++---- .../prometheus/PrometheusMetricsProvider.java | 5 +++-- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/bookkeeper-http/servlet-http-server/pom.xml b/bookkeeper-http/servlet-http-server/pom.xml index 44cecbd2453..15fa7112878 100644 --- a/bookkeeper-http/servlet-http-server/pom.xml +++ b/bookkeeper-http/servlet-http-server/pom.xml @@ -48,8 +48,8 @@ test - org.eclipse.jetty - jetty-webapp + org.eclipse.jetty.ee8 + jetty-ee8-webapp test diff --git a/bookkeeper-http/servlet-http-server/src/test/java/org/apache/bookkeeper/http/servlet/JettyHttpServer.java b/bookkeeper-http/servlet-http-server/src/test/java/org/apache/bookkeeper/http/servlet/JettyHttpServer.java index 5eb32a196e5..d4adbc69e18 100644 --- a/bookkeeper-http/servlet-http-server/src/test/java/org/apache/bookkeeper/http/servlet/JettyHttpServer.java +++ b/bookkeeper-http/servlet-http-server/src/test/java/org/apache/bookkeeper/http/servlet/JettyHttpServer.java @@ -27,10 +27,10 @@ import java.nio.file.Files; import java.util.List; import javax.servlet.Servlet; +import org.eclipse.jetty.ee8.servlet.ServletHolder; +import org.eclipse.jetty.ee8.webapp.WebAppContext; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.ContextHandlerCollection; -import org.eclipse.jetty.servlet.ServletHolder; -import org.eclipse.jetty.webapp.WebAppContext; /** * Jetty based http server. diff --git a/pom.xml b/pom.xml index 83ee1c64c97..ba93c88beed 100644 --- a/pom.xml +++ b/pom.xml @@ -143,7 +143,7 @@ 2.1.10 2.17.1 1.82 - 9.4.53.v20231009 + 12.0.10 1.37 2.8.2 4.13.2 @@ -570,18 +570,17 @@ org.eclipse.jetty - jetty-server - ${jetty.version} - - - org.eclipse.jetty - jetty-webapp + jetty-bom ${jetty.version} + pom + import - org.eclipse.jetty - jetty-servlet + org.eclipse.jetty.ee8 + jetty-ee8 ${jetty.version} + pom + import diff --git a/stats/bookkeeper-stats-providers/prometheus-metrics-provider/pom.xml b/stats/bookkeeper-stats-providers/prometheus-metrics-provider/pom.xml index b5e9635b45a..0adbe62a335 100644 --- a/stats/bookkeeper-stats-providers/prometheus-metrics-provider/pom.xml +++ b/stats/bookkeeper-stats-providers/prometheus-metrics-provider/pom.xml @@ -46,7 +46,7 @@ io.prometheus simpleclient_servlet - + io.netty netty-common @@ -57,15 +57,15 @@ test - org.eclipse.jetty - jetty-servlet + org.eclipse.jetty.ee8 + jetty-ee8-servlet com.google.guava guava - + com.yahoo.datasketches sketches-core diff --git a/stats/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/prometheus/PrometheusMetricsProvider.java b/stats/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/prometheus/PrometheusMetricsProvider.java index 046fdde11a4..8cb66270d89 100644 --- a/stats/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/prometheus/PrometheusMetricsProvider.java +++ b/stats/bookkeeper-stats-providers/prometheus-metrics-provider/src/main/java/org/apache/bookkeeper/stats/prometheus/PrometheusMetricsProvider.java @@ -17,6 +17,7 @@ package org.apache.bookkeeper.stats.prometheus; // CHECKSTYLE.OFF: IllegalImport + import com.google.common.annotations.VisibleForTesting; import io.netty.util.concurrent.DefaultThreadFactory; import io.netty.util.internal.PlatformDependent; @@ -49,9 +50,9 @@ import org.apache.bookkeeper.stats.ThreadRegistry; import org.apache.commons.configuration.Configuration; import org.apache.commons.lang.StringUtils; +import org.eclipse.jetty.ee8.servlet.ServletContextHandler; +import org.eclipse.jetty.ee8.servlet.ServletHolder; import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.servlet.ServletContextHandler; -import org.eclipse.jetty.servlet.ServletHolder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; // CHECKSTYLE.ON: IllegalImport From 553e6fa26f70f1b832a636c52705d585c1795816 Mon Sep 17 00:00:00 2001 From: Lari Hotari Date: Mon, 24 Jun 2024 16:53:15 +0300 Subject: [PATCH 3/3] Update license and notice files --- .../src/main/resources/LICENSE-all.bin.txt | 17 ++++++++++------- .../src/main/resources/LICENSE-server.bin.txt | 17 ++++++++++------- .../src/main/resources/NOTICE-all.bin.txt | 18 ++++++++++-------- .../src/main/resources/NOTICE-server.bin.txt | 18 ++++++++++-------- 4 files changed, 40 insertions(+), 30 deletions(-) diff --git a/bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt b/bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt index 64ebd7c5bdc..f4a88a63112 100644 --- a/bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt +++ b/bookkeeper-dist/src/main/resources/LICENSE-all.bin.txt @@ -264,13 +264,16 @@ Apache Software License, Version 2. - lib/org.apache.zookeeper-zookeeper-3.8.4.jar [21] - lib/org.apache.zookeeper-zookeeper-jute-3.8.4.jar [21] - lib/org.apache.zookeeper-zookeeper-3.8.4-tests.jar [21] -- lib/org.eclipse.jetty-jetty-http-9.4.53.v20231009.jar [22] -- lib/org.eclipse.jetty-jetty-io-9.4.53.v20231009.jar [22] -- lib/org.eclipse.jetty-jetty-security-9.4.53.v20231009.jar [22] -- lib/org.eclipse.jetty-jetty-server-9.4.53.v20231009.jar [22] -- lib/org.eclipse.jetty-jetty-servlet-9.4.53.v20231009.jar [22] -- lib/org.eclipse.jetty-jetty-util-9.4.53.v20231009.jar [22] -- lib/org.eclipse.jetty-jetty-util-ajax-9.4.53.v20231009.jar [22] +- lib/org.eclipse.jetty-jetty-http-12.0.10.jar [22] +- lib/org.eclipse.jetty-jetty-io-12.0.10.jar [22] +- lib/org.eclipse.jetty-jetty-security-12.0.10.jar [22] +- lib/org.eclipse.jetty-jetty-server-12.0.10.jar [22] +- lib/org.eclipse.jetty-jetty-session-12.0.10.jar [22] +- lib/org.eclipse.jetty-jetty-util-12.0.10.jar [22] +- lib/org.eclipse.jetty.ee8-jetty-ee8-nested-12.0.10.jar [22] +- lib/org.eclipse.jetty.ee8-jetty-ee8-security-12.0.10.jar [22] +- lib/org.eclipse.jetty.ee8-jetty-ee8-servlet-12.0.10.jar [22] +- lib/org.eclipse.jetty.toolchain-jetty-servlet-api-4.0.6.jar [22] - lib/org.rocksdb-rocksdbjni-7.10.2.jar [23] - lib/com.beust-jcommander-1.82.jar [24] - lib/com.yahoo.datasketches-memory-0.8.3.jar [25] diff --git a/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt b/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt index 0e3f88702a2..807737ebfa6 100644 --- a/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt +++ b/bookkeeper-dist/src/main/resources/LICENSE-server.bin.txt @@ -264,13 +264,16 @@ Apache Software License, Version 2. - lib/org.apache.zookeeper-zookeeper-3.8.4.jar [21] - lib/org.apache.zookeeper-zookeeper-jute-3.8.4.jar [21] - lib/org.apache.zookeeper-zookeeper-3.8.4-tests.jar [21] -- lib/org.eclipse.jetty-jetty-http-9.4.53.v20231009.jar [22] -- lib/org.eclipse.jetty-jetty-io-9.4.53.v20231009.jar [22] -- lib/org.eclipse.jetty-jetty-security-9.4.53.v20231009.jar [22] -- lib/org.eclipse.jetty-jetty-server-9.4.53.v20231009.jar [22] -- lib/org.eclipse.jetty-jetty-servlet-9.4.53.v20231009.jar [22] -- lib/org.eclipse.jetty-jetty-util-9.4.53.v20231009.jar [22] -- lib/org.eclipse.jetty-jetty-util-ajax-9.4.53.v20231009.jar [22] +- lib/org.eclipse.jetty-jetty-http-12.0.10.jar [22] +- lib/org.eclipse.jetty-jetty-io-12.0.10.jar [22] +- lib/org.eclipse.jetty-jetty-security-12.0.10.jar [22] +- lib/org.eclipse.jetty-jetty-server-12.0.10.jar [22] +- lib/org.eclipse.jetty-jetty-session-12.0.10.jar [22] +- lib/org.eclipse.jetty-jetty-util-12.0.10.jar [22] +- lib/org.eclipse.jetty.ee8-jetty-ee8-nested-12.0.10.jar [22] +- lib/org.eclipse.jetty.ee8-jetty-ee8-security-12.0.10.jar [22] +- lib/org.eclipse.jetty.ee8-jetty-ee8-servlet-12.0.10.jar [22] +- lib/org.eclipse.jetty.toolchain-jetty-servlet-api-4.0.6.jar [22] - lib/org.rocksdb-rocksdbjni-7.10.2.jar [23] - lib/com.beust-jcommander-1.82.jar [24] - lib/com.yahoo.datasketches-memory-0.8.3.jar [25] diff --git a/bookkeeper-dist/src/main/resources/NOTICE-all.bin.txt b/bookkeeper-dist/src/main/resources/NOTICE-all.bin.txt index 53b7942b544..28f0eb14453 100644 --- a/bookkeeper-dist/src/main/resources/NOTICE-all.bin.txt +++ b/bookkeeper-dist/src/main/resources/NOTICE-all.bin.txt @@ -93,13 +93,15 @@ SoundCloud Ltd. (http://soundcloud.com/). This product includes software developed as part of the Ocelli project by Netflix Inc. (https://github.com/Netflix/ocelli/). ------------------------------------------------------------------------------------ -- lib/org.eclipse.jetty-jetty-http-9.4.53.v20231009.jar -- lib/org.eclipse.jetty-jetty-io-9.4.53.v20231009.jar -- lib/org.eclipse.jetty-jetty-security-9.4.53.v20231009.jar -- lib/org.eclipse.jetty-jetty-server-9.4.53.v20231009.jar -- lib/org.eclipse.jetty-jetty-servlet-9.4.53.v20231009.jar -- lib/org.eclipse.jetty-jetty-util-9.4.53.v20231009.jar -- lib/org.eclipse.jetty-jetty-util-ajax-9.4.53.v20231009.jar +- lib/org.eclipse.jetty-jetty-http-12.0.10.jar +- lib/org.eclipse.jetty-jetty-io-12.0.10.jar +- lib/org.eclipse.jetty-jetty-security-12.0.10.jar +- lib/org.eclipse.jetty-jetty-server-12.0.10.jar +- lib/org.eclipse.jetty-jetty-session-12.0.10.jar +- lib/org.eclipse.jetty.ee8-jetty-ee8-nested-12.0.10.jar +- lib/org.eclipse.jetty.ee8-jetty-ee8-security-12.0.10.jar +- lib/org.eclipse.jetty.ee8-jetty-ee8-servlet-12.0.10.jar +- lib/org.eclipse.jetty.toolchain-jetty-servlet-api-4.0.6.jar ============================================================== Jetty Web Container @@ -121,7 +123,7 @@ Jetty is dual licensed under both Jetty may be distributed under either license. -lib/org.eclipse.jetty-jetty-util-9.4.53.v20231009.jar bundles UnixCrypt +lib/org.eclipse.jetty-jetty-util-12.0.10.jar bundles UnixCrypt The UnixCrypt.java code implements the one way cryptography used by Unix systems for simple password protection. Copyright 1996 Aki Yoshida, diff --git a/bookkeeper-dist/src/main/resources/NOTICE-server.bin.txt b/bookkeeper-dist/src/main/resources/NOTICE-server.bin.txt index b9d15c993fd..9a060bfde01 100644 --- a/bookkeeper-dist/src/main/resources/NOTICE-server.bin.txt +++ b/bookkeeper-dist/src/main/resources/NOTICE-server.bin.txt @@ -75,13 +75,15 @@ SoundCloud Ltd. (http://soundcloud.com/). This product includes software developed as part of the Ocelli project by Netflix Inc. (https://github.com/Netflix/ocelli/). ------------------------------------------------------------------------------------ -- lib/org.eclipse.jetty-jetty-http-9.4.53.v20231009.jar -- lib/org.eclipse.jetty-jetty-io-9.4.53.v20231009.jar -- lib/org.eclipse.jetty-jetty-security-9.4.53.v20231009.jar -- lib/org.eclipse.jetty-jetty-server-9.4.53.v20231009.jar -- lib/org.eclipse.jetty-jetty-servlet-9.4.53.v20231009.jar -- lib/org.eclipse.jetty-jetty-util-9.4.53.v20231009.jar -- lib/org.eclipse.jetty-jetty-util-ajax-9.4.53.v20231009.jar +- lib/org.eclipse.jetty-jetty-http-12.0.10.jar +- lib/org.eclipse.jetty-jetty-io-12.0.10.jar +- lib/org.eclipse.jetty-jetty-security-12.0.10.jar +- lib/org.eclipse.jetty-jetty-server-12.0.10.jar +- lib/org.eclipse.jetty-jetty-session-12.0.10.jar +- lib/org.eclipse.jetty.ee8-jetty-ee8-nested-12.0.10.jar +- lib/org.eclipse.jetty.ee8-jetty-ee8-security-12.0.10.jar +- lib/org.eclipse.jetty.ee8-jetty-ee8-servlet-12.0.10.jar +- lib/org.eclipse.jetty.toolchain-jetty-servlet-api-4.0.6.jar ============================================================== Jetty Web Container @@ -103,7 +105,7 @@ Jetty is dual licensed under both Jetty may be distributed under either license. -lib/org.eclipse.jetty-jetty-util-9.4.53.v20231009.jar bundles UnixCrypt +lib/org.eclipse.jetty-jetty-util-12.0.10.jar bundles UnixCrypt The UnixCrypt.java code implements the one way cryptography used by Unix systems for simple password protection. Copyright 1996 Aki Yoshida,