Skip to content

Commit

Permalink
update project
Browse files Browse the repository at this point in the history
  • Loading branch information
fmarchioni committed Feb 26, 2024
1 parent ff903a2 commit 78e2080
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 134 deletions.
3 changes: 3 additions & 0 deletions micro-services/mp-health-check/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
176 changes: 54 additions & 122 deletions micro-services/mp-health-check/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@

<groupId>com.mastertheboss</groupId>
<artifactId>microprofile-health</artifactId>
<version>25.0.1.Final-SNAPSHOT</version>
<version>1.0.0.Final</version>
<packaging>war</packaging>

<name>Quickstart: microprofile-health</name>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<management.http.url>http://localhost:9990</management.http.url>
<!-- The versions for BOMs, Dependencies and Plugins -->
<version.microprofile.bom>25.0.0.Final</version.microprofile.bom>
<version.server.bom>25.0.0.Final</version.server.bom>
<version.wildfly>25.0.0.Final</version.wildfly>
<version.wildfly-jar.maven.plugin>5.0.0.Final</version.wildfly-jar.maven.plugin>
<version.wildfly.maven.plugin>2.0.0.Final</version.wildfly.maven.plugin>
<version.jkube.maven.plugin>1.0.1</version.jkube.maven.plugin>
<jkube.generator.from>registry.redhat.io/ubi8/openjdk-11:latest</jkube.generator.from>
<version.microprofile.bom>31.0.0.Final</version.microprofile.bom>
<version.wildfly>31.0.0.Final</version.wildfly>
<version.wildfly-jar.maven.plugin>10.0.0.Final</version.wildfly-jar.maven.plugin>
<version.wildfly.maven.plugin>4.2.2.Final</version.wildfly.maven.plugin>
<version.jkube.maven.plugin>1.16.0</version.jkube.maven.plugin>
<jkube.generator.from>registry.redhat.io/ubi8/openjdk-17:latest</jkube.generator.from>
</properties>


Expand Down Expand Up @@ -55,7 +55,7 @@
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>8.0.0</version>
<version>10.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand All @@ -78,19 +78,21 @@
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.wildfly.maven.plugin}</version>
</plugin>

<!-- <plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-jar-maven-plugin</artifactId>
<configuration>
<feature-pack-location>wildfly@maven(org.jboss.universe:community-universe)#${version.wildfly}</feature-pack-location>
<layers>
<layer>jaxrs-server</layer>
<layer>microprofile-platform</layer>

<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-jar-maven-plugin</artifactId>
<version>${version.wildfly-jar.maven.plugin}</version>
<configuration>
<feature-pack-location>wildfly@maven(org.jboss.universe:community-universe)#${version.wildfly}</feature-pack-location>
<layers>
<layer>cloud-server</layer>
<layer>microprofile-health</layer>
</layers>
<excluded-layers>
<layer>deployment-scanner</layer>
</excluded-layers>
<cloud/>
<plugin-options>
<jboss-fork-embedded>${plugin.fork.embedded}</jboss-fork-embedded>
</plugin-options>
Expand All @@ -103,111 +105,41 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>openshift-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>resource</goal>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<enricher>
<config>
<jkube-service>
<type>NodePort</type>
</jkube-service>
</config>
</enricher>
</configuration>
</plugin>
-->

</plugins>
</build>
<profiles>
<profile>
<id>bootable-jar</id>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-jar-maven-plugin</artifactId>
<version>${version.wildfly-jar.maven.plugin}</version>
<configuration>
<feature-pack-location>wildfly@maven(org.jboss.universe:community-universe)#${version.wildfly}</feature-pack-location>
<layers>
<layer>jaxrs-server</layer>
<layer>microprofile-platform</layer>
</layers>
<plugin-options>
<jboss-fork-embedded>true</jboss-fork-embedded>
</plugin-options>
</configuration>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>bootable-jar-openshift</id>
<build>
<plugins>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-jar-maven-plugin</artifactId>
<version>${version.wildfly-jar.maven.plugin}</version>
<configuration>
<feature-pack-location>wildfly@maven(org.jboss.universe:community-universe)#${version.wildfly}</feature-pack-location>
<layers>
<layer>jaxrs-server</layer>
<layer>microprofile-platform</layer>
</layers>
<plugin-options>
<jboss-fork-embedded>true</jboss-fork-embedded>
</plugin-options>
<cloud/>
</configuration>
<executions>
<execution>
<goals>
<goal>package</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>openshift-maven-plugin</artifactId>
<version>${version.jkube.maven.plugin}</version>
<executions>
<execution>
<goals>
<goal>resource</goal>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<enricher>
<config>
<jkube-service>
<type>NodePort</type>
</jkube-service>
</config>
</enricher>
</configuration>
</plugin>
</plugins>
</build>
<profile>
<id>openshift</id>
<properties>
<jkube.generator.from>registry.redhat.io/ubi8/openjdk-17:latest</jkube.generator.from>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jkube</groupId>
<artifactId>openshift-maven-plugin</artifactId>
<version>${version.jkube.maven.plugin}</version>
<configuration>
<resources>
<env>
<GC_MAX_METASPACE_SIZE>256</GC_MAX_METASPACE_SIZE>
<GC_METASPACE_SIZE>96</GC_METASPACE_SIZE>
</env>
</resources>
</configuration>
<executions>
<execution>
<goals>
<goal>resource</goal>
<goal>build</goal>
<goal>apply</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import org.eclipse.microprofile.health.HealthCheckResponseBuilder;


import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import org.eclipse.microprofile.config.inject.ConfigProperty;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mastertheboss.microprofile.health;

import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
import jakarta.ws.rs.ApplicationPath;
import jakarta.ws.rs.core.Application;

@ApplicationPath("/")
public class JaxRsApplication extends Application {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse;

import javax.enterprise.context.ApplicationScoped;
import jakarta.enterprise.context.ApplicationScoped;

import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse;
import org.eclipse.microprofile.health.HealthCheckResponseBuilder;
import org.eclipse.microprofile.health.Liveness;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;

@Liveness
@ApplicationScoped
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.mastertheboss.microprofile.health;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

@Path("/")
public class RootResource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse;
import org.eclipse.microprofile.health.Startup;
import javax.enterprise.context.ApplicationScoped;
import jakarta.enterprise.context.ApplicationScoped;


@Startup
Expand Down

0 comments on commit 78e2080

Please sign in to comment.