You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Richard Zowalla (Jira)" <ji...@apache.org> on 2024/12/16 07:52:00 UTC
[jira] [Closed] (TOMEE-4295) tomee-embedded-maven-plugin does not register microprofile endpoints
[ https://issues.apache.org/jira/browse/TOMEE-4295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Zowalla closed TOMEE-4295.
----------------------------------
Fix Version/s: (was: 10.0.0-M1)
(was: 9.1.3)
Resolution: Fixed
> tomee-embedded-maven-plugin does not register microprofile endpoints
> --------------------------------------------------------------------
>
> Key: TOMEE-4295
> URL: https://issues.apache.org/jira/browse/TOMEE-4295
> Project: TomEE
> Issue Type: Bug
> Affects Versions: 9.1.2
> Reporter: Markus Jung
> Assignee: Markus Jung
> Priority: Minor
> Fix For: 10.0.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> See this example pom.xml:
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>org.example</groupId>
> <artifactId>tomee-embedded-mp</artifactId>
> <version>1.0-SNAPSHOT</version>
> <packaging>war</packaging>
> <pluginRepositories>
> <pluginRepository>
> <id>apache-snapshots</id>
> <url>https://repository.apache.org/snapshots/</url>
> <releases>
> <enabled>false</enabled>
> </releases>
> <snapshots>
> <enabled>true</enabled>
> </snapshots>
> </pluginRepository>
> </pluginRepositories>
> <properties>
> <maven.compiler.source>17</maven.compiler.source>
> <maven.compiler.target>17</maven.compiler.target>
> <tomee.version>9.1.3-SNAPSHOT</tomee.version>
> </properties>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.tomee.maven</groupId>
> <artifactId>tomee-embedded-maven-plugin</artifactId>
> <version>${tomee.version}</version>
> <configuration>
> <containerProperties>
> <tomee.mp.scan>true</tomee.mp.scan>
> </containerProperties>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.apache.tomee</groupId>
> <artifactId>mp-common</artifactId>
> <version>${tomee.version}</version>
> </dependency>
> </dependencies>
> </plugin>
> </plugins>
> </build>
> </project>
> {code}
> No endpoints are logged in TomEE 9.1.2 (and 9.1.3-SNAPSHOT as well as 10.0.0-M1-SNAPSHOT), trying to access those paths results in a 404
>
> When deploying this .war to a normal TomEE microprofile build these endpoints are being registered:
> {code:java}
> 30-Jan-2024 12:53:28.542 INFO [main] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints REST Application: http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/ -> org.apache.openejb.server.rest.InternalApplica
> tion@208185c0
> 30-Jan-2024 12:53:28.544 INFO [main] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints Service URI: http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/health -> Pojo org.apache.tomee.microprofile.health.Micr
> oProfileHealthChecksEndpoint
> 30-Jan-2024 12:53:28.544 INFO [main] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints GET http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/health -> Response getChecks()
> 30-Jan-2024 12:53:28.544 INFO [main] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints GET http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/health/live -> Response getLiveChecks()
> 30-Jan-2024 12:53:28.544 INFO [main] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints GET http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/health/ready -> Response getReadyChecks()
> 30-Jan-2024 12:53:28.544 INFO [main] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints GET http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/health/started -> Response getStartedChecks()
> {code}
>
> For comparison, this is being registered in TomEE 8.0.16:
> {code:java}
> [INFO] REST Application: http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/ -> org.apache.openejb.server.rest.InternalApplication@4928a347
> [INFO] Service URI: http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/health -> Pojo org.apache.geronimo.microprofile.impl.health.cdi.CdiHealthChecksEndpoint
> [INFO] GET http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/health -> Response getChecks()
> [INFO] Service URI: http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/metrics -> Pojo org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints
> [INFO] GET http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/metrics -> Object getJson(SecurityContext, UriInfo)
> [INFO] GET http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/metrics -> String getText(SecurityContext, UriInfo)
> [INFO] GET http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/metrics/{registry} -> Object getJson(String, SecurityContext, UriInfo)
> [INFO] GET http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/metrics/{registry} -> String getText(String, SecurityContext, UriInfo)
> [INFO] GET http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/metrics/{registry}/{metric} -> Object getJson(String, String, SecurityContext, UriInfo)
> [INFO] GET http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/metrics/{registry}/{metric} -> String getText(String, String, SecurityContext, UriInfo)
> [INFO] OPTIONS http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/metrics/{registry} -> Object getMetadata(String, SecurityContext, UriInfo)
> [INFO] OPTIONS http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/metrics/{registry}/{metric} -> Object getMetadata(String, String, SecurityContext, UriInfo)
> [INFO] Service URI: http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/openapi -> Pojo org.apache.geronimo.microprofile.openapi.jaxrs.OpenAPIEndpoint
> [INFO] GET http://localhost:8080/tomee-embedded-mp-1.0-SNAPSHOT/openapi -> OpenAPI get()
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)