Skip to content

Commit

Permalink
Dependencies improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-langer committed Oct 13, 2023
1 parent e544d68 commit 799d8cd
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 13 deletions.
4 changes: 0 additions & 4 deletions config/config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@
<groupId>io.helidon.common</groupId>
<artifactId>helidon-common-media-type</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.logging</groupId>
<artifactId>helidon-logging-jul</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.inject</groupId>
<artifactId>helidon-inject-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions tests/apps/bookstore/bookstore-mp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
<groupId>io.helidon.metrics</groupId>
<artifactId>helidon-metrics</artifactId>
</dependency>
<dependency>
<artifactId>helidon-logging-jul</artifactId>
<groupId>io.helidon.logging</groupId>
</dependency>
<dependency>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions tests/apps/bookstore/bookstore-se/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
<groupId>io.helidon.webserver</groupId>
<artifactId>helidon-webserver-http2</artifactId>
</dependency>
<dependency>
<artifactId>helidon-logging-jul</artifactId>
<groupId>io.helidon.logging</groupId>
</dependency>
<dependency>
<groupId>io.helidon.http.media</groupId>
<artifactId>helidon-http-media-jsonp</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions webserver/access-log/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
<groupId>io.helidon.webserver</groupId>
<artifactId>helidon-webserver</artifactId>
</dependency>
<dependency>
<artifactId>helidon-logging-jul</artifactId>
<groupId>io.helidon.logging</groupId>
</dependency>
<dependency>
<groupId>io.helidon.common.features</groupId>
<artifactId>helidon-common-features-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ protected abstract static class Builder<R extends AbstractLogEntry, T extends Bu
private boolean sanitize = true;
private int maxLength = DEFAULT_MAX_LENGTH;

/**
* Create a new instance, no side effects.
*/
protected Builder() {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
@Prototype.Configured
@Prototype.CustomMethods(AccessLogConfigSupport.CustomMethods.class)
interface AccessLogConfigBlueprint extends Prototype.Factory<AccessLogFeature> {
/**
* Common log format, see {@link io.helidon.webserver.accesslog.AccessLogConfig.Builder#commonLogFormat()}.
*/
List<AccessLogEntry> COMMON_FORMAT = List.of(
HostLogEntry.create(),
UserIdLogEntry.create(),
Expand All @@ -41,6 +44,9 @@ interface AccessLogConfigBlueprint extends Prototype.Factory<AccessLogFeature> {
SizeLogEntry.create()
);

/**
* Helidon log format, see {@link io.helidon.webserver.accesslog.AccessLogConfig.Builder#defaultLogFormat()}.
*/
List<AccessLogEntry> HELIDON_FORMAT = List.of(
HostLogEntry.create(),
UserLogEntry.create(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public class AccessLogHandler extends FileHandler {
/**
* Construct a default {@code AccessLogHandler}. This will be configured
* entirely from {@link System.Logger}.
* <p>
*
* @throws java.io.IOException if there are IO problems opening the files.
* @throws SecurityException if a security manager exists and if
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions webserver/access-log/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 799d8cd

Please sign in to comment.