diff --git a/appserver/tests/embedded/maven-plugin/applicationDispatcher/pom.xml b/appserver/tests/embedded/maven-plugin/applicationDispatcher/pom.xml index 54bfeeb6b3c..c104a4ed8f0 100644 --- a/appserver/tests/embedded/maven-plugin/applicationDispatcher/pom.xml +++ b/appserver/tests/embedded/maven-plugin/applicationDispatcher/pom.xml @@ -1,6 +1,7 @@ - - start - pre-integration-test - - start - - - - - admin - pre-integration-test - - admin - - - - list-applications - - - - - - deploy - pre-integration-test - - deploy - - - - - deploy2 - pre-integration-test - - deploy - - - secondapp/secondapp.war - secondapp - secondapp - - --verify=true - - - - - - undeploy - post-integration-test - - undeploy - - - secondapp - - - - - stop - post-integration-test - - undeploy - stop - - - - - - + + + start-embedded + + + !skipTests + + + + + + org.glassfish.embedded + maven-embedded-glassfish-plugin + + + + start + pre-integration-test + + start + + + + + admin + pre-integration-test + + admin + + + + list-applications + + + + + + deploy + pre-integration-test + + deploy + + + + + deploy2 + pre-integration-test + + deploy + + + secondapp/secondapp.war + secondapp + secondapp + + --verify=true + + + + + + undeploy + post-integration-test + + undeploy + + + secondapp + + + + + stop + post-integration-test + + undeploy + stop + + + + + + + + @@ -117,8 +128,8 @@ jakarta.servlet-api - junit - junit + org.junit.jupiter + junit-jupiter-engine diff --git a/appserver/tests/embedded/maven-plugin/multipleApps/secondapp/secondapp.war b/appserver/tests/embedded/maven-plugin/multipleApps/secondapp/secondapp.war index e0644e909ea..de3472cdf88 100644 Binary files a/appserver/tests/embedded/maven-plugin/multipleApps/secondapp/secondapp.war and b/appserver/tests/embedded/maven-plugin/multipleApps/secondapp/secondapp.war differ diff --git a/appserver/tests/embedded/maven-plugin/multipleApps/src/test/java/org/glassfish/tests/embedded/jsptest/JspTest.java b/appserver/tests/embedded/maven-plugin/multipleApps/src/test/java/org/glassfish/tests/embedded/jsptest/JspTest.java index 6c09329848c..0c0fa513e1c 100644 --- a/appserver/tests/embedded/maven-plugin/multipleApps/src/test/java/org/glassfish/tests/embedded/jsptest/JspTest.java +++ b/appserver/tests/embedded/maven-plugin/multipleApps/src/test/java/org/glassfish/tests/embedded/jsptest/JspTest.java @@ -1,4 +1,5 @@ /* + * Copyright (c) 2023 Contributors to the Eclipse Foundation. * Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved. * * This program and the accompanying materials are made available under the @@ -16,9 +17,9 @@ package org.glassfish.tests.embedded.jsptest; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLContext; @@ -29,7 +30,6 @@ import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; -import java.net.URLConnection; import java.security.SecureRandom; import java.security.cert.X509Certificate; @@ -40,7 +40,7 @@ public class JspTest { private String contextPath = "test"; - @BeforeClass + @BeforeAll public static void setup() throws IOException { } @@ -80,7 +80,7 @@ private static void goGet(String url, String result) throws Exception { found = true; } } - Assert.assertTrue(found); + Assertions.assertTrue(found); System.out.println("\n***** SUCCESS **** Found [" + result + "] in the response.*****\n"); in.close(); } catch (Exception e) { diff --git a/appserver/tests/embedded/maven-plugin/pom.xml b/appserver/tests/embedded/maven-plugin/pom.xml index c1950e7270a..ad8f62a6683 100644 --- a/appserver/tests/embedded/maven-plugin/pom.xml +++ b/appserver/tests/embedded/maven-plugin/pom.xml @@ -1,6 +1,7 @@ sessionDestroyed standalonewar - websockets - webservice + + secureWebApp jsptest - jsftest - localejbs + + + + + + multipleApps @@ -76,11 +87,11 @@ queryString sessionDestroyed standalonewar - websockets - webservice + + secureWebApp jsptest - jsftest + localejbs multipleApps @@ -104,11 +115,11 @@ queryString sessionDestroyed standalonewar - websockets - webservice + + secureWebApp jsptest - jsftest + localejbs multipleApps @@ -124,48 +135,27 @@ maven-surefire-plugin - 2.12 true - 0 - - - - integration-test - - test - - - false - 0 - - target/classes - - - - - - - maven-compiler-plugin - 2.5.1 - - 1.6 - 1.6 - maven-war-plugin - 2.3 + maven-failsafe-plugin - false + 1 + + target/classes + + + **/*Test.java + org.glassfish.embedded maven-embedded-glassfish-plugin - 5.0 + 5.1 - glassfish target/${project.artifactId}.war 8080 ${project.artifactId} @@ -174,6 +164,9 @@ 8181 + + com.sun.enterprise.naming.allowJndiLookupFromOSGi=false + @@ -199,53 +192,6 @@ maven-plugin-api 3.3.9 - - jakarta.servlet - jakarta.servlet-api - 4.0.0 - provided - - - junit - junit - 4.13.2 - - - jakarta.faces - jakarta.faces-api - 2.3.1 - provided - - - jakarta.ejb - jakarta.ejb-api - 3.2.5 - provided - - - org.glassfish.main.extras - glassfish-embedded-all - ${project.version} - test - - - org.glassfish.grizzly - grizzly-websockets - 2.1 - provided - - - org.glassfish.grizzly - grizzly-http-servlet - 2.4.3 - provided - - - jakarta.jms - jakarta.jms-api - provided - 3.0.0-RC1 - diff --git a/appserver/tests/embedded/maven-plugin/queryString/pom.xml b/appserver/tests/embedded/maven-plugin/queryString/pom.xml index 3965a7afda2..5a41c3b8e3a 100644 --- a/appserver/tests/embedded/maven-plugin/queryString/pom.xml +++ b/appserver/tests/embedded/maven-plugin/queryString/pom.xml @@ -1,6 +1,7 @@ - - - 4.0.0 - - org.glassfish.tests.embedded - maven-plugin - 7.0.9-SNAPSHOT - - org.glassfish - scattered - pom - - Maven deploy test - - - - - org.glassfish.embedded - maven-embedded-glassfish-plugin - - src/main/web - - - - install - - runscatteredarchive - - - - - - - - - - org.apache.maven - maven-plugin-api - - - - diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/FilterTest.java b/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/FilterTest.java deleted file mode 100755 index eec957ed9a7..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/FilterTest.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package test; - -import jakarta.servlet.*; -import jakarta.servlet.http.*; -public class FilterTest implements Filter{ - - private ServletContext context; - - public void destroy() { - System.out.println("[Filter.destroy]"); - } - - public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws java.io.IOException, jakarta.servlet.ServletException { - System.out.println("[Filter.doFilter]"); - - ((HttpServletRequest)request).getSession().setAttribute("FILTER", "PASS"); - filterChain.doFilter(request, response); - - } - - - public void init(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException { - System.out.println("[Filter.init]"); - context = filterConfig.getServletContext(); - } - -} diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest.java b/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest.java deleted file mode 100644 index daa80533003..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import org.xml.sax.InputSource; -import org.w3c.dom.Element; -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.w3c.dom.Node; - -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.SAXException; - -// jaxp 1.0.1 imports -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.DocumentBuilder; - -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; - -import javax.naming.*; -import javax.sql.*; -import java.sql.*; - -public class ServletTest extends HttpServlet implements HttpSessionListener { - - private ServletContext context; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet.init]"); - context = config.getServletContext(); - System.out.println("[Servlet.init] " + context.getMajorVersion()); - - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet.doPost]"); - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - request.getSession().setAttribute("FILTER-REQUEST", request.getSession().getAttribute("FILTER")); - request.getSession().setAttribute("FILTER", "FAIL"); - - RequestDispatcher rd = context.getRequestDispatcher("/ServletTest2"); - rd.forward(request, response); - } - - public void sessionCreated(jakarta.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionCreated]"); - } - - public void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionDestroyed]"); - System.out.println("Attributes: " + httpSessionEvent.getSession().getAttribute("test")); - } -} - - - diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest2.java b/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest2.java deleted file mode 100755 index 00775a60df3..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest2.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; - -public class ServletTest2 extends HttpServlet implements HttpSessionListener { - - private ServletContext context; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet2.init]"); - context = config.getServletContext(); - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet2.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet2.doPost]"); - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - request.getSession().setAttribute("FILTER-FORWARD",request.getSession().getAttribute("FILTER")); - request.getSession().setAttribute("FILTER", "FAIL"); - - RequestDispatcher rd = request.getRequestDispatcher("/ServletTest3"); - rd.include(request, response); - } - - public void sessionCreated(jakarta.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionCreated]"); - } - - public void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent httpSessionEvent) { - System.out.println("[Servlet.sessionDestroyed]"); - System.out.println("Attributes: " + httpSessionEvent.getSession().getAttribute("test")); - } - -} - - diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest3.java b/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest3.java deleted file mode 100644 index e78fec2a752..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/java/test/ServletTest3.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package test; - -import java.io.*; -import java.net.*; -import java.util.*; -import jakarta.servlet.*; -import jakarta.servlet.http.*; -import org.xml.sax.InputSource; -import org.w3c.dom.Element; -import org.w3c.dom.Document; -import org.w3c.dom.NodeList; -import org.w3c.dom.Node; - -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.SAXException; - -// jaxp 1.0.1 imports -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.DocumentBuilder; - -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; - -import javax.naming.*; -import javax.sql.*; -import java.sql.*; - -public class ServletTest3 extends HttpServlet{ - - private ServletContext context; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - System.out.println("[Servlet3.init]"); - context = config.getServletContext(); - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet3.doGet]"); - doPost(request, response); - } - - public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - System.out.println("[Servlet3.doPost]"); - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - out.println("FILTER-REQUEST:" + request.getSession().getAttribute("FILTER-REQUEST")); - out.println("FILTER-FORWARD:" + request.getSession().getAttribute("FILTER-FORWARD")); - out.println("FILTER-INCLUDE:" + request.getSession().getAttribute("FILTER")); - } - -} - - - diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/WEB-INF/sun-web.xml b/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/WEB-INF/sun-web.xml deleted file mode 100644 index fd6410d5916..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/WEB-INF/sun-web.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - -tomcat-test - - - tomcat - tomcat - tomcat - - - - diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/WEB-INF/web.xml b/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 1f84ceeee85..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - FilterTest - test.FilterTest - - - - FilterTest - /* - REQUEST - INCLUDE - FORWARD - ERROR - - - - ServletTest - ServletTest - test.ServletTest - - - ServletTest2 - ServletTest2 - test.ServletTest2 - - - ServletTest3 - ServletTest3 - test.ServletTest3 - - - - ServletTest - /ServletTest - - - ServletTest2 - /ServletTest2 - - - ServletTest3 - /ServletTest3 - - - - 10 - - - - diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/index.html b/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/index.html deleted file mode 100755 index ab4b311ccbd..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - -Hello World! - diff --git a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/index.jsp b/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/index.jsp deleted file mode 100644 index c52acd1b754..00000000000 --- a/appserver/tests/embedded/maven-plugin/scattered/src/main/webapp/index.jsp +++ /dev/null @@ -1,24 +0,0 @@ -<%-- - - Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved. - - This program and the accompanying materials are made available under the - terms of the Eclipse Public License v. 2.0, which is available at - http://www.eclipse.org/legal/epl-2.0. - - This Source Code may also be made available under the following Secondary - Licenses when the conditions for such availability set forth in the - Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - version 2 with the GNU Classpath Exception, which is available at - https://www.gnu.org/software/classpath/license.html. - - SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - ---%> - - - - -

<% out.print("Hello World!"); %>

- - diff --git a/appserver/tests/embedded/maven-plugin/secureWebApp/pom.xml b/appserver/tests/embedded/maven-plugin/secureWebApp/pom.xml index b38c3a5fb39..bd921e242c7 100644 --- a/appserver/tests/embedded/maven-plugin/secureWebApp/pom.xml +++ b/appserver/tests/embedded/maven-plugin/secureWebApp/pom.xml @@ -1,6 +1,7 @@ + maven-plugin web utils diff --git a/appserver/tests/pom.xml b/appserver/tests/pom.xml index 8136358631f..3d6246ac119 100755 --- a/appserver/tests/pom.xml +++ b/appserver/tests/pom.xml @@ -121,6 +121,7 @@ admin application appserv-tests + embedded @@ -140,6 +141,7 @@ admin application appserv-tests + embedded tck diff --git a/appserver/tests/sse/basic/pom.xml b/appserver/tests/sse/basic/pom.xml index df598f5d10c..8bf2c1b704c 100644 --- a/appserver/tests/sse/basic/pom.xml +++ b/appserver/tests/sse/basic/pom.xml @@ -103,7 +103,6 @@ maven-embedded-glassfish-plugin 3.1.1 - glassfish ${project.build.directory}/${build.finalName}.war 8080 ${project.artifactId} diff --git a/appserver/tests/sse/videoplayer/pom.xml b/appserver/tests/sse/videoplayer/pom.xml index 55dcc2576cd..6ba3da9414e 100644 --- a/appserver/tests/sse/videoplayer/pom.xml +++ b/appserver/tests/sse/videoplayer/pom.xml @@ -103,7 +103,6 @@ maven-embedded-glassfish-plugin 3.1.1 - glassfish ${project.build.directory}/${build.finalName}.war 8080 ${project.artifactId} diff --git a/docs/embedded-server-guide/src/main/asciidoc/embedded-server-guide.adoc b/docs/embedded-server-guide/src/main/asciidoc/embedded-server-guide.adoc index 3a89ff2b019..b621c2bc06f 100644 --- a/docs/embedded-server-guide/src/main/asciidoc/embedded-server-guide.adoc +++ b/docs/embedded-server-guide/src/main/asciidoc/embedded-server-guide.adoc @@ -1077,8 +1077,7 @@ version:: of {productName}. You can specify the version you want to use. If no version is specified, a default version is used. -2. Configure the `embedded-glassfish` goal prefix, the application -name, and other standard settings. +2. Configure the the path to the application WAR, and other standard settings. + Add the following `configuration` element to your POM file: + @@ -1090,8 +1089,6 @@ Add the following `configuration` element to your POM file: ... - embedded-glassfish - ... target/test.war 8080 test @@ -1121,7 +1118,6 @@ Add the following `configuration` element to your POM file: ... - embedded-glassfish target/test.war test test @@ -1227,7 +1223,6 @@ http://maven.apache.org/maven-v4_0_0.xsd"> maven-embedded-glassfish-plugin 3.1 - embedded-glassfish target/test.war 8080 test diff --git a/nucleus/parent/pom.xml b/nucleus/parent/pom.xml index 9c25ce1977b..e1abf6c960a 100644 --- a/nucleus/parent/pom.xml +++ b/nucleus/parent/pom.xml @@ -82,13 +82,13 @@ 8.0.1.Final - + 4.0.0 - Jakarta SOAP (with Attachments) - 3.0.0-RC2 - --> + 4.0.2 @@ -248,6 +248,11 @@ webservices-extra-jdk-packages ${webservices.version} + + jakarta.xml.ws + jakarta.xml.ws-api + ${jakarta.xml.ws-api.version} + @@ -871,8 +876,8 @@ 1 - **/*ITest.java - **/*IT.java + **/*ITest.java + **/*IT.java ${test.logManager} @@ -893,8 +898,8 @@ true - **/*ITest.java - **/*IT.java + **/*ITest.java + **/*IT.java ${test.logManager} @@ -1099,13 +1104,13 @@ + Note that we actually want to specify the version per artefact, but this is currently + broken. + See https://github.com/mojohaus/versions/issues/258#issuecomment-1438149133 + --> 3.2-b..,2.5.0-b..,5.0-jdk8-rc.,20030911,10.0-b..