Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #10688 add Jetty 12.0.x ee8 osgi #10711

Merged
merged 33 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
772ce40
add osgi ee8 files
olamy Oct 11, 2023
fc869c2
fix poms
olamy Oct 11, 2023
5dfbb40
use http transporter
olamy Oct 11, 2023
b68794f
sortpom to ee8 osgi files
olamy Oct 12, 2023
d4067bd
use modify sources released version 1.0.7
olamy Oct 12, 2023
e3debca
bump to last modify source snapshot
olamy Oct 13, 2023
8b02766
use modify-sources-plugin 1.0.8
olamy Oct 13, 2023
48cd654
fix translation of tests
olamy Oct 16, 2023
ea08433
use some values from poms to get groupId/artifactId as changing the s…
olamy Oct 16, 2023
749cdc4
fix some osgi metadata
olamy Oct 17, 2023
b6844fa
fix few more osgi but no much luck for now :(
olamy Oct 18, 2023
8eaac17
change osgi import for demo jsp
olamy Oct 18, 2023
fcfd809
bundle debug to get more logs on CI
olamy Oct 18, 2023
be4a426
avoid NPE
olamy Oct 19, 2023
c4f91b5
fix checkstyle
olamy Oct 19, 2023
f5040b4
restore usage of slf4j 1.x for paxexam container
olamy Oct 19, 2023
8a1eb1e
fix webdefault file naming
olamy Oct 19, 2023
17662ec
fixing slf4j start error
olamy Oct 19, 2023
29d0801
checkstyle fix
olamy Oct 19, 2023
dc3ae34
fix package name
olamy Oct 19, 2023
1c224d1
Fix version of jsp api for ee8
janbartel Oct 19, 2023
d786599
align slf4j versions
olamy Oct 19, 2023
03128b7
fix missing osgi header
olamy Oct 19, 2023
3b8275c
use correct bundle here
olamy Oct 19, 2023
5e641fe
remove not used here property
olamy Oct 23, 2023
e1844c9
Fix osgi jsp
janbartel Oct 23, 2023
5a64d9e
fix CNFE com.acme.HelloWorld
olamy Oct 23, 2023
78c5cba
fix filename
olamy Oct 23, 2023
0a311ae
fix path
olamy Oct 23, 2023
10a40cd
Fix spec demo
janbartel Oct 23, 2023
a46130b
use correct port
olamy Oct 23, 2023
752b457
fix few files and demo osgi Web-ContextPath
olamy Oct 23, 2023
aa479a4
Merge remote-tracking branch 'origin/jetty-12.0.x' into jetty-12.0.x-…
joakime Oct 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def mavenBuild(jdk, cmdline, mvnName) {
buildCache = useBuildCache()
if (buildCache) {
echo "Using build cache"
extraArgs = " -Dmaven.build.cache.restoreGeneratedSources=false -Dmaven.build.cache.remote.url=dav:http://nginx-cache-service.jenkins.svc.cluster.local:80 -Dmaven.build.cache.remote.enabled=true -Dmaven.build.cache.remote.save.enabled=true -Dmaven.build.cache.remote.server.id=remote-build-cache-server "
extraArgs = " -Dmaven.build.cache.restoreGeneratedSources=false -Dmaven.build.cache.remote.url=http://nginx-cache-service.jenkins.svc.cluster.local:80 -Dmaven.build.cache.remote.enabled=true -Dmaven.build.cache.remote.save.enabled=true -Dmaven.build.cache.remote.server.id=remote-build-cache-server -Daether.connector.http.supportWebDav=true "
} else {
// when not using cache
echo "Not using build cache"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public Object addingBundle(Bundle bundle, BundleEvent event)
{
try
{
String serverName = (String)bundle.getHeaders().get(OSGiServerConstants.MANAGED_JETTY_SERVER_NAME);
String serverName = bundle.getHeaders().get(OSGiServerConstants.MANAGED_JETTY_SERVER_NAME);

if ((StringUtil.isBlank(serverName) && _managedServerName.equals(OSGiServerConstants.MANAGED_JETTY_SERVER_DEFAULT_NAME)) ||
(!StringUtil.isBlank(serverName) && (serverName.equals(_managedServerName))))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public void lifeCycleStarted(LifeCycle event)
{
Files.deleteIfExists(_filePath);
writer.write(((ServerConnector)event).getLocalPort());
writer.close();
}
catch (Exception e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledOnOs;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.parallel.Isolated;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsInAnyOrder;
Expand All @@ -70,6 +71,7 @@
import static org.junit.jupiter.api.condition.OS.WINDOWS;

@ExtendWith(WorkDirExtension.class)
@Isolated("Access static FileSystemPool.INSTANCE.mounts()")
public class FileSystemResourceTest
{

Expand Down
2 changes: 1 addition & 1 deletion jetty-ee8/jetty-ee8-annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<configuration>
<instructions>
<Import-Package>${osgi.slf4j.import.packages},org.objectweb.asm;version="[$(version;==;${asm.version}),$(version;+;${asm.version}))",*</Import-Package>
<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>
<Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)", osgi.serviceloader; filter:="(osgi.serviceloader=javax.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.ee8.webapp.Configuration</Provide-Capability>
</instructions>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,14 @@
<Export-Package>!org.example*</Export-Package>
<!-- the test webapp is configured via a jetty xml file
in order to add the security handler. -->
<Web-ContextPath>/</Web-ContextPath>
<Web-ContextPath>/ee8-demo-jetty</Web-ContextPath>
<!-- in fact the '.' must not be there
but Felix-BND has a bug:
http://www.mail-archive.com/[email protected]/msg04730.html
https://issues.apache.org/jira/browse/FELIX-1571
-->
<Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
<Jetty-Environment>ee8</Jetty-Environment>
</instructions>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ directory, additional configuration may be specified and hot deployments
detected.
===================================================================== -->

<Configure class="org.eclipse.jetty.ee9.webapp.WebAppContext">
<Configure class="org.eclipse.jetty.ee8.webapp.WebAppContext">

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Required minimal context configuration : -->
<!-- + contextPath -->
<!-- + war OR baseResource -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Set name="contextPath">/</Set>
<Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/ee9-demo-jetty.war</Set>
<Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/ee8-demo-jetty.war</Set>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Optional context configuration -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Set name="extractWAR">true</Set>
<Set name="copyWebDir">false</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault-ee9.xml</Set>
<Set name="overrideDescriptor"><SystemProperty name="jetty.base" default="."/>/etc/ee9-demo-override-web.xml</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault-ee8.xml</Set>
<Set name="overrideDescriptor"><SystemProperty name="jetty.base" default="."/>/etc/ee8-demo-override-web.xml</Set>

<!-- virtual hosts
<Set name="virtualHosts">
Expand Down
4 changes: 3 additions & 1 deletion jetty-ee8/jetty-ee8-demos/jetty-ee8-demo-jsp-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@
<supportedProjectType>war</supportedProjectType>
</supportedProjectTypes>
<instructions>
<Import-Package>javax.servlet.jsp.*;version="[3,4)",org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",*</Import-Package>
<!--Import-Package>javax.servlet.jsp.*;version="[2,3)",org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",*</Import-Package-->
<Import-Package>javax.servlet.jsp;version="[2.2.0,4.1)",javax.servlet.jsp.tagext;version="[2.2.0,4.1)",java.io,java.lang,java.text,java.util,javax.servlet;version="[4.0.0,5)",javax.servlet.http;version="[4.0.0,5)"</Import-Package>
<Export-Package>!org.example.*</Export-Package>
<Web-ContextPath>/ee8-demo-jsp</Web-ContextPath>
<Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>
<Jetty-Environment>ee8</Jetty-Environment>
</instructions>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<Bundle-SymbolicName>org.eclipse.jetty.ee8.demos.ee8-demo-mock-resources</Bundle-SymbolicName>
<Bundle-Description>Mock resources used for testing</Bundle-Description>
<Export-Package>org.example;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"</Export-Package>
<Import-Package>javax.sql, jakarta.transaction;version="1.3.3"</Import-Package>
<Import-Package>javax.sql, javax.transaction;version="1.3.3"</Import-Package>
<_nouses>true</_nouses>
</instructions>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<Bundle-SymbolicName>org.eclipse.jetty.ee8.demos.ee8-demo-servlet-container-initializer;singleton:=true</Bundle-SymbolicName>
<Bundle-Description>A bundle containing a ServletContainerInitializer for testing</Bundle-Description>
<Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
<Provide-Capability>osgi.serviceloader; osgi.serviceloader=jakarta.servlet.ServletContainerInitializer</Provide-Capability>
<Provide-Capability>osgi.serviceloader; osgi.serviceloader=javax.servlet.ServletContainerInitializer</Provide-Capability>
<Export-Package>org.example.initializer;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"</Export-Package>
<_nouses>true</_nouses>
</instructions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,13 @@
<instructions>
<Bundle-Description>Test Webapp for Servlet 5.0 Features</Bundle-Description>
<!-- TODO Add 'org.eclipse.jetty.util;version="[9.4.19,9.4.20)",' below, once 9.4.19 is released with a fix for #3726 -->
<Import-Package>jakarta.transaction*;version="2.0.0", jakarta.servlet*;version="[5,6)", org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))", org.eclipse.jetty.webapp;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional", org.eclipse.jetty.plus.jndi;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional", org.example;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}", *</Import-Package>
<Import-Package>javax.transaction*;version="[1.1,2.0)", javax.servlet*;version="[2.6,4.1)", org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))", org.eclipse.jetty.webapp;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional", org.eclipse.jetty.plus.jndi;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional", org.example;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}", *</Import-Package>
<_nouses></_nouses>
<Export-Package>org.example.test;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}";-noimport:=true</Export-Package>
<Web-ContextPath>/</Web-ContextPath>
<Bundle-ClassPath>.,WEB-INF/classes,WEB-INF/lib</Bundle-ClassPath>
<Jetty-ContextFilePath>/META-INF/plugin-context.xml</Jetty-ContextFilePath>
<Jetty-ContextFilePath>META-INF/plugin-context.xml</Jetty-ContextFilePath>
<Jetty-Environment>ee8</Jetty-Environment>
</instructions>
</configuration>
</plugin>
Expand Down
2 changes: 1 addition & 1 deletion jetty-ee8/jetty-ee8-jndi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>${osgi.slf4j.import.packages},jakarta.mail.*;resolution:=optional,*</Import-Package>
<Import-Package>${osgi.slf4j.import.packages},javax.mail.*;resolution:=optional,*</Import-Package>
</instructions>
</configuration>
</plugin>
Expand Down
Loading