This is an automated email from the ASF dual-hosted git repository.
vavrtom pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git
The following commit(s) were added to refs/heads/main by this push:
new 58bf41cb90 QPID-8687: [Broker-J] Migrate build process to JDK 17 (#264)
58bf41cb90 is described below
commit 58bf41cb9019304fb01ab879a7a86deb815d6844
Author: Daniil Kirilyuk <[email protected]>
AuthorDate: Wed Mar 26 14:35:25 2025 +0100
QPID-8687: [Broker-J] Migrate build process to JDK 17 (#264)
---
.github/workflows/build.yml | 2 +-
appveyor.yml | 4 +++-
.../main/java/org/apache/qpid/server/model/Broker.java | 2 +-
.../access/firewall/HostnameFirewallRuleTest.java | 16 ++++++++++++----
broker-plugins/query-engine/pom.xml | 2 +-
.../src/main/markdown/build-instructions.md | 2 +-
doc/developer-guide/src/main/markdown/quick-start.md | 2 +-
.../src/main/markdown/release-instructions.md | 4 ++--
.../src/docbkx/Java-Broker-Appendix-Miscellaneous.xml | 10 +++++-----
.../src/docbkx/Java-Broker-Getting-Started.xml | 4 ++--
doc/java-broker/src/docbkx/Java-Broker-Installation.xml | 4 ++--
doc/java-broker/src/docbkx/Java-Broker-Introduction.xml | 2 +-
.../src/docbkx/runtime/Java-Broker-Runtime-Memory.xml | 2 +-
pom.xml | 2 +-
14 files changed, 34 insertions(+), 24 deletions(-)
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 4bb2158746..ee26315a93 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- java: [ 11, 17, 21 ]
+ java: [ 17, 21 ]
steps:
- uses: actions/checkout@v4
diff --git a/appveyor.yml b/appveyor.yml
index 124bc902c7..1425b411da 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,9 +1,11 @@
+image: Visual Studio 2022
+
version: '{build}'
skip_tags: true
clone_depth: 30
environment:
- JAVA_HOME: C:\Program Files\Java\jdk11
+ JAVA_HOME: C:\Program Files\Java\jdk17
install:
- ps: |
diff --git a/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
b/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
index 2e1e6df65d..5dfa59f8db 100644
--- a/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
+++ b/broker-core/src/main/java/org/apache/qpid/server/model/Broker.java
@@ -66,7 +66,7 @@ public interface Broker<X extends Broker<X>> extends
ConfiguredObject<X>, EventL
String BROKER_STATISTICS_REPORING_PERIOD =
"broker.statisticsReportingPeriod";
String NETWORK_BUFFER_SIZE = "qpid.broker.networkBufferSize";
- // network buffer should at least hold a SSL/TLS frame which in jdk 11 is
33305 bytes
+ // network buffer should at least hold a SSL/TLS frame which in jdk 17 is
33305 bytes
int MINIMUM_NETWORK_BUFFER_SIZE = 64 * 1024;
@ManagedContextDefault(name = NETWORK_BUFFER_SIZE)
int DEFAULT_NETWORK_BUFFER_SIZE = 256 * 1024;
diff --git
a/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/HostnameFirewallRuleTest.java
b/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/HostnameFirewallRuleTest.java
index bb3900c0be..e0a0db3db0 100644
---
a/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/HostnameFirewallRuleTest.java
+++
b/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/firewall/HostnameFirewallRuleTest.java
@@ -119,13 +119,21 @@ class HostnameFirewallRuleTest extends UnitTestBase
@Test
void managementConnectionPrincipals()
{
+ final InetAddress inetAddress = mock(InetAddress.class);
+ when(inetAddress.getCanonicalHostName()).thenReturn("127.0.0.1");
+ final InetSocketAddress inetSocketAddress =
mock(InetSocketAddress.class);
+ when(inetSocketAddress.getAddress()).thenReturn(inetAddress);
+
final ManagementConnectionPrincipal managementConnectionPrincipal =
mock(ManagementConnectionPrincipal.class);
- when(managementConnectionPrincipal.getRemoteAddress())
- .thenReturn(new InetSocketAddress("127.0.0.1", 8000));
+
when(managementConnectionPrincipal.getRemoteAddress()).thenReturn(inetSocketAddress);
+
+ final InetAddress invalidInetAddress = mock(InetAddress.class);
+
when(invalidInetAddress.getCanonicalHostName()).thenReturn("127.0.0.3");
+ final InetSocketAddress invalidInetSocketAddress =
mock(InetSocketAddress.class);
+
when(invalidInetSocketAddress.getAddress()).thenReturn(invalidInetAddress);
final ManagementConnectionPrincipal
invalidManagementConnectionPrincipal =
mock(ManagementConnectionPrincipal.class);
- when(invalidManagementConnectionPrincipal.getRemoteAddress())
- .thenReturn(new InetSocketAddress("127.0.0.3", 8000));
+
when(invalidManagementConnectionPrincipal.getRemoteAddress()).thenReturn(invalidInetSocketAddress);
final Subject subject = new Subject();
final FirewallRule rule1 = new HostnameFirewallRule("127.0.0.1",
"localhost");
diff --git a/broker-plugins/query-engine/pom.xml
b/broker-plugins/query-engine/pom.xml
index c58c925ea3..ee2d0533dc 100644
--- a/broker-plugins/query-engine/pom.xml
+++ b/broker-plugins/query-engine/pom.xml
@@ -88,7 +88,7 @@
<includes>
<include>ExpressionParser.jj</include>
</includes>
- <jdkVersion>11</jdkVersion>
+ <jdkVersion>17</jdkVersion>
</configuration>
</execution>
</executions>
diff --git a/doc/developer-guide/src/main/markdown/build-instructions.md
b/doc/developer-guide/src/main/markdown/build-instructions.md
index 210bea079d..aa385a4406 100644
--- a/doc/developer-guide/src/main/markdown/build-instructions.md
+++ b/doc/developer-guide/src/main/markdown/build-instructions.md
@@ -66,7 +66,7 @@ For complete reference and documentation on Maven please
visit the following onl
### Java
-The build requires a Java 11 or later. You should set the `JAVA_HOME`
environment variable and include its `bin`
+The build requires a Java 17 or later. You should set the `JAVA_HOME`
environment variable and include its `bin`
directory in your `PATH`.
Check java version by executing the following at your command prompt.
diff --git a/doc/developer-guide/src/main/markdown/quick-start.md
b/doc/developer-guide/src/main/markdown/quick-start.md
index e886e00abf..c245848e77 100644
--- a/doc/developer-guide/src/main/markdown/quick-start.md
+++ b/doc/developer-guide/src/main/markdown/quick-start.md
@@ -5,7 +5,7 @@
The following tools are needed to build Qpid Broker-J
* Git client
- * JDK 11 or above; you should set the `JAVA_HOME` environment variable and
include its bin directory in your `PATH`.
+ * JDK 17 or above; you should set the `JAVA_HOME` environment variable and
include its bin directory in your `PATH`.
* Maven 3.0 or above; you should set the `M2_HOME` environment variable and
include its bin directory in your `PATH`.
## Getting sources
diff --git a/doc/developer-guide/src/main/markdown/release-instructions.md
b/doc/developer-guide/src/main/markdown/release-instructions.md
index 5426568dbd..b5489f76c5 100644
--- a/doc/developer-guide/src/main/markdown/release-instructions.md
+++ b/doc/developer-guide/src/main/markdown/release-instructions.md
@@ -41,8 +41,8 @@ would result in failures to publish release artifacts into
staging maven repo.
### Java
-JDK 11 is required to compile java classes. Install latest 11 JDK. At the
moment of writing this document JDK version
-11.0.17 was the latest one.
+JDK 17 is required to compile java classes. Install latest 17 JDK. At the
moment of writing this document JDK version
+17.0.14+7 was the latest one.
### Git
diff --git a/doc/java-broker/src/docbkx/Java-Broker-Appendix-Miscellaneous.xml
b/doc/java-broker/src/docbkx/Java-Broker-Appendix-Miscellaneous.xml
index fa5b2615b2..6d9f033e74 100644
--- a/doc/java-broker/src/docbkx/Java-Broker-Appendix-Miscellaneous.xml
+++ b/doc/java-broker/src/docbkx/Java-Broker-Appendix-Miscellaneous.xml
@@ -31,14 +31,14 @@
following at the command prompt: </para>
<programlisting>echo %JAVA_HOME%</programlisting>
<para> If JAVA_HOME is set you will see something similar to the
following: </para>
- <screen>c:"\PROGRA~1"\Java\jdk-11.0.13\
+ <screen>c:"\PROGRA~1"\Java\jdk-17.0.14+7\
</screen>
- <para> Then confirm that a Java installation (11 or higher) is
available: </para>
+ <para> Then confirm that a Java installation (17 or higher) is
available: </para>
<programlisting>java -version</programlisting>
<para> If java is available on the path, output similar to the following
will be seen: </para>
- <screen>java version "11.0.13" 2021-10-19 LTS
- Java(TM) SE Runtime Environment 18.9 (build 11.0.13+10-LTS-370)
- Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.13+10-LTS-370,
mixed mode</screen>
+ <screen>openjdk version "17.0.5" 2022-10-18
+ OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
+ OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode,
sharing)</screen>
</section>
<section role="h2"
xml:id="Java-Broker-Miscellaneous-JVM-Verification-Unix">
diff --git a/doc/java-broker/src/docbkx/Java-Broker-Getting-Started.xml
b/doc/java-broker/src/docbkx/Java-Broker-Getting-Started.xml
index 69211490e4..ce41e572e1 100644
--- a/doc/java-broker/src/docbkx/Java-Broker-Getting-Started.xml
+++ b/doc/java-broker/src/docbkx/Java-Broker-Getting-Started.xml
@@ -44,7 +44,7 @@
<para>Output similar to the following will be seen:</para>
<screen>[Broker] BRK-1006 : Using configuration : C:\qpidwork\config.json
[Broker] BRK-1001 : Startup : Version: ${project.version} Build: 1478262
-[Broker] BRK-1010 : Platform : JVM : Oracle Corporation version:
11.0.13+10-LTS-370 OS : Windows 7 version: 6.1 arch: x86 cores: 4
+[Broker] BRK-1010 : Platform : JVM : Oracle Corporation version: 17.0.11+9-LTS
OS : Windows 7 version: 6.1 arch: x86 cores: 4
[Broker] BRK-1011 : Maximum Memory : Heap : 518,979,584 bytes Direct :
1,610,612,736 bytes
[Broker] BRK-1002 : Starting : Listening on TCP port 5672
[Broker] MNG-1001 : Web Management Startup
@@ -66,7 +66,7 @@
<para>Output similar to the following will be seen:</para>
<screen>[Broker] BRK-1006 : Using configuration : /var/qpidwork/config.json
[Broker] BRK-1001 : Startup : Version: ${project.version} Build: exported
-[Broker] BRK-1010 : Platform : JVM : Oracle Corporation version:
11.0.13+10-LTS-370 OS : Mac OS X version: 10.12.6 arch: x86_64 cores: 8
+[Broker] BRK-1010 : Platform : JVM : Oracle Corporation version: 17.0.11+9-LTS
OS : Mac OS X version: 10.12.6 arch: x86_64 cores: 8
[Broker] BRK-1011 : Maximum Memory : Heap : 518,979,584 bytes Direct :
1,610,612,736 bytes
[Broker] BRK-1002 : Starting : Listening on TCP port 5672
[Broker] MNG-1001 : Web Management Startup
diff --git a/doc/java-broker/src/docbkx/Java-Broker-Installation.xml
b/doc/java-broker/src/docbkx/Java-Broker-Installation.xml
index d8a9a63bc0..91f2d067b5 100644
--- a/doc/java-broker/src/docbkx/Java-Broker-Installation.xml
+++ b/doc/java-broker/src/docbkx/Java-Broker-Installation.xml
@@ -32,9 +32,9 @@
<section role="h3" xml:id="Java-Broker-Installation-Prerequistes-Java">
<title>Java Platform</title>
<para> The Apache Qpid Broker-J is an 100% Java implementation and as
such it can be used on any
- operating system supporting Java 11 or higher<footnote><para>Java
Cryptography Extension (JCE)
+ operating system supporting Java 17 or higher<footnote><para>Java
Cryptography Extension (JCE)
Unlimited Strength extension must be installed or enabled for some
features.</para></footnote>. This includes Linux,
- Solaris, Mac OS X, and Windows 7/8/10 etc.</para>
+ Solaris, Mac OS X, and Windows 10/11 etc.</para>
<para> The broker has been tested with Java implementations from both
Oracle and IBM. Whatever
platform you chose, it is recommended that you ensure it is patched
with any critical
updates made available from the vendor. </para>
diff --git a/doc/java-broker/src/docbkx/Java-Broker-Introduction.xml
b/doc/java-broker/src/docbkx/Java-Broker-Introduction.xml
index 2188c662cc..364a1f77b2 100644
--- a/doc/java-broker/src/docbkx/Java-Broker-Introduction.xml
+++ b/doc/java-broker/src/docbkx/Java-Broker-Introduction.xml
@@ -31,7 +31,7 @@
<para><emphasis>Headline features</emphasis></para>
<itemizedlist mark="circle">
<listitem>
- <para>100% Java implementation - runs on any platform supporting Java 11
or higher</para>
+ <para>100% Java implementation - runs on any platform supporting Java 17
or higher</para>
</listitem>
<listitem>
<para>Messaging clients support in Java (JMS 1.1 and 2.0 compliance),
C++, Python and more.</para>
diff --git a/doc/java-broker/src/docbkx/runtime/Java-Broker-Runtime-Memory.xml
b/doc/java-broker/src/docbkx/runtime/Java-Broker-Runtime-Memory.xml
index 3fb6f4a4ab..a6392e89f7 100644
--- a/doc/java-broker/src/docbkx/runtime/Java-Broker-Runtime-Memory.xml
+++ b/doc/java-broker/src/docbkx/runtime/Java-Broker-Runtime-Memory.xml
@@ -186,7 +186,7 @@
<section>
<title>Java Tuning</title>
<para>
- Most of these options are implementation specific. It is assumed you
are using Oracle Java 11.
+ Most of these options are implementation specific. It is assumed you
are using Java 17.
<itemizedlist>
<listitem>
Heap and direct memory can be configured through the <link
linkend="Java-Broker-Appendix-Environment-Variables-Qpid-Java-Mem"><literal>QPID_JAVA_MEM</literal>
environment variable</link>.
diff --git a/pom.xml b/pom.xml
index de77e407f4..954ae32077 100644
--- a/pom.xml
+++ b/pom.xml
@@ -77,7 +77,7 @@
<properties>
<minimum-maven-version>3.0.0</minimum-maven-version>
- <minimum-java-version>11</minimum-java-version>
+ <minimum-java-version>17</minimum-java-version>
<maven.compiler.source>${minimum-java-version}</maven.compiler.source>
<maven.compiler.target>${minimum-java-version}</maven.compiler.target>
<skipTests>false</skipTests>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]