But if I put same project into an EAR and deploy as EAR, then health endpoints only give the default checks. So it seems maybe we need to configure more to make it work inside EAR.
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>microprofile-health-ear</artifactId>
<packaging>ear</packaging>
<parent>
<groupId>org.wildfly.quickstarts</groupId>
<artifactId>quickstart-parent</artifactId>
<version>23.0.2.Final</version>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<outputFileNameMapping>@{artifactId}@-@{version}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>
<modules>
<webModule>
<groupId>org.wildfly.quickstarts</groupId>
<artifactId>microprofile-health</artifactId>
</webModule>
</modules>
<applicationName>${project.artifactId}</applicationName>
<archive>
<manifestEntries>
<Dependencies>javax.enterprise.api,org.eclipse.microprofile.health.api</Dependencies>
</manifestEntries>
</archive>
<defaultLibBundleDir>lib/</defaultLibBundleDir>
<skinnyWars>true</skinnyWars>
<version>8</version>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.wildfly.quickstarts</groupId>
<artifactId>microprofile-health</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
</dependencies>
</project>