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 >
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
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 >
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 >
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 >
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 >
218279 </plugins >
219280 </build >
220281
221-
222282 <issueManagement >
223283 <system >GitHub</system >
224284 <url >https://github.com/HtmlUnit/htmlunit/issues/</url >
255315 <contributors >
256316 </contributors >
257317
258- </project >
318+ </project >
0 commit comments