Merge remote-tracking branch 'origin/jetty-10.0.x' into jetty-11.0.x

This commit is contained in:
Jan Bartel 2021-06-23 08:43:03 +10:00
commit 90ea4f5b8e
10 changed files with 115 additions and 6 deletions

View File

@ -31,8 +31,11 @@
<configuration>
<instructions>
<Import-Package>${osgi.slf4j.import.packages},org.objectweb.asm;version="[$(version;==;${asm.version}),$(version;+;${asm.version}))",*</Import-Package>
<Require-Capability>osgi.serviceloader; filter:="(osgi.serviceloader=jakarta.servlet.ServletContainerInitializer)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)";resolution:=optional
<Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)", osgi.serviceloader; filter:="(osgi.serviceloader=jakarta.servlet.ServletContainerInitializer)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)";resolution:=optional
</Require-Capability>
<Provide-Capability>
osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.webapp.Configuration
</Provide-Capability>
</instructions>
</configuration>
</plugin>

View File

@ -14,6 +14,21 @@
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"
</Require-Capability>
<Provide-Capability>
osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.webapp.Configuration
</Provide-Capability>
</instructions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>

View File

@ -38,6 +38,22 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"
</Require-Capability>
<Provide-Capability>
osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.webapp.Configuration,
osgi.serviceloader; osgi.serviceloader=jakarta.servlet.ServletContainerInitializer
</Provide-Capability>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>

View File

@ -1,3 +1 @@
System.out.println( "running postbuild.groovy" )

View File

@ -1,3 +1,18 @@
System.out.println( "running postbuild.groovy" )
File webfrag = new File(basedir, 'target/webfrag.xml')
assert webfrag.exists()
assert webfrag.text.contains("<servlet-name>org.apache.jsp.foo_jsp</servlet-name>")
assert webfrag.text.contains("<servlet-class>org.apache.jsp.foo_jsp</servlet-class>")
assert webfrag.text.contains("<url-pattern>/foo.jsp</url-pattern>")
// cannot use such parsing as it is not real xml
//def rootXml = new XmlSlurper().parse(new File(basedir, 'target/webfrag.xml'))
// so fake it
def rootXml = new XmlSlurper().parseText("<root>"+webfrag.text+"</root>")
assert rootXml.servlet.'servlet-name'.text() == "org.apache.jsp.foo_jsp"
assert rootXml.servlet.'servlet-class'.text() == "org.apache.jsp.foo_jsp"
assert rootXml.'servlet-mapping'.'servlet-name'.text() == "org.apache.jsp.foo_jsp"
assert rootXml.'servlet-mapping'.'url-pattern'.text() == "/foo.jsp"

View File

@ -14,6 +14,26 @@
<bundle-symbolic-name>${project.groupId}.quickstart</bundle-symbolic-name>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"
</Require-Capability>
<Provide-Capability>
osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.webapp.Configuration
</Provide-Capability>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>

View File

@ -46,6 +46,12 @@
<configuration>
<instructions>
<Export-Package>*,org.eclipse.jetty.websocket.core.common.internal.*</Export-Package>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"
</Require-Capability>
<Provide-Capability>
osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.websocket.core.Extension
</Provide-Capability>
</instructions>
</configuration>
</execution>

View File

@ -79,7 +79,8 @@
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)";resolution:=optional
</Require-Capability>
<Provide-Capability>
osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider
osgi.serviceloader;osgi.serviceloader=jakarta.websocket.ContainerProvider,
osgi.serviceloader;osgi.serviceloader=jakarta.servlet.ServletContainerInitializer
</Provide-Capability>
</instructions>
</configuration>

View File

@ -14,6 +14,26 @@
<bundle-symbolic-name>${project.groupId}.client</bundle-symbolic-name>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"
</Require-Capability>
<Provide-Capability>
osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.webapp.Configuration
</Provide-Capability>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>

View File

@ -24,6 +24,21 @@
</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Require-Capability>
osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"
</Require-Capability>
<Provide-Capability>
osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.websocket.api.ExtensionConfig$Parser
</Provide-Capability>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>