Don't deploy MicroProfile additional endpoints if these are the only ones available in the deployment.
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/2bf908ec Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/2bf908ec Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/2bf908ec Branch: refs/heads/master Commit: 2bf908ec5078c62ab3f3b739012d1e57fb9bd3f5 Parents: 6bf08ca Author: Roberto Cortez <radcor...@yahoo.com> Authored: Thu Dec 20 01:31:22 2018 +0000 Committer: Roberto Cortez <radcor...@yahoo.com> Committed: Thu Dec 20 11:00:03 2018 +0000 ---------------------------------------------------------------------- .../apache/openejb/arquillian/tests/realm/SimpleEndpoint.java | 2 +- .../main/java/org/apache/openejb/server/rest/RESTService.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tomee/blob/2bf908ec/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/SimpleEndpoint.java ---------------------------------------------------------------------- diff --git a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/SimpleEndpoint.java b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/SimpleEndpoint.java index 39c10dc..1157436 100644 --- a/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/SimpleEndpoint.java +++ b/arquillian/arquillian-tomee-tests/arquillian-tomee-webprofile-tests/src/test/java/org/apache/openejb/arquillian/tests/realm/SimpleEndpoint.java @@ -23,7 +23,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -@WebServlet("/simple") +@WebServlet("/*") public class SimpleEndpoint extends HttpServlet { @Override protected void service(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException { http://git-wip-us.apache.org/repos/asf/tomee/blob/2bf908ec/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java ---------------------------------------------------------------------- diff --git a/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java b/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java index 43d65b4..d9dc64d 100644 --- a/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java +++ b/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java @@ -256,7 +256,10 @@ public abstract class RESTService implements ServerService, SelfManaging { } } - if (webApp.restApplications.isEmpty()) { + boolean isMicroProfileOnlyEndpoints = + webApp.restClass.stream().allMatch(name -> name.startsWith("org.apache.geronimo.microprofile")); + + if (webApp.restApplications.isEmpty() && !isMicroProfileOnlyEndpoints) { final Application application = new InternalApplication(null); for (final String clazz : webApp.restClass) { try {