From e4a834dc3b68622bc81c98c5fb50755e8c6f8d39 Mon Sep 17 00:00:00 2001 From: tim_graves <28924492+atimgraves@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:22:12 +0000 Subject: [PATCH 1/6] comment formating fix --- .../src/main/java/com/oracle/labs/helidon/storefront/Main.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helidon-storefront-full/src/main/java/com/oracle/labs/helidon/storefront/Main.java b/helidon-storefront-full/src/main/java/com/oracle/labs/helidon/storefront/Main.java index 2094f8b..604ca84 100644 --- a/helidon-storefront-full/src/main/java/com/oracle/labs/helidon/storefront/Main.java +++ b/helidon-storefront-full/src/main/java/com/oracle/labs/helidon/storefront/Main.java @@ -95,8 +95,7 @@ private static Config buildConfig() { // need to // build it before we can add it to the list. again if there were three or less // we could pass the ConfigSource builder directly into the sources method of - // the - // config builder. + // the config builder. List> configSourcesToScan = new ArrayList<>(5); configSourcesToScan.add(ConfigSources.file("conf/storefront-config.yaml") .pollingStrategy(PollingStrategies.regular(Duration.ofSeconds(5))).optional().build()); From 6d62946df83efcdadb06998a592ae9014ba97f7d Mon Sep 17 00:00:00 2001 From: tim_graves <28924492+atimgraves@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:22:57 +0000 Subject: [PATCH 2/6] switch to helidon 4.x this is a major restructure of the pom.xml in terms of the way dependencies are included --- helidon-storefront-full/pom.xml | 121 ++++++++++++++++++++++++-------- 1 file changed, 92 insertions(+), 29 deletions(-) diff --git a/helidon-storefront-full/pom.xml b/helidon-storefront-full/pom.xml index f42845e..d132d01 100644 --- a/helidon-storefront-full/pom.xml +++ b/helidon-storefront-full/pom.xml @@ -1,4 +1,5 @@ + - - + 4.0.0 - - - io.helidon.applications - helidon-mp - 3.1.2 - - + + io.helidon.applications + helidon-mp + 4.0.2 + + + com.oracle.labs.helidon.storefront.Main - 17 + 21 ${maven.compiler.source} - 1.18.26 + 1.18.30 3.3.1 + 3.1.2 true ghcr.io/graalvm/graalvm-ce:ol9-java17-22.3.1 com.oracle.labs.helidon storefront - ${project.parent.version} - ${project.artifactId} - io.helidon.microprofile.bundles helidon-microprofile - org.jboss + io.helidon.microprofile.bundles + helidon-microprofile-core + + + io.helidon.microprofile.openapi + helidon-microprofile-openapi + + + io.helidon.microprofile.health + helidon-microprofile-health + + + jakarta.json.bind + jakarta.json.bind-api + + + org.glassfish.jersey.media + jersey-media-json-binding + runtime + + + io.helidon.logging + helidon-logging-jul + runtime + + + io.smallrye jandex runtime - true jakarta.activation jakarta.activation-api - runtime + + + org.eclipse.microprofile.metrics + microprofile-metrics-api + + + io.helidon.microprofile.metrics + helidon-microprofile-metrics org.junit.jupiter junit-jupiter-api test - + + + io.helidon.microprofile.testing + helidon-microprofile-testing-junit5 + test + + + org.hamcrest + hamcrest-all + test + + org.projectlombok @@ -86,13 +129,15 @@ SOFTWARE. --> ${version.lombok} provided - - - com.fasterxml.jackson.core - jackson-databind - - + + + + org.slf4j slf4j-jdk14 - - - io.helidon.tracing - helidon-tracing-zipkin - + + + + + + + + + + + + + + @@ -123,6 +177,15 @@ SOFTWARE. --> + + io.smallrye + jandex-maven-plugin + + + make-index + + + org.jboss.jandex jandex-maven-plugin From f8270e073478ffe60c938848f30a8896d9f65d48 Mon Sep 17 00:00:00 2001 From: tim_graves <28924492+atimgraves@users.noreply.github.com> Date: Fri, 5 Jan 2024 12:39:35 +0000 Subject: [PATCH 3/6] fix error in open api example text (was not proper json) removed Metered metrics annotation as eclipse MP no longer supports it --- .../oracle/labs/helidon/storefront/data/ItemRequest.java | 2 +- .../helidon/storefront/resources/StorefrontResource.java | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/helidon-storefront-full/src/main/java/com/oracle/labs/helidon/storefront/data/ItemRequest.java b/helidon-storefront-full/src/main/java/com/oracle/labs/helidon/storefront/data/ItemRequest.java index 87cc70a..c172962 100644 --- a/helidon-storefront-full/src/main/java/com/oracle/labs/helidon/storefront/data/ItemRequest.java +++ b/helidon-storefront-full/src/main/java/com/oracle/labs/helidon/storefront/data/ItemRequest.java @@ -45,7 +45,7 @@ Software and the Larger Work(s), and to sublicense the foregoing rights on @Data @NoArgsConstructor @AllArgsConstructor -@Schema(name = "ItemRequest", description = "Details of a Item reservation request", example = "{\"requestedItem\", \"Pin\", \"requestedCount\",5}") +@Schema(name = "ItemRequest", description = "Details of a Item reservation request", example = "{\"requestedItem\": \"Pin\", \"requestedCount\": 5}") public class ItemRequest { @Schema(required = true, description = "Name of the item being requested", example = "Pin") private String requestedItem; diff --git a/helidon-storefront-full/src/main/java/com/oracle/labs/helidon/storefront/resources/StorefrontResource.java b/helidon-storefront-full/src/main/java/com/oracle/labs/helidon/storefront/resources/StorefrontResource.java index 2fe3bac..bfa3b03 100644 --- a/helidon-storefront-full/src/main/java/com/oracle/labs/helidon/storefront/resources/StorefrontResource.java +++ b/helidon-storefront-full/src/main/java/com/oracle/labs/helidon/storefront/resources/StorefrontResource.java @@ -45,7 +45,6 @@ Software and the Larger Work(s), and to sublicense the foregoing rights on import org.eclipse.microprofile.faulttolerance.Fallback; import org.eclipse.microprofile.faulttolerance.Timeout; import org.eclipse.microprofile.metrics.annotation.Counted; -import org.eclipse.microprofile.metrics.annotation.Metered; import org.eclipse.microprofile.metrics.annotation.Timed; import org.eclipse.microprofile.openapi.annotations.Operation; import org.eclipse.microprofile.openapi.annotations.enums.SchemaType; @@ -137,9 +136,6 @@ public class StorefrontResource { @Fallback(fallbackMethod = "failedListStockItem") // add a timer to track how long is spent in this call @Timed(name = "listAllStockTimer") - // add a Meter to track how often we're called, absolute=true means the name - // given is used directly and not added to the class - @Metered(name = "listAllStockMeter", absolute = true) @Operation(summary = "List stock items", description = "Returns a list of all of the stock items currently held in the database (the list may be empty if there are no items)") @APIResponse(description = "A set of ItemDetails representing the current data in the database", responseCode = "200", content = @Content(schema = @Schema(name = "ItemDetails", implementation = ItemDetails.class, type = SchemaType.ARRAY), example = "[{\"itemCount\": 10, \"itemName\": \"Pencil\"}," + "{\"itemCount\": 50, \"itemName\": \"Eraser\"}," + "{\"itemCount\": 4600, \"itemName\": \"Pin\"}," @@ -191,7 +187,7 @@ public Collection listAllStock() { @APIResponse(description = "The requested change does not meet the minimum level required for the change (i.e. is <= the minimumChange value)", responseCode = "406") @APIResponse(description = "There are not enough of the requested item to fulfil your request", responseCode = "409") public ItemDetails reserveStockItem( - @RequestBody(description = "The details of the item being requested", required = true, content = @Content(schema = @Schema(name = "ItemRequest", implementation = ItemRequest.class), example = "{\"requestedItem\",\"Pencil\",\"requestedCount\",5}")) ItemRequest itemRequest, + @RequestBody(description = "The details of the item being requested", required = true, content = @Content(schema = @Schema(name = "ItemRequest", implementation = ItemRequest.class), example = "{\"requestedItem\": \"Pencil\",\"requestedCount\": 5}")) ItemRequest itemRequest, @Context SecurityContext securityContext) throws MinimumChangeException, UnknownItemException, NotEnoughItemsException { log.info("Requesting the reservation of " + itemRequest.getRequestedCount() + " items of " From 27c4975daff1c5b87e98fffdeffcf1e2a13f6721 Mon Sep 17 00:00:00 2001 From: tim_graves <28924492+atimgraves@users.noreply.github.com> Date: Tue, 17 Dec 2024 14:42:31 +0000 Subject: [PATCH 4/6] update to java 21 and latest lombok --- helidon-storefront-full/.classpath | 3 ++- helidon-storefront-full/pom.xml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/helidon-storefront-full/.classpath b/helidon-storefront-full/.classpath index 77be441..36b1772 100644 --- a/helidon-storefront-full/.classpath +++ b/helidon-storefront-full/.classpath @@ -24,8 +24,9 @@ - + + diff --git a/helidon-storefront-full/pom.xml b/helidon-storefront-full/pom.xml index d132d01..3dcbf85 100644 --- a/helidon-storefront-full/pom.xml +++ b/helidon-storefront-full/pom.xml @@ -50,11 +50,11 @@ SOFTWARE. --> com.oracle.labs.helidon.storefront.Main 21 ${maven.compiler.source} - 1.18.30 + 1.18.36 3.3.1 3.1.2 true - ghcr.io/graalvm/graalvm-ce:ol9-java17-22.3.1 + ghcr.io/graalvm/jdk-community:21 com.oracle.labs.helidon storefront From b8d0643b2155deaedc65d424a3da51b19c681b4c Mon Sep 17 00:00:00 2001 From: tim_graves <28924492+atimgraves@users.noreply.github.com> Date: Wed, 26 Mar 2025 14:14:00 +0000 Subject: [PATCH 5/6] J17 testing using J17 until lombok / J21 problems resolved --- helidon-storefront-full/.classpath | 27 +-- helidon-storefront-full/.factorypath | 162 ++++++++++++++++++ .../.settings/org.eclipse.jdt.apt.core.prefs | 4 + .../.settings/org.eclipse.jdt.core.prefs | 8 +- helidon-storefront-full/pom.xml | 22 ++- 5 files changed, 206 insertions(+), 17 deletions(-) create mode 100644 helidon-storefront-full/.factorypath create mode 100644 helidon-storefront-full/.settings/org.eclipse.jdt.apt.core.prefs diff --git a/helidon-storefront-full/.classpath b/helidon-storefront-full/.classpath index 36b1772..613e547 100644 --- a/helidon-storefront-full/.classpath +++ b/helidon-storefront-full/.classpath @@ -1,38 +1,43 @@ - + - + - + + + - + - - - + - - + - + + + - + + + + + diff --git a/helidon-storefront-full/.factorypath b/helidon-storefront-full/.factorypath new file mode 100644 index 0000000..6a7a17a --- /dev/null +++ b/helidon-storefront-full/.factorypath @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/helidon-storefront-full/.settings/org.eclipse.jdt.apt.core.prefs b/helidon-storefront-full/.settings/org.eclipse.jdt.apt.core.prefs new file mode 100644 index 0000000..dfa4f3a --- /dev/null +++ b/helidon-storefront-full/.settings/org.eclipse.jdt.apt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.apt.aptEnabled=true +org.eclipse.jdt.apt.genSrcDir=target/generated-sources/annotations +org.eclipse.jdt.apt.genTestSrcDir=target/generated-test-sources/test-annotations diff --git a/helidon-storefront-full/.settings/org.eclipse.jdt.core.prefs b/helidon-storefront-full/.settings/org.eclipse.jdt.core.prefs index eeac0e7..cd99dd0 100644 --- a/helidon-storefront-full/.settings/org.eclipse.jdt.core.prefs +++ b/helidon-storefront-full/.settings/org.eclipse.jdt.core.prefs @@ -1,8 +1,14 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.methodParameters=generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.processAnnotations=enabled org.eclipse.jdt.core.compiler.release=enabled org.eclipse.jdt.core.compiler.source=17 diff --git a/helidon-storefront-full/pom.xml b/helidon-storefront-full/pom.xml index 3dcbf85..9deba6b 100644 --- a/helidon-storefront-full/pom.xml +++ b/helidon-storefront-full/pom.xml @@ -42,19 +42,19 @@ SOFTWARE. --> io.helidon.applications helidon-mp - 4.0.2 + 3.2.12 com.oracle.labs.helidon.storefront.Main - 21 + 17 ${maven.compiler.source} 1.18.36 3.3.1 3.1.2 true - ghcr.io/graalvm/jdk-community:21 + ghcr.io/graalvm/jdk-community:17 com.oracle.labs.helidon storefront @@ -89,11 +89,19 @@ SOFTWARE. --> helidon-logging-jul runtime + - io.smallrye + org.jboss jandex runtime + true + jakarta.activation jakarta.activation-api @@ -111,11 +119,13 @@ SOFTWARE. --> junit-jupiter-api test + org.hamcrest hamcrest-all @@ -177,6 +187,7 @@ SOFTWARE. --> + make-index - + --> + org.jboss.jandex jandex-maven-plugin From f63a3c89da07459a3db43a715bcb80d57e09ecbf Mon Sep 17 00:00:00 2001 From: tim_graves <28924492+atimgraves@users.noreply.github.com> Date: Wed, 26 Mar 2025 18:56:35 +0000 Subject: [PATCH 6/6] added jackson databind back to the pom.xml (had forgotten to put it back after reverting to J17 --- helidon-storefront-full/pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helidon-storefront-full/pom.xml b/helidon-storefront-full/pom.xml index 9deba6b..f040309 100644 --- a/helidon-storefront-full/pom.xml +++ b/helidon-storefront-full/pom.xml @@ -142,10 +142,10 @@ SOFTWARE. --> - - - - + + com.fasterxml.jackson.core + jackson-databind +