This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 6d83a33 Update WebSocket API packaging
6d83a33 is described below
commit 6d83a3317f545aa69fb560d60b99fdf2b16f058d
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Nov 23 17:33:06 2021 +0000
Update WebSocket API packaging
Replace the copy of the client API in the server APi with a dependency
---
RELEASE-NOTES | 5 +++--
build.xml | 23 +++++++++++++++++++-
conf/catalina.properties | 1 +
res/META-INF/websocket-client-api.jar.manifest | 11 ++++++++++
res/bnd/websocket-api.jar.tmp.bnd | 13 +++++------
...ar.tmp.bnd => websocket-client-api.jar.tmp.bnd} | 25 +++++++---------------
res/maven/mvn-pub.xml | 8 +++++++
res/maven/tomcat-websocket-api.pom | 10 ++++++++-
...ket-api.pom => tomcat-websocket-client-api.pom} | 4 ++--
res/maven/tomcat-websocket.pom | 2 +-
webapps/docs/changelog.xml | 10 +++++++++
webapps/docs/class-loader-howto.xml | 1 +
12 files changed, 83 insertions(+), 30 deletions(-)
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index def4047..1446c83 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -85,8 +85,9 @@ for use by web applications (by placing them in "lib"):
* tomcat-jdbc.jar (Tomcat's database connection pooling solution)
* tomcat-jni.jar (Interface to the native component of the APR/native
connector)
* tomcat-util.jar (Various utilities)
-* tomcat-websocket.jar (WebSocket 2.0 implementation)
-* websocket-api.jar (WebSocket 2.0 API)
+* tomcat-websocket.jar (WebSocket 2.1 implementation)
+* websocket-api.jar (WebSocket 2.1 API)
+* websocket-client-api.jar (WebSocket 2.1 Client API)
You can make additional APIs available to all of your web applications by
putting unpacked classes into a "classes" directory (not created by default),
diff --git a/build.xml b/build.xml
index fbba5d7..dc1260b 100644
--- a/build.xml
+++ b/build.xml
@@ -117,6 +117,7 @@
<property name="jsp-api.jar" value="${tomcat.build}/lib/jsp-api.jar"/>
<property name="el-api.jar" value="${tomcat.build}/lib/el-api.jar"/>
<property name="websocket-api.jar"
value="${tomcat.build}/lib/websocket-api.jar"/>
+ <property name="websocket-client-api.jar"
value="${tomcat.build}/lib/websocket-client-api.jar"/>
<property name="jaspic-api.jar" value="${tomcat.build}/lib/jaspic-api.jar"/>
<property name="tomcat-websocket.jar"
value="${tomcat.build}/lib/tomcat-websocket.jar"/>
<property name="catalina.jar" value="${tomcat.build}/lib/catalina.jar"/>
@@ -144,6 +145,7 @@
<property name="jsp-api-src.jar" value="${tomcat.src.jars}/jsp-api-src.jar"/>
<property name="el-api-src.jar" value="${tomcat.src.jars}/el-api-src.jar"/>
<property name="websocket-api-src.jar"
value="${tomcat.src.jars}/websocket-api-src.jar"/>
+ <property name="websocket-client-api-src.jar"
value="${tomcat.src.jars}/websocket-client-api-src.jar"/>
<property name="jaspic-api-src.jar"
value="${tomcat.src.jars}/jaspic-api-src.jar"/>
<property name="tomcat-websocket-src.jar"
value="${tomcat.src.jars}/tomcat-websocket-src.jar"/>
<property name="catalina-src.jar"
value="${tomcat.src.jars}/catalina-src.jar"/>
@@ -349,7 +351,11 @@
</patternset>
<patternset id="files.websocket-api">
- <include name="jakarta/websocket/**" />
+ <include name="jakarta/websocket/server/*" />
+ </patternset>
+
+ <patternset id="files.websocket-client-api">
+ <include name="jakarta/websocket/*" />
</patternset>
<patternset id="files.jaspic-api">
@@ -754,6 +760,7 @@
<patternset id="files.tomcat-embed-websocket" >
<patternset refid="files.websocket-api" />
+ <patternset refid="files.websocket-client-api" />
<patternset refid="files.tomcat-websocket" />
</patternset>
@@ -1043,6 +1050,13 @@
manifest="${tomcat.manifests}/websocket-api.jar.manifest"
addOSGi="true" />
+ <!-- WebSocket Client API JAR File -->
+ <jarIt jarfile="${websocket-client-api.jar}"
+ filesDir="${tomcat.classes}"
+ filesId="files.websocket-client-api"
+ manifest="${tomcat.manifests}/websocket-client-api.jar.manifest"
+ addOSGi="true" />
+
<!-- JASPIC API JAR File -->
<jarIt jarfile="${jaspic-api.jar}"
filesDir="${tomcat.classes}"
@@ -2311,6 +2325,7 @@ Apache Tomcat ${version} native binaries for Win64
AMD64/EMT64 platform.
<include name="jaspic-api.jar"/>
<include name="servlet-api.jar"/>
<include name="websocket-api.jar"/>
+ <include name="websocket-client-api.jar"/>
<include name="tomcat-websocket.jar"/>
<include name="tomcat-coyote.jar"/>
<include name="tomcat-util.jar"/>
@@ -2919,6 +2934,12 @@ skip.installer property in build.properties" />
filesId="files.websocket-api"
manifest="${tomcat.manifests}/websocket-api.jar.manifest" />
+ <!-- WebSocket Client API JAR File -->
+ <jarIt jarfile="${websocket-client-api-src.jar}"
+ filesDir="java"
+ filesId="files.websocket-client-api"
+ manifest="${tomcat.manifests}/websocket-client-api.jar.manifest" />
+
<!-- JASPIC API JAR File -->
<jarIt jarfile="${jaspic-api-src.jar}"
filesDir="java"
diff --git a/conf/catalina.properties b/conf/catalina.properties
index d73a8bf..2596547 100644
--- a/conf/catalina.properties
+++ b/conf/catalina.properties
@@ -183,6 +183,7 @@ tomcat-util.jar,\
tomcat-websocket.jar,\
tools.jar,\
websocket-api.jar,\
+websocket-client-api.jar,\
wsdl4j*.jar,\
xercesImpl.jar,\
xml-apis.jar,\
diff --git a/res/META-INF/websocket-client-api.jar.manifest
b/res/META-INF/websocket-client-api.jar.manifest
new file mode 100644
index 0000000..9f8715c
--- /dev/null
+++ b/res/META-INF/websocket-client-api.jar.manifest
@@ -0,0 +1,11 @@
+Manifest-version: 1.0
+X-Compile-Source-JDK: @source.jdk@
+X-Compile-Target-JDK: @target.jdk@
+
+Name: jakarta/websocket/client
+Specification-Title: Jakarta WebSocket Client
+Specification-Version: @websocket.spec.version@
+Specification-Vendor: Eclipse Foundation
+Implementation-Title: jakarta.websocket.client
+Implementation-Version: @websocket.spec.version@[email protected]@
+Implementation-Vendor: Apache Software Foundation
diff --git a/res/bnd/websocket-api.jar.tmp.bnd
b/res/bnd/websocket-api.jar.tmp.bnd
index efa1f2b..c449f3c 100644
--- a/res/bnd/websocket-api.jar.tmp.bnd
+++ b/res/bnd/websocket-api.jar.tmp.bnd
@@ -18,7 +18,7 @@
Bundle-Name: tomcat-websocket-api
Bundle-SymbolicName: org.apache.tomcat-websocket-api
Export-Package: \
- jakarta.websocket.*;version=${websocket.spec.version}
+ jakarta.websocket.server.*;version=${websocket.spec.version}
Provide-Capability: \
osgi.contract;\
@@ -30,9 +30,6 @@ Require-Capability: \
osgi.extender;\
filter:="(&(osgi.extender=osgi.serviceloader.processor)(version>=1.0.0)(!(version>=2.0.0)))",\
osgi.serviceloader;\
- filter:="(osgi.serviceloader=jakarta.websocket.ContainerProvider)";\
- osgi.serviceloader="jakarta.websocket.ContainerProvider",\
- osgi.serviceloader;\
filter:="(osgi.serviceloader=jakarta.websocket.server.ServerEndpointConfig$Configurator)";\
osgi.serviceloader="jakarta.websocket.server.ServerEndpointConfig$Configurator",\
osgi.ee;\
@@ -42,14 +39,18 @@ Require-Capability: \
Specification-Title=Jakarta WebSocket;\
Specification-Version=${websocket.spec.version};\
Specification-Vendor=Eclipse Foundation;\
- Implementation-Title=jakarta.websocket;\
+ Implementation-Title=jakarta.websocket.server;\
Implementation-Version=${websocket.spec.version}.${websocket.revision};\
Implementation-Vendor=Apache Software Foundation
-jpms-module-info: \
jakarta.websocket;\
access=32;\
+ modules=jakarta.websocket.client;\
version=${websocket.spec.version}
-jpms-module-info-options: \
jakarta.websocket;\
- substitute=websocket-api
\ No newline at end of file
+ substitute=websocket-api,\
+ jakarta.websocket.client;\
+ transitive=true;\
+ static=false
\ No newline at end of file
diff --git a/res/bnd/websocket-api.jar.tmp.bnd
b/res/bnd/websocket-client-api.jar.tmp.bnd
similarity index 69%
copy from res/bnd/websocket-api.jar.tmp.bnd
copy to res/bnd/websocket-client-api.jar.tmp.bnd
index efa1f2b..b2713eb 100644
--- a/res/bnd/websocket-api.jar.tmp.bnd
+++ b/res/bnd/websocket-client-api.jar.tmp.bnd
@@ -15,16 +15,10 @@
-include: build-defaults.bnd, spec-defaults.bnd
-Bundle-Name: tomcat-websocket-api
-Bundle-SymbolicName: org.apache.tomcat-websocket-api
+Bundle-Name: tomcat-websocket-client-api
+Bundle-SymbolicName: org.apache.tomcat-websocket-client-api
Export-Package: \
- jakarta.websocket.*;version=${websocket.spec.version}
-
-Provide-Capability: \
- osgi.contract;\
- osgi.contract=JavaWebSockets;\
- version:Version=${websocket.spec.version};\
- uses:='${packages;NAMED;jakarta.websocket.*}'
+ jakarta.websocket;version=${websocket.spec.version}
Require-Capability: \
osgi.extender;\
@@ -32,14 +26,11 @@ Require-Capability: \
osgi.serviceloader;\
filter:="(osgi.serviceloader=jakarta.websocket.ContainerProvider)";\
osgi.serviceloader="jakarta.websocket.ContainerProvider",\
- osgi.serviceloader;\
-
filter:="(osgi.serviceloader=jakarta.websocket.server.ServerEndpointConfig$Configurator)";\
-
osgi.serviceloader="jakarta.websocket.server.ServerEndpointConfig$Configurator",\
osgi.ee;\
filter:="(&(osgi.ee=JavaSE)(version=1.8))"
--namesection: jakarta/websocket*/;\
- Specification-Title=Jakarta WebSocket;\
+-namesection: jakarta/websocket/client*/;\
+ Specification-Title=Jakarta WebSocket Client;\
Specification-Version=${websocket.spec.version};\
Specification-Vendor=Eclipse Foundation;\
Implementation-Title=jakarta.websocket;\
@@ -47,9 +38,9 @@ Require-Capability: \
Implementation-Vendor=Apache Software Foundation
-jpms-module-info: \
- jakarta.websocket;\
+ jakarta.websocket.client;\
access=32;\
version=${websocket.spec.version}
-jpms-module-info-options: \
- jakarta.websocket;\
- substitute=websocket-api
\ No newline at end of file
+ jakarta.websocke.clientt;\
+ substitute=websocket-client-api
\ No newline at end of file
diff --git a/res/maven/mvn-pub.xml b/res/maven/mvn-pub.xml
index f74a40e..308421b 100644
--- a/res/maven/mvn-pub.xml
+++ b/res/maven/mvn-pub.xml
@@ -331,6 +331,10 @@
jarFileName="websocket-api.jar"
srcJarFileName="websocket-api-src.jar"/>
+ <doMavenInstall artifactId="tomcat-websocket-client-api"
+ jarFileName="websocket-client-api.jar"
+ srcJarFileName="websocket-client-api-src.jar"/>
+
<doMavenInstall artifactId="tomcat-jaspic-api"
jarFileName="jaspic-api.jar"
srcJarFileName="jaspic-api-src.jar"/>
@@ -434,6 +438,10 @@
jarFileName="websocket-api.jar"
srcJarFileName="websocket-api-src.jar"/>
+ <doMavenDeploy artifactId="tomcat-websocket-client-api"
+ jarFileName="websocket-client-api.jar"
+ srcJarFileName="websocket-client-api-src.jar"/>
+
<doMavenDeploy artifactId="tomcat-jaspic-api"
jarFileName="jaspic-api.jar"
srcJarFileName="jaspic-api-src.jar"/>
diff --git a/res/maven/tomcat-websocket-api.pom
b/res/maven/tomcat-websocket-api.pom
index 63a3560..27206ac 100644
--- a/res/maven/tomcat-websocket-api.pom
+++ b/res/maven/tomcat-websocket-api.pom
@@ -23,7 +23,7 @@
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-websocket-api</artifactId>
<version>@MAVEN.DEPLOY.VERSION@</version>
- <description>WebSocket (JSR356) API</description>
+ <description>WebSocket API</description>
<url>https://tomcat.apache.org/</url>
<licenses>
<license>
@@ -32,4 +32,12 @@
<distribution>repo</distribution>
</license>
</licenses>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-websocket-client-api</artifactId>
+ <version>@MAVEN.DEPLOY.VERSION@</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
</project>
diff --git a/res/maven/tomcat-websocket-api.pom
b/res/maven/tomcat-websocket-client-api.pom
similarity index 93%
copy from res/maven/tomcat-websocket-api.pom
copy to res/maven/tomcat-websocket-client-api.pom
index 63a3560..1e84dfd 100644
--- a/res/maven/tomcat-websocket-api.pom
+++ b/res/maven/tomcat-websocket-client-api.pom
@@ -21,9 +21,9 @@
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-websocket-api</artifactId>
+ <artifactId>tomcat-websocket-client-api</artifactId>
<version>@MAVEN.DEPLOY.VERSION@</version>
- <description>WebSocket (JSR356) API</description>
+ <description>WebSocket Client API</description>
<url>https://tomcat.apache.org/</url>
<licenses>
<license>
diff --git a/res/maven/tomcat-websocket.pom b/res/maven/tomcat-websocket.pom
index e0384a2..47c53bf 100644
--- a/res/maven/tomcat-websocket.pom
+++ b/res/maven/tomcat-websocket.pom
@@ -23,7 +23,7 @@
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-websocket</artifactId>
<version>@MAVEN.DEPLOY.VERSION@</version>
- <description>Tomcat WebSocket (JSR356) implementation</description>
+ <description>Tomcat WebSocket implementation</description>
<url>https://tomcat.apache.org/</url>
<licenses>
<license>
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index fed3f83..54b8758 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -147,6 +147,16 @@
</fix>
</changelog>
</subsection>
+ <subsection name="WebSocket">
+ <changelog>
+ <add>
+ Update the WebSocket API packaging to remove the copy of the client API
+ from the server API and replace it with a dependency on the client API.
+ This aligns Tomcat with changes in the WebSocket 2.1 specification.
+ (markt)
+ </add>
+ </changelog>
+ </subsection>
</section>
<section name="Tomcat 10.1.0-M7 (markt)" rtext="2021-11-15">
<subsection name="Catalina">
diff --git a/webapps/docs/class-loader-howto.xml
b/webapps/docs/class-loader-howto.xml
index 538626b..1906eda 100644
--- a/webapps/docs/class-loader-howto.xml
+++ b/webapps/docs/class-loader-howto.xml
@@ -161,6 +161,7 @@ loaders as it is initialized:</p>
Apache Tomcat.</li>
<li><em>tomcat-websocket.jar</em> — WebSocket 2.0 implementation</li>
<li><em>websocket-api.jar</em> — WebSocket 2.0 API</li>
+ <li><em>websocket-client-api.jar</em> — WebSocket 2.0 Client API</li>
</ul></li>
<li><p><strong>WebappX</strong> — A class loader is created for each web
application that is deployed in a single Tomcat instance. All unpacked
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]