From 799d8cd4d3ec4a8d33b6a08f283dfa15ac5948fd Mon Sep 17 00:00:00 2001 From: Tomas Langer Date: Fri, 13 Oct 2023 13:28:08 +0200 Subject: [PATCH] Dependencies improvements --- config/config/pom.xml | 4 ---- .../native-image-extension/src/main/java/module-info.java | 1 - tests/apps/bookstore/bookstore-mp/pom.xml | 4 ++++ tests/apps/bookstore/bookstore-se/pom.xml | 4 ++++ webserver/access-log/pom.xml | 4 ++++ .../io/helidon/webserver/accesslog/AbstractLogEntry.java | 3 +++ .../webserver/accesslog/AccessLogConfigBlueprint.java | 6 ++++++ .../io/helidon/webserver/accesslog/AccessLogHandler.java | 1 - .../java/io/helidon/webserver/accesslog/HostLogEntry.java | 2 +- .../io/helidon/webserver/accesslog/RequestLineLogEntry.java | 2 +- .../java/io/helidon/webserver/accesslog/SizeLogEntry.java | 2 +- .../java/io/helidon/webserver/accesslog/StatusLogEntry.java | 2 +- .../io/helidon/webserver/accesslog/TimestampLogEntry.java | 2 +- .../java/io/helidon/webserver/accesslog/UserIdLogEntry.java | 2 +- .../java/io/helidon/webserver/accesslog/UserLogEntry.java | 4 +++- webserver/access-log/src/main/java/module-info.java | 1 + 16 files changed, 31 insertions(+), 13 deletions(-) diff --git a/config/config/pom.xml b/config/config/pom.xml index 8236f3ef022..30262207bfc 100644 --- a/config/config/pom.xml +++ b/config/config/pom.xml @@ -50,10 +50,6 @@ io.helidon.common helidon-common-media-type - - io.helidon.logging - helidon-logging-jul - io.helidon.inject helidon-inject-api diff --git a/integrations/graal/native-image-extension/src/main/java/module-info.java b/integrations/graal/native-image-extension/src/main/java/module-info.java index dbf5ffa647d..31e610fa891 100644 --- a/integrations/graal/native-image-extension/src/main/java/module-info.java +++ b/integrations/graal/native-image-extension/src/main/java/module-info.java @@ -23,7 +23,6 @@ requires io.helidon.common.features; requires io.helidon.config; requires io.helidon.logging.common; - requires io.helidon.logging.jul; requires jakarta.json; requires transitive org.graalvm.nativeimage; diff --git a/tests/apps/bookstore/bookstore-mp/pom.xml b/tests/apps/bookstore/bookstore-mp/pom.xml index e656fd7bd3e..8129f0acaa8 100644 --- a/tests/apps/bookstore/bookstore-mp/pom.xml +++ b/tests/apps/bookstore/bookstore-mp/pom.xml @@ -63,6 +63,10 @@ io.helidon.metrics helidon-metrics + + helidon-logging-jul + io.helidon.logging + io.smallrye jandex diff --git a/tests/apps/bookstore/bookstore-se/pom.xml b/tests/apps/bookstore/bookstore-se/pom.xml index 9b17e1a75f8..95428d035e0 100644 --- a/tests/apps/bookstore/bookstore-se/pom.xml +++ b/tests/apps/bookstore/bookstore-se/pom.xml @@ -50,6 +50,10 @@ io.helidon.webserver helidon-webserver-http2 + + helidon-logging-jul + io.helidon.logging + io.helidon.http.media helidon-http-media-jsonp diff --git a/webserver/access-log/pom.xml b/webserver/access-log/pom.xml index 1ca6359ceda..d5ea6391404 100644 --- a/webserver/access-log/pom.xml +++ b/webserver/access-log/pom.xml @@ -32,6 +32,10 @@ io.helidon.webserver helidon-webserver + + helidon-logging-jul + io.helidon.logging + io.helidon.common.features helidon-common-features-api diff --git a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/AbstractLogEntry.java b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/AbstractLogEntry.java index afd559f248c..36323f779a2 100644 --- a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/AbstractLogEntry.java +++ b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/AbstractLogEntry.java @@ -119,6 +119,9 @@ protected abstract static class Builder { + /** + * Common log format, see {@link io.helidon.webserver.accesslog.AccessLogConfig.Builder#commonLogFormat()}. + */ List COMMON_FORMAT = List.of( HostLogEntry.create(), UserIdLogEntry.create(), @@ -41,6 +44,9 @@ interface AccessLogConfigBlueprint extends Prototype.Factory { SizeLogEntry.create() ); + /** + * Helidon log format, see {@link io.helidon.webserver.accesslog.AccessLogConfig.Builder#defaultLogFormat()}. + */ List HELIDON_FORMAT = List.of( HostLogEntry.create(), UserLogEntry.create(), diff --git a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/AccessLogHandler.java b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/AccessLogHandler.java index ff08b6bfe0b..bd55628991f 100644 --- a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/AccessLogHandler.java +++ b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/AccessLogHandler.java @@ -42,7 +42,6 @@ public class AccessLogHandler extends FileHandler { /** * Construct a default {@code AccessLogHandler}. This will be configured * entirely from {@link System.Logger}. - *

* * @throws java.io.IOException if there are IO problems opening the files. * @throws SecurityException if a security manager exists and if diff --git a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/HostLogEntry.java b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/HostLogEntry.java index 549e9fbdfa1..a282375be7d 100644 --- a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/HostLogEntry.java +++ b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/HostLogEntry.java @@ -27,7 +27,7 @@ private HostLogEntry(Builder builder) { * Create a new host log entry. * * @return a new access log entry for host - * @see AccessLogFeature.Builder#add(AccessLogEntry) + * @see AccessLogConfig.Builder#addEntry(AccessLogEntry) */ public static HostLogEntry create() { return builder().build(); diff --git a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/RequestLineLogEntry.java b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/RequestLineLogEntry.java index 59e17649fe9..8accceefc95 100644 --- a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/RequestLineLogEntry.java +++ b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/RequestLineLogEntry.java @@ -31,7 +31,7 @@ private RequestLineLogEntry(Builder builder) { * Create a new request line entry. * * @return a new access log entry for request line - * @see AccessLogFeature.Builder#add(AccessLogEntry) + * @see AccessLogConfig.Builder#addEntry(AccessLogEntry) */ public static RequestLineLogEntry create() { return builder().build(); diff --git a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/SizeLogEntry.java b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/SizeLogEntry.java index 5ffaa7baf2e..39013151156 100644 --- a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/SizeLogEntry.java +++ b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/SizeLogEntry.java @@ -29,7 +29,7 @@ private SizeLogEntry(Builder builder) { * Create a new size log entry instance. * * @return a new access log entry for entity size - * @see AccessLogFeature.Builder#add(AccessLogEntry) + * @see AccessLogConfig.Builder#addEntry(AccessLogEntry) */ public static SizeLogEntry create() { return builder().build(); diff --git a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/StatusLogEntry.java b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/StatusLogEntry.java index 6adba94e257..3dedbbee6e1 100644 --- a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/StatusLogEntry.java +++ b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/StatusLogEntry.java @@ -27,7 +27,7 @@ private StatusLogEntry(Builder builder) { * Create a new status log entry. * * @return a new access log entry for HTTP status - * @see AccessLogFeature.Builder#add(AccessLogEntry) + * @see AccessLogConfig.Builder#addEntry(AccessLogEntry) */ public static StatusLogEntry create() { return builder().build(); diff --git a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/TimestampLogEntry.java b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/TimestampLogEntry.java index f303bb3cbb4..9c8dd9ec8d0 100644 --- a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/TimestampLogEntry.java +++ b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/TimestampLogEntry.java @@ -35,7 +35,7 @@ private TimestampLogEntry(Builder builder) { * Create a new Timestamp log entry. * * @return a new access log entry for Timestamp - * @see AccessLogFeature.Builder#add(AccessLogEntry) + * @see AccessLogConfig.Builder#addEntry(AccessLogEntry) */ public static TimestampLogEntry create() { return builder().build(); diff --git a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/UserIdLogEntry.java b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/UserIdLogEntry.java index 81a65d6ec4a..25ef9564502 100644 --- a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/UserIdLogEntry.java +++ b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/UserIdLogEntry.java @@ -28,7 +28,7 @@ private UserIdLogEntry() { * Create a new access log entry for user id. * * @return an entry that always considers user id to be undefined - * @see AccessLogFeature.Builder#add(AccessLogEntry) + * @see AccessLogConfig.Builder#addEntry(AccessLogEntry) * @see UserLogEntry */ public static UserIdLogEntry create() { diff --git a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/UserLogEntry.java b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/UserLogEntry.java index 2329dbcb7ec..a3293ab9879 100644 --- a/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/UserLogEntry.java +++ b/webserver/access-log/src/main/java/io/helidon/webserver/accesslog/UserLogEntry.java @@ -34,7 +34,9 @@ private UserLogEntry(Builder builder) { * Create a new user log entry. * * @return a new access log entry for username - * @see AccessLogFeature.Builder#add(AccessLogEntry) + * + * @see io.helidon.webserver.accesslog.AccessLogConfig.Builder#addEntry(AccessLogEntry) + * @see AccessLogConfig.Builder#addEntry(AccessLogEntry) */ public static UserLogEntry create() { return builder().build(); diff --git a/webserver/access-log/src/main/java/module-info.java b/webserver/access-log/src/main/java/module-info.java index 17c0304eed5..e0351ee7c70 100644 --- a/webserver/access-log/src/main/java/module-info.java +++ b/webserver/access-log/src/main/java/module-info.java @@ -30,6 +30,7 @@ requires io.helidon.common.security; requires io.helidon.webserver; requires java.logging; + requires io.helidon.logging.jul; requires static io.helidon.common.features.api;