From 7cb8274236e99107b3e0c325e1d088bc68abdf29 Mon Sep 17 00:00:00 2001 From: Mark Struberg Date: Sun, 13 Oct 2024 20:38:26 +0200 Subject: [PATCH] OWB-1446 start tomcat via cargo --- pom.xml | 6 - samples/pom.xml | 5 + webbeans-tomcat/pom.xml | 2 +- webbeans-tomcat/src/it/fatwar/pom.xml | 243 ++++-------- .../web/tomcat7/test/OwbTomcatPluginIT.java | 6 +- .../src/it/servletinjection/pom.xml | 353 ++++++++---------- .../web/tomcat7/test/OwbTomcatPluginIT.java | 2 +- webbeans-web/src/it/webcdiapp/pom.xml | 3 +- 8 files changed, 246 insertions(+), 374 deletions(-) diff --git a/pom.xml b/pom.xml index d0f3cf067..3ba15edcb 100644 --- a/pom.xml +++ b/pom.xml @@ -762,12 +762,6 @@ jakarta.enterprise jakarta.enterprise.cdi-api ${jakarta.cdi-api.version} - - - jakarta.inject - jakarta.inject-api - - diff --git a/samples/pom.xml b/samples/pom.xml index db2eeddef..50ca87752 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -41,6 +41,11 @@ under the License. org.codehaus.cargo cargo-maven3-plugin + + + + + diff --git a/webbeans-tomcat/pom.xml b/webbeans-tomcat/pom.xml index 5d5a0ff31..b8d9ae966 100644 --- a/webbeans-tomcat/pom.xml +++ b/webbeans-tomcat/pom.xml @@ -65,7 +65,7 @@ org.apache.openwebbeans openwebbeans-el22 - true + true junit diff --git a/webbeans-tomcat/src/it/fatwar/pom.xml b/webbeans-tomcat/src/it/fatwar/pom.xml index 0ac416580..3d0426622 100644 --- a/webbeans-tomcat/src/it/fatwar/pom.xml +++ b/webbeans-tomcat/src/it/fatwar/pom.xml @@ -25,14 +25,13 @@ org.apache.openwebbeans.it - openwebbeans-tomcat7-it-fatwar + openwebbeans-tomcat-it-fatwar @project.version@ war - Tomcat 7 plugin IT + Tomcat plugin IT 9082 - 1.2 Development @@ -45,29 +44,23 @@ - org.apache.geronimo.specs - geronimo-servlet_3.0_spec - 1.0 + org.apache.tomcat + tomcat-servlet-api provided - org.apache.geronimo.specs - geronimo-jcdi_2.0_spec - compile + jakarta.enterprise + jakarta.enterprise.cdi-api - - org.apache.geronimo.specs - geronimo-atinject_1.0_spec - compile + jakarta.inject + jakarta.inject-api jakarta.interceptor jakarta.interceptor-api - ${geronimo_interceptor.version} - runtime @@ -85,157 +78,38 @@ org.apache.openwebbeans - openwebbeans-tomcat7 + openwebbeans-tomcat @project.version@ runtime + + jakarta.servlet.jsp.jstl + jakarta.servlet.jsp.jstl-api + 3.0.2 + + + org.glassfish.web + jakarta.servlet.jsp.jstl + 2.0.0 + + - owbtomcat7it + owbTomcatIt src/main/resources true - - - - - org.apache.tomcat.maven - tomcat7-maven-plugin - 2.2 - - - jstl - jstl - ${jstl.version} - - - - - org.apache.tomcat.embed - tomcat-embed-core - ${tomcat7.version} - - - org.apache.tomcat - tomcat-util - ${tomcat7.version} - - - org.apache.tomcat - tomcat-coyote - ${tomcat7.version} - - - org.apache.tomcat - tomcat-api - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-jdbc - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-dbcp - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-servlet-api - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-jsp-api - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-jasper - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-jasper-el - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-el-api - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-catalina - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-tribes - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-catalina-ha - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-annotations-api - ${tomcat7.version} - - - - - - - org.apache.tomcat - tomcat-juli - ${tomcat7.version} - - - - org.apache.tomcat.embed - tomcat-embed-logging-juli - ${tomcat7.version} - - - org.apache.tomcat.embed - tomcat-embed-logging-log4j - ${tomcat7.version} - - - - - - - org.apache.maven.plugins maven-failsafe-plugin - 2.11 + 3.2.5 integration-test @@ -253,36 +127,83 @@ - org.apache.tomcat.maven - tomcat7-maven-plugin - 2.2 + org.codehaus.cargo + cargo-maven3-plugin - /${project.build.finalName} - true - ${tomcat.port.it} - true - - ${projectStage} - ${projectStage} - + + tomcat10x + + org.apache.tomcat + tomcat + ${tomcat.version} + + + + + war + ${project.build.directory}/${project.build.finalName}.war + + /${project.build.finalName} + + + + + + ${tomcat.port.it} + + start-tomcat pre-integration-test - run-war + start stop-tomcat post-integration-test - shutdown + stop + + diff --git a/webbeans-tomcat/src/it/fatwar/src/test/java/org/apache/webbeans/web/tomcat7/test/OwbTomcatPluginIT.java b/webbeans-tomcat/src/it/fatwar/src/test/java/org/apache/webbeans/web/tomcat7/test/OwbTomcatPluginIT.java index e726d0e79..829005574 100644 --- a/webbeans-tomcat/src/it/fatwar/src/test/java/org/apache/webbeans/web/tomcat7/test/OwbTomcatPluginIT.java +++ b/webbeans-tomcat/src/it/fatwar/src/test/java/org/apache/webbeans/web/tomcat7/test/OwbTomcatPluginIT.java @@ -39,16 +39,16 @@ public void testTomcatRequest() throws Exception { // Get the response - String response = getResponse("http://localhost:9082/owbtomcat7it/test.test"); + String response = getResponse("http://localhost:9082/owbTomcatIt/test.test"); Assert.assertEquals(":thumb_up:", response); } { - String response = getResponse("http://localhost:9082/owbtomcat7it/test.test?action=setRequest&val=3500"); + String response = getResponse("http://localhost:9082/owbTomcatIt/test.test?action=setRequest&val=3500"); Assert.assertEquals("3600", response); } { - String response = getResponse("http://localhost:9082/owbtomcat7it/test.test?action=setSession&val=500"); + String response = getResponse("http://localhost:9082/owbTomcatIt/test.test?action=setSession&val=500"); Assert.assertEquals("500", response); } } diff --git a/webbeans-tomcat/src/it/servletinjection/pom.xml b/webbeans-tomcat/src/it/servletinjection/pom.xml index f31619e9a..166a9beaa 100644 --- a/webbeans-tomcat/src/it/servletinjection/pom.xml +++ b/webbeans-tomcat/src/it/servletinjection/pom.xml @@ -38,10 +38,80 @@ + + + jakarta.inject + jakarta.inject-api + provided + + + jakarta.enterprise + jakarta.enterprise.cdi-api + provided + + + jakarta.interceptor + jakarta.interceptor-api + ${jakarta.interceptor-api.version} + + + + + org.apache.openwebbeans + openwebbeans-spi + ${project.version} + provided + + + org.apache.openwebbeans + openwebbeans-impl + ${project.version} + provided + + + org.apache.openwebbeans + openwebbeans-web + ${project.version} + provided + + + org.apache.openwebbeans + openwebbeans-el22 + @project.version@ + provided + + + org.apache.openwebbeans + openwebbeans-tomcat + @project.version@ + provided + + + org.apache.xbean + xbean-finder-shaded + ${xbean.version} + + + org.apache.xbean + xbean-asm9-shaded + ${xbean.version} + + + org.ow2.asm + asm + + + org.ow2.asm + asm-commons + + + + + + junit junit - 4.13.1 test @@ -51,210 +121,28 @@ ${httpclient.version} test - - - jakarta.enterprise - jakarta.enterprise.cdi-api - - - - jakarta.inject - jakarta.inject-api - - - org.apache.geronimo.specs - geronimo-servlet_3.0_spec - 1.0 + org.apache.tomcat + tomcat-servlet-api provided + - owbtomcat7it + owbTomcatIt src/main/resources true - - - - - org.apache.tomcat.maven - tomcat7-maven-plugin - 2.2 - - - jstl - jstl - ${jstl.version} - - - - - org.apache.tomcat.embed - tomcat-embed-core - ${tomcat7.version} - - - org.apache.tomcat - tomcat-util - ${tomcat7.version} - - - org.apache.tomcat - tomcat-coyote - ${tomcat7.version} - - - org.apache.tomcat - tomcat-api - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-jdbc - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-dbcp - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-servlet-api - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-jsp-api - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-jasper - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-jasper-el - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-el-api - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-catalina - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-tribes - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-catalina-ha - ${tomcat7.version} - - - - org.apache.tomcat - tomcat-annotations-api - ${tomcat7.version} - - - - - - - org.apache.tomcat - tomcat-juli - ${tomcat7.version} - - - - org.apache.tomcat.embed - tomcat-embed-logging-juli - ${tomcat7.version} - - - org.apache.tomcat.embed - tomcat-embed-logging-log4j - ${tomcat7.version} - - - - org.apache.openwebbeans - openwebbeans-spi - @project.version@ - - - - org.apache.openwebbeans - openwebbeans-impl - @project.version@ - - - org.apache.openwebbeans - openwebbeans-web - @project.version@ - - - - org.apache.openwebbeans - openwebbeans-tomcat7 - @project.version@ - - - - jakarta.annotation - jakarta.annotation-api - - - jakarta.inject - jakarta.inject-api - - - jakarta.enterprise - jakarta.enterprise.cdi-api - - - jakarta.interceptor - jakarta.interceptor-api - test - - - - - - org.apache.maven.plugins maven-failsafe-plugin - 2.11 integration-test @@ -271,37 +159,102 @@ + - org.apache.tomcat.maven - tomcat7-maven-plugin - 2.2 + org.codehaus.cargo + cargo-maven3-plugin - /${project.build.finalName} - true - ${tomcat.port.it} - true - - ${projectStage} - ${projectStage} - + + tomcat10x + + org.apache.tomcat + tomcat + ${tomcat.version} + + + ${projectStage} + ${projectStage} + + + + + jakarta.enterprise + jakarta.enterprise.cdi-api + + + jakarta.inject + jakarta.inject-api + + + jakarta.interceptor + jakarta.interceptor-api + + + + org.apache.openwebbeans + openwebbeans-spi + + + org.apache.openwebbeans + openwebbeans-impl + + + org.apache.openwebbeans + openwebbeans-web + + + org.apache.openwebbeans + openwebbeans-el22 + + + org.apache.openwebbeans + openwebbeans-tomcat + + + org.apache.xbean + xbean-finder-shaded + + + org.apache.xbean + xbean-asm9-shaded + + + + + + + ${tomcat.port.it} + + + + + war + ${project.build.directory}/${project.build.finalName}.war + + /${project.build.finalName} + + + start-tomcat pre-integration-test - run-war + start stop-tomcat post-integration-test - shutdown + stop + + diff --git a/webbeans-tomcat/src/it/servletinjection/src/test/java/org/apache/webbeans/web/tomcat7/test/OwbTomcatPluginIT.java b/webbeans-tomcat/src/it/servletinjection/src/test/java/org/apache/webbeans/web/tomcat7/test/OwbTomcatPluginIT.java index 8fd372ecf..44db7e739 100644 --- a/webbeans-tomcat/src/it/servletinjection/src/test/java/org/apache/webbeans/web/tomcat7/test/OwbTomcatPluginIT.java +++ b/webbeans-tomcat/src/it/servletinjection/src/test/java/org/apache/webbeans/web/tomcat7/test/OwbTomcatPluginIT.java @@ -39,7 +39,7 @@ public class OwbTomcatPluginIT public void testTomcatRequest() throws Exception { DefaultHttpClient httpclient = new DefaultHttpClient(); - HttpGet httpGet = new HttpGet("http://localhost:9081/owbtomcat7it/test.test"); + HttpGet httpGet = new HttpGet("http://localhost:9081/owbTomcatIt/test.test"); HttpResponse response = httpclient.execute(httpGet); diff --git a/webbeans-web/src/it/webcdiapp/pom.xml b/webbeans-web/src/it/webcdiapp/pom.xml index 989e5b2f4..a57ae8e62 100644 --- a/webbeans-web/src/it/webcdiapp/pom.xml +++ b/webbeans-web/src/it/webcdiapp/pom.xml @@ -120,7 +120,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 2.11 + 3.2.5 integration-test @@ -180,7 +180,6 @@ -