diff --git a/geoportal-service/pom.xml b/geoportal-service/pom.xml
index 2f04bc1..fe25a84 100644
--- a/geoportal-service/pom.xml
+++ b/geoportal-service/pom.xml
@@ -164,13 +164,7 @@
io.smallrye
smallrye-health
- 2.2.6
-
-
-
- javax.enterprise
- cdi-api
- 2.0
+ 2.1.0
diff --git a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealth.java b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealth.java
index 549b030..c04fdc6 100644
--- a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealth.java
+++ b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/GeoportalHealth.java
@@ -7,8 +7,8 @@ import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import org.eclipse.microprofile.health.HealthCheckResponse;
-import org.gcube.application.geoportal.service.health.GeoportalHealthCheck;
-import org.gcube.application.geoportal.service.health.MongoHealthCheck;
+import org.gcube.application.geoportal.service.rest.health.GeoportalHealthCheck;
+import org.gcube.application.geoportal.service.rest.health.MongoHealthCheck;
import lombok.extern.slf4j.Slf4j;
diff --git a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/health/GeoportalHealthCheck.java b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/health/GeoportalHealthCheck.java
similarity index 69%
rename from geoportal-service/src/main/java/org/gcube/application/geoportal/service/health/GeoportalHealthCheck.java
rename to geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/health/GeoportalHealthCheck.java
index ae8f94f..7cd1ff5 100644
--- a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/health/GeoportalHealthCheck.java
+++ b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/health/GeoportalHealthCheck.java
@@ -1,6 +1,4 @@
-package org.gcube.application.geoportal.service.health;
-
-import javax.enterprise.context.ApplicationScoped;
+package org.gcube.application.geoportal.service.rest.health;
import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse;
@@ -9,7 +7,7 @@ import org.eclipse.microprofile.health.Readiness;
import lombok.extern.slf4j.Slf4j;
-@ApplicationScoped
+
@Readiness
@Liveness
@Slf4j
@@ -20,7 +18,7 @@ public class GeoportalHealthCheck implements HealthCheck {
@Override
public HealthCheckResponse call() {
log.info(GeoportalHealthCheck.class.getSimpleName() + " call");
- return HealthCheckResponse.named(SERVICE_NAME).state(true).withData("status", "healthy").build();
+ return HealthCheckResponse.named(SERVICE_NAME).status(true).withData("status", "healthy").build();
}
}
diff --git a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/health/MongoHealthCheck.java b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/health/MongoHealthCheck.java
similarity index 92%
rename from geoportal-service/src/main/java/org/gcube/application/geoportal/service/health/MongoHealthCheck.java
rename to geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/health/MongoHealthCheck.java
index ca7b1b4..d1be35a 100644
--- a/geoportal-service/src/main/java/org/gcube/application/geoportal/service/health/MongoHealthCheck.java
+++ b/geoportal-service/src/main/java/org/gcube/application/geoportal/service/rest/health/MongoHealthCheck.java
@@ -1,6 +1,4 @@
-package org.gcube.application.geoportal.service.health;
-
-import javax.enterprise.context.ApplicationScoped;
+package org.gcube.application.geoportal.service.rest.health;
import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse;
@@ -16,7 +14,6 @@ import com.mongodb.client.MongoIterable;
import lombok.extern.slf4j.Slf4j;
-@ApplicationScoped
@Readiness
@Liveness
@Slf4j
@@ -41,7 +38,7 @@ public class MongoHealthCheck implements HealthCheck {
ScopeProvider.instance.set(context);
mongo = ImplementationProvider.get().getProvidedObjectByClass(Mongo.class);
buildHCRBuilder = appendMongoInfo(buildHCRBuilder, mongo.getConnection());
- buildHCRBuilder.state(true);
+ buildHCRBuilder.status(true);
MongoIterable collections = mongo.getTheClient().getDatabase(mongo.getConnection().getDatabase())
.listCollectionNames();
log.info("listCollectionNames is null: {}", collections == null);
@@ -53,7 +50,7 @@ public class MongoHealthCheck implements HealthCheck {
}
return buildHCRBuilder.build();
} catch (Exception e) {
- buildHCRBuilder.state(false);
+ buildHCRBuilder.status(false);
if (mongo != null) {
MongoConnection connection = null;
try {
diff --git a/pom.xml b/pom.xml
index 34e7fe0..df38443 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,10 +23,10 @@
https://code-repo.d4science.org/gCubeSystem
- 2.5.1
[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)
- 1.0.6
- [2.0.0, 3.0.0-SNAPSHOT)
+ ${gcube-smartgears-bom-version-p}
+ ${plugin-framework-version-p}
+ ${authorization-utils-range-p}
@@ -39,9 +39,9 @@
- 2.5.1
- 1.0.6
- [2.0.0, 3.0.0-SNAPSHOT)
+ 2.5.1
+ 1.0.6
+ [2.0.0, 3.0.0-SNAPSHOT)
@@ -53,9 +53,9 @@
- 2.5.1-SNAPSHOT
- 1.0.6-SNAPSHOT
- [2.0.0, 3.0.0-SNAPSHOT)
+ 2.5.1-SNAPSHOT
+ 1.0.6-SNAPSHOT
+ [2.0.0, 3.0.0-SNAPSHOT)