Fixed decoration changes for #3804

Fixed bad names in OWB webapp.
Don't have the owb jetty-web.xml on by default.

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2019-08-13 11:14:44 +10:00
parent 46e1896322
commit 8c4dd7ab05
4 changed files with 9 additions and 8 deletions

View File

@ -42,12 +42,13 @@ public class CDITests extends AbstractDistributionTest
// Tests from here use these parameters
public static Stream<Arguments> tests()
{
Consumer<DistributionTester> removeJettyWebXml = d ->
Consumer<DistributionTester> renameJettyWebOwbXml = d ->
{
try
{
Path jettyWebOwbXml = d.getJettyBase().resolve("webapps/demo/WEB-INF/jetty-web-owb.xml");
Path jettyWebXml = d.getJettyBase().resolve("webapps/demo/WEB-INF/jetty-web.xml");
Files.deleteIfExists(jettyWebXml);
Files.move(jettyWebOwbXml, jettyWebXml);
}
catch(IOException e)
{
@ -63,8 +64,8 @@ public class CDITests extends AbstractDistributionTest
// TODO Arguments.of("weld", "cdi-decorate", null), // Weld >= 3.1.3
// -- Apache OpenWebBeans --
Arguments.of("owb", "cdi-spi", removeJettyWebXml),
Arguments.of("owb", "cdi2", null)
Arguments.of("owb", "cdi-spi", null),
Arguments.of("owb", "jsp", renameJettyWebOwbXml)
// Arguments.of("owb", "decorate", null), // Not supported
// Arguments.of("owb", "cdi-decorate", null) // Not supported
);
@ -87,7 +88,7 @@ public class CDITests extends AbstractDistributionTest
String[] args1 = {
"--create-startd",
"--approve-all-licenses",
"--add-to-start=http,deploy,annotations,jsp,"+integration
"--add-to-start=http,deploy,annotations,jsp" + (integration==null?"":(","+integration))
};
try (DistributionTester.Run run1 = distribution.start(args1))
{

View File

@ -1,4 +1,4 @@
<H1>OWB CDI Test Webapp</H1>
<H1>CDI Test Webapp</H1>
<H2>CDI Info</H2>
<iframe src="info" width="100%" height="60%"></iframe>

View File

@ -16,7 +16,7 @@
</properties>
<build>
<finalName>weld-owb-demo</finalName>
<finalName>owb-cdi-demo</finalName>
</build>
<dependencies>

View File

@ -1,6 +1,6 @@
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
<Configure id="wac" class="org.eclipse.jetty.webapp.WebAppContext">
<!-- This file is only needed for cdi2 integration and should be removed if using the cdi module -->
<!-- Rename this file to jetty-web.xml if the cdi-spi module is not used-->
<Get id="wal" name="classLoader"/>
<Get id="objf" name="objectFactory">
<Call name="addDecorator">