Skip to content

Commit df7a81c

Browse files
committed
5.0.0; 12.1.8
1 parent 427f68d commit df7a81c

3 files changed

Lines changed: 110 additions & 25 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
/target/
2+
/.classpath
3+
/.project
4+
/dependency-reduced-pom.xml

README.md

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ using different versions of Jetty, this repo provides a shaded version of the je
1515

1616
[HtmlUnit@mastodon](https://fosstodon.org/@HtmlUnit) | [HtmlUnit@bsky](https://bsky.app/profile/htmlunit.bsky.social) | [HtmlUnit@Twitter](https://twitter.com/HtmlUnit)
1717

18-
### Latest release Version 4.21.0 / December 28, 2025
18+
#### Version 5
19+
20+
Starting with version 5.0.0, **JDK 17 or higher is required**.
21+
If you are still on JDK 8, see [Legacy Support (JDK 8)](#legacy-support-jdk-8) below.
22+
23+
24+
### Latest release Version 5.0.0 / May 24, 2026
25+
1926

2027
### Maven
2128

@@ -25,7 +32,7 @@ Add to your `pom.xml`:
2532
<dependency>
2633
<groupId>org.htmlunit</groupId>
2734
<artifactId>htmlunit-websocket-client</artifactId>
28-
<version>4.21.0</version>
35+
<version>5.0.0</version>
2936
</dependency>
3037
```
3138

@@ -34,9 +41,24 @@ Add to your `pom.xml`:
3441
Add to your `build.gradle`:
3542

3643
```groovy
37-
implementation group: 'org.htmlunit', name: 'htmlunit-websocket-client', version: '4.21.0'
44+
implementation group: 'org.htmlunit', name: 'htmlunit-websocket-client', version: '5.0.0'
3845
```
3946

47+
48+
<a name="legacy-support-jdk-8"></a>
49+
### Legacy Support (JDK 8)
50+
51+
If you need to continue using **JDK 8**, versions 4.x remain available as-is.
52+
Ongoing maintenance and fixes for JDK 8 are only available through sponsorship —
53+
please contact me via email to discuss options. Sponsorship provides:
54+
55+
- Backporting security and bug fixes to the 4.x branch
56+
- Compatibility maintenance with older Java versions
57+
- Timely releases for critical issues
58+
59+
Without sponsorship, the 4.x branch will not receive further updates.
60+
61+
4062
### Last CI build
4163
The latest builds are available from our
4264
[Jenkins CI build server](https://jenkins.wetator.org/job/HtmlUnit%20-%20Websocket%20Client/ "HtmlUnit - Websocket Client CI")
@@ -49,7 +71,7 @@ If you use maven please add:
4971
<dependency>
5072
<groupId>org.htmlunit</groupId>
5173
<artifactId>htmlunit-websocket-client</artifactId>
52-
<version>4.22.0-SNAPSHOT</version>
74+
<version>5.1.0-SNAPSHOT</version>
5375
</dependency>
5476

5577
You have to add the sonatype-central snapshot repository to your pom `repositories` section also:
@@ -131,14 +153,14 @@ This part is intended for committer who are packaging a release.
131153
* click Releases > Draft new release
132154
* fill the tag and title field with the release number (e.g. 4.0.0)
133155
* append
134-
* htmlunit-websocket-client-4.x.x.jar
135-
* htmlunit-websocket-client-4.x.x.jar.asc
136-
* htmlunit-websocket-client-4.x.x.pom
137-
* htmlunit-websocket-client-4.x.x.pom.asc
138-
* htmlunit-websocket-client-4.x.x-javadoc.jar
139-
* htmlunit-websocket-client-4.x.x-javadoc.jar.asc
140-
* htmlunit-websocket-client-4.x.x-sources.jar
141-
* htmlunit-websocket-client-4.x.x-sources.jar.asc
156+
* htmlunit-websocket-client-5.x.x.jar
157+
* htmlunit-websocket-client-5.x.x.jar.asc
158+
* htmlunit-websocket-client-5.x.x.pom
159+
* htmlunit-websocket-client-5.x.x.pom.asc
160+
* htmlunit-websocket-client-5.x.x-javadoc.jar
161+
* htmlunit-websocket-client-5.x.x-javadoc.jar.asc
162+
* htmlunit-websocket-client-5.x.x-sources.jar
163+
* htmlunit-websocket-client-5.x.x-sources.jar.asc
142164
* and publish the release
143165

144166
* Update the version number in pom.xml to start next snapshot development

pom.xml

Lines changed: 73 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>org.htmlunit</groupId>
77
<artifactId>htmlunit-websocket-client</artifactId>
8-
<version>5.0.0-SNAPSHOT</version>
8+
<version>5.0.0</version>
99

1010
<name>HtmlUnit WebSocket Client</name>
1111
<organization>
@@ -15,7 +15,7 @@
1515
<packaging>jar</packaging>
1616
<description>
1717
The default WebSocket client used by HtmlUnit.
18-
The implementation is based on Jetty 9.
18+
The implementation is based on Jetty 12.
1919
</description>
2020
<url>https://www.htmlunit.org</url>
2121

@@ -30,19 +30,21 @@
3030

3131
<maven.version.ignore>(?i).*-(alpha|beta|m|rc)([\.-]?\d+)?</maven.version.ignore>
3232

33-
<jetty.version>12.1.6</jetty.version>
33+
<jetty.version>12.1.8</jetty.version>
3434

3535
<!-- quality -->
3636
<dependencycheck.version>10.0.4</dependencycheck.version>
3737

3838
<!-- plugins -->
3939
<central-publishing-plugin.version>0.10.0</central-publishing-plugin.version>
4040
<gpg-plugin.version>3.2.8</gpg-plugin.version>
41-
<enforcer-plugin.version>3.6.2</enforcer-plugin.version>
41+
<enforcer-plugin.version>3.6.3</enforcer-plugin.version>
42+
<compiler-plugin.version>3.15.0</compiler-plugin.version>
4243
<jar-plugin.version>3.5.0</jar-plugin.version>
4344
<source-plugin.version>3.4.0</source-plugin.version>
4445
<javadoc-plugin.version>3.12.0</javadoc-plugin.version>
45-
<shade-plugin.version>3.6.1</shade-plugin.version>
46+
<shade-plugin.version>3.6.2</shade-plugin.version>
47+
<moditect-plugin.version>1.3.0.Final</moditect-plugin.version>
4648
</properties>
4749

4850
<dependencies>
@@ -100,11 +102,28 @@
100102
<version>3.6.3</version>
101103
</requireMavenVersion>
102104
<requireJavaVersion>
103-
<version>1.8.0</version>
105+
<version>17</version>
104106
</requireJavaVersion>
105107
</rules>
106108
</configuration>
107-
</execution>
109+
</execution>
110+
</executions>
111+
</plugin>
112+
<plugin>
113+
<groupId>org.apache.maven.plugins</groupId>
114+
<artifactId>maven-compiler-plugin</artifactId>
115+
<version>${compiler-plugin.version}</version>
116+
<executions>
117+
<!-- exclude module-info.java from normal compile;
118+
moditect adds it after shading when relocated packages exist -->
119+
<execution>
120+
<id>default-compile</id>
121+
<configuration>
122+
<excludes>
123+
<exclude>module-info.java</exclude>
124+
</excludes>
125+
</configuration>
126+
</execution>
108127
</executions>
109128
</plugin>
110129
<plugin>
@@ -117,6 +136,9 @@
117136
<addClasspath>true</addClasspath>
118137
<mainClass>org.htmlunit.websocket.client.Main</mainClass>
119138
</manifest>
139+
<manifestEntries>
140+
<Multi-Release>true</Multi-Release>
141+
</manifestEntries>
120142
</archive>
121143
</configuration>
122144
</plugin>
@@ -133,39 +155,78 @@
133155
<configuration>
134156
<artifactSet>
135157
<excludes>
158+
<exclude>org.slf4j:*</exclude>
136159
</excludes>
137160
</artifactSet>
138161
<filters>
139162
<filter>
140163
<artifact>*:*</artifact>
141164
<excludes>
142165
<exclude>about.html</exclude>
143-
144166
<exclude>META-INF/*.SF</exclude>
145167
<exclude>META-INF/*.DSA</exclude>
146168
<exclude>META-INF/*.RSA</exclude>
147169
<exclude>META-INF/DEPENDENCIES</exclude>
148170
<exclude>META-INF/NOTICE</exclude>
171+
<!-- strip module-info from all deps to avoid split package conflict -->
172+
<exclude>module-info.class</exclude>
173+
<exclude>META-INF/versions/*/module-info.class</exclude>
149174
</excludes>
150175
</filter>
151176
</filters>
152-
153177
<relocations>
154178
<relocation>
155179
<pattern>org.eclipse.jetty</pattern>
156180
<shadedPattern>org.htmlunit.jetty</shadedPattern>
157181
</relocation>
158182
</relocations>
159-
160183
<transformers>
161-
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"></transformer>
184+
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
162185
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
163186
</transformers>
164187
</configuration>
165188
</execution>
166189
</executions>
167190
</plugin>
191+
<plugin>
192+
<!-- moditect runs AFTER shade, so org.htmlunit.jetty.* packages
193+
already exist in the shaded jar when module-info is compiled -->
194+
<groupId>org.moditect</groupId>
195+
<artifactId>moditect-maven-plugin</artifactId>
196+
<version>${moditect-plugin.version}</version>
197+
<executions>
198+
<execution>
199+
<id>add-module-info-to-shaded-jar</id>
200+
<phase>package</phase>
201+
<goals>
202+
<goal>add-module-info</goal>
203+
</goals>
204+
<configuration>
205+
<outputDirectory>${project.build.directory}</outputDirectory>
206+
<overwriteExistingFiles>true</overwriteExistingFiles>
207+
<jvmVersion>17</jvmVersion>
208+
<module>
209+
<moduleInfoSource>
210+
module org.htmlunit.websocket.client {
211+
requires org.slf4j;
168212

213+
uses org.htmlunit.jetty.compression.Compression;
214+
uses org.htmlunit.jetty.http.HttpFieldPreEncoder;
215+
uses org.htmlunit.jetty.websocket.api.ExtensionConfig$Parser;
216+
uses org.htmlunit.jetty.websocket.core.Extension;
217+
218+
exports org.htmlunit.jetty.client;
219+
exports org.htmlunit.jetty.http;
220+
exports org.htmlunit.jetty.util.ssl;
221+
exports org.htmlunit.jetty.websocket.api;
222+
exports org.htmlunit.jetty.websocket.client;
223+
}
224+
</moduleInfoSource>
225+
</module>
226+
</configuration>
227+
</execution>
228+
</executions>
229+
</plugin>
169230
<plugin>
170231
<groupId>org.apache.maven.plugins</groupId>
171232
<artifactId>maven-source-plugin</artifactId>
@@ -218,7 +279,6 @@
218279
</plugins>
219280
</build>
220281

221-
222282
<issueManagement>
223283
<system>GitHub</system>
224284
<url>https://github.com/HtmlUnit/htmlunit/issues/</url>
@@ -255,4 +315,4 @@
255315
<contributors>
256316
</contributors>
257317

258-
</project>
318+
</project>

0 commit comments

Comments
 (0)