Fix jetty-ee9-home build by enabling jetty-ee9-quickstart.

This commit is contained in:
Jan Bartel 2022-06-27 11:30:02 +10:00
parent 1999b39808
commit 80854f8eea
4 changed files with 18 additions and 18 deletions

View File

@ -117,11 +117,11 @@
<!-- <artifactId>jetty-ee9-proxy</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.eclipse.jetty.ee9</groupId>-->
<!-- <artifactId>jetty-ee9-quickstart</artifactId>-->
<!-- <version>${project.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-quickstart</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee9</groupId>
<artifactId>jetty-ee9-nested</artifactId>

View File

@ -77,7 +77,7 @@ public class TestQuickStart
fooHolder.setName("foo");
quickstart.getServletHandler().addServlet(fooHolder);
ListenerHolder lholder = new ListenerHolder();
lholder.setClassName("org.eclipse.jetty.quickstart.FooContextListener");
lholder.setClassName("org.eclipse.jetty.ee9.quickstart.FooContextListener");
quickstart.getServletHandler().addListener(lholder);
server.setHandler(quickstart);
server.setDryRun(true);
@ -89,7 +89,7 @@ public class TestQuickStart
WebAppContext webapp = new WebAppContext();
webapp.setResourceBase(testDir.getAbsolutePath());
webapp.addConfiguration(new QuickStartConfiguration());
webapp.getServerClassMatcher().exclude("org.eclipse.jetty.quickstart.");
webapp.getServerClassMatcher().exclude("org.eclipse.jetty.ee9.quickstart.");
webapp.setAttribute(QuickStartConfiguration.MODE, QuickStartConfiguration.Mode.QUICKSTART);
//add in the servlet
webapp.getServletHandler().addServlet(fooHolder);
@ -104,7 +104,7 @@ public class TestQuickStart
//verify that FooServlet is now mapped to / and not the DefaultServlet
ServletHolder sh = webapp.getServletHandler().getMappedServlet("/").getServletHolder();
assertNotNull(sh);
assertThat(sh.getClassName(), Matchers.equalTo("org.eclipse.jetty.quickstart.FooServlet"));
assertThat(sh.getClassName(), Matchers.equalTo("org.eclipse.jetty.ee9.quickstart.FooServlet"));
}
@Test
@ -139,7 +139,7 @@ public class TestQuickStart
webapp.addConfiguration(new QuickStartConfiguration());
quickstart.setAttribute(QuickStartConfiguration.MODE, QuickStartConfiguration.Mode.QUICKSTART);
webapp.setResourceBase(testDir.getAbsolutePath());
webapp.getServerClassMatcher().exclude("org.eclipse.jetty.quickstart.");
webapp.getServerClassMatcher().exclude("org.eclipse.jetty.ee9.quickstart.");
server.setHandler(webapp);
server.setDryRun(false);
@ -180,7 +180,7 @@ public class TestQuickStart
webapp.addConfiguration(new QuickStartConfiguration());
quickstart.setAttribute(QuickStartConfiguration.MODE, QuickStartConfiguration.Mode.QUICKSTART);
webapp.setResourceBase(testDir.getAbsolutePath());
webapp.getServerClassMatcher().exclude("org.eclipse.jetty.quickstart.");
webapp.getServerClassMatcher().exclude("org.eclipse.jetty.ee9.quickstart.");
server.setHandler(webapp);
server.setDryRun(false);
@ -255,7 +255,7 @@ public class TestQuickStart
//a freshly applied context xml
quickstart = new WebAppContext();
//need visibility of FooServlet, FooFilter, FooContextListener when we quickstart
quickstart.getServerClassMatcher().exclude("org.eclipse.jetty.quickstart.");
quickstart.getServerClassMatcher().exclude("org.eclipse.jetty.ee9.quickstart.");
quickstart.addConfiguration(new QuickStartConfiguration());
quickstart.setWar(testDir.toURI().toURL().toExternalForm());
quickstart.setDescriptor(MavenTestingUtils.getTestResourceFile("web.xml").getAbsolutePath());
@ -273,16 +273,16 @@ public class TestQuickStart
ServletHolder[] servlets = quickstart.getServletHandler().getServlets();
assertNotNull(servlets);
assertEquals(1,
Arrays.stream(servlets).filter(s -> "org.eclipse.jetty.quickstart.FooServlet".equals(s.getClassName())).count());
Arrays.stream(servlets).filter(s -> "org.eclipse.jetty.ee9.quickstart.FooServlet".equals(s.getClassName())).count());
FilterHolder[] filters = quickstart.getServletHandler().getFilters();
assertNotNull(filters);
assertEquals(1,
Arrays.stream(filters).filter(f -> "org.eclipse.jetty.quickstart.FooFilter".equals(f.getClassName())).count());
Arrays.stream(filters).filter(f -> "org.eclipse.jetty.ee9.quickstart.FooFilter".equals(f.getClassName())).count());
ListenerHolder[] listeners = quickstart.getServletHandler().getListeners();
assertNotNull(listeners);
assertEquals(1,
Arrays.stream(listeners).filter(l -> "org.eclipse.jetty.quickstart.FooContextListener".equals(l.getClassName())).count());
Arrays.stream(listeners).filter(l -> "org.eclipse.jetty.ee9.quickstart.FooContextListener".equals(l.getClassName())).count());
}
}

View File

@ -25,7 +25,7 @@ detected.
<Arg>
<New class="org.eclipse.jetty.ee9.servlet.ServletHolder">
<Set name="name">FooServlet</Set>
<Set name="className">org.eclipse.jetty.quickstart.FooServlet</Set>
<Set name="className">org.eclipse.jetty.ee9.quickstart.FooServlet</Set>
</New>
</Arg>
<Arg>/outer/*</Arg>
@ -34,7 +34,7 @@ detected.
<Call name="addFilterWithMapping">
<Arg>
<New class="org.eclipse.jetty.ee9.servlet.FilterHolder">
<Set name="className">org.eclipse.jetty.quickstart.FooFilter</Set>
<Set name="className">org.eclipse.jetty.ee9.quickstart.FooFilter</Set>
<Set name="name">OuterFilter</Set>
</New>
</Arg>
@ -46,7 +46,7 @@ detected.
<Arg>
<New class="org.eclipse.jetty.ee9.servlet.ListenerHolder">
<Set name="listener">
<New class="org.eclipse.jetty.quickstart.FooContextListener"></New>
<New class="org.eclipse.jetty.ee9.quickstart.FooContextListener"></New>
</Set>
</New>
</Arg>

View File

@ -65,7 +65,7 @@
<!-- <module>jetty-ee9-osgi</module>-->
<module>jetty-ee9-plus</module>
<!-- <module>jetty-ee9-proxy</module>-->
<!-- <module>jetty-ee9-quickstart</module>-->
<module>jetty-ee9-quickstart</module>
<!-- <module>jetty-ee9-runner</module>-->
<module>jetty-ee9-websocket</module>
<!-- <module>jetty-ee9-tests</module>-->