From 8c4dd7ab05ce11bf242b1a215c06c72be823aa6b Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 13 Aug 2019 11:14:44 +1000 Subject: [PATCH] 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 --- .../eclipse/jetty/tests/distribution/CDITests.java | 11 ++++++----- .../test-cdi-common-webapp/src/main/webapp/index.html | 2 +- tests/test-webapps/test-owb-cdi-webapp/pom.xml | 2 +- .../WEB-INF/{jetty-web.xml => jetty-web-owb.xml} | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) rename tests/test-webapps/test-owb-cdi-webapp/src/main/webapp/WEB-INF/{jetty-web.xml => jetty-web-owb.xml} (82%) diff --git a/tests/test-distribution/src/test/java/org/eclipse/jetty/tests/distribution/CDITests.java b/tests/test-distribution/src/test/java/org/eclipse/jetty/tests/distribution/CDITests.java index a0e1b988940..79570423ea6 100644 --- a/tests/test-distribution/src/test/java/org/eclipse/jetty/tests/distribution/CDITests.java +++ b/tests/test-distribution/src/test/java/org/eclipse/jetty/tests/distribution/CDITests.java @@ -42,12 +42,13 @@ public class CDITests extends AbstractDistributionTest // Tests from here use these parameters public static Stream tests() { - Consumer removeJettyWebXml = d -> + Consumer 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)) { diff --git a/tests/test-webapps/test-cdi-common-webapp/src/main/webapp/index.html b/tests/test-webapps/test-cdi-common-webapp/src/main/webapp/index.html index 9beca9836d8..a1765080059 100644 --- a/tests/test-webapps/test-cdi-common-webapp/src/main/webapp/index.html +++ b/tests/test-webapps/test-cdi-common-webapp/src/main/webapp/index.html @@ -1,4 +1,4 @@ -

OWB CDI Test Webapp

+

CDI Test Webapp

CDI Info

diff --git a/tests/test-webapps/test-owb-cdi-webapp/pom.xml b/tests/test-webapps/test-owb-cdi-webapp/pom.xml index c81c088d78c..d20b4db280c 100644 --- a/tests/test-webapps/test-owb-cdi-webapp/pom.xml +++ b/tests/test-webapps/test-owb-cdi-webapp/pom.xml @@ -16,7 +16,7 @@ - weld-owb-demo + owb-cdi-demo diff --git a/tests/test-webapps/test-owb-cdi-webapp/src/main/webapp/WEB-INF/jetty-web.xml b/tests/test-webapps/test-owb-cdi-webapp/src/main/webapp/WEB-INF/jetty-web-owb.xml similarity index 82% rename from tests/test-webapps/test-owb-cdi-webapp/src/main/webapp/WEB-INF/jetty-web.xml rename to tests/test-webapps/test-owb-cdi-webapp/src/main/webapp/WEB-INF/jetty-web-owb.xml index 404e1bc09dc..4c5b8dcd533 100644 --- a/tests/test-webapps/test-owb-cdi-webapp/src/main/webapp/WEB-INF/jetty-web.xml +++ b/tests/test-webapps/test-owb-cdi-webapp/src/main/webapp/WEB-INF/jetty-web-owb.xml @@ -1,6 +1,6 @@ - +