From 7c5dc90f75f6262c0e73c1777c599d51953d72df Mon Sep 17 00:00:00 2001 From: Thilo Schwarz Date: Tue, 17 Sep 2024 14:25:19 +0200 Subject: [PATCH] refactor --- dyndrest-data/pom.xml | 11 +++++++++- {dyndrest-api => dyndrest-routes}/pom.xml | 9 ++++---- .../thischwa/dyndrest/route}/AdminRoutes.java | 2 +- .../thischwa/dyndrest/route}/ApiRoutes.java | 6 +++--- .../dyndrest/route}/RouterRoutes.java | 4 ++-- dyndrest-server/pom.xml | 3 ++- .../dyndrest/server/AdminController.java | 2 +- .../dyndrest/server/ApiController.java | 4 ++-- dyndrest-service/pom.xml | 1 + pom.xml | 21 ++++++++++--------- 10 files changed, 38 insertions(+), 25 deletions(-) rename {dyndrest-api => dyndrest-routes}/pom.xml (86%) rename {dyndrest-api/src/main/java/codes/thischwa/dyndrest => dyndrest-routes/src/main/java/codes/thischwa/dyndrest/route}/AdminRoutes.java (99%) rename {dyndrest-api/src/main/java/codes/thischwa/dyndrest => dyndrest-routes/src/main/java/codes/thischwa/dyndrest/route}/ApiRoutes.java (98%) rename {dyndrest-api/src/main/java/codes/thischwa/dyndrest => dyndrest-routes/src/main/java/codes/thischwa/dyndrest/route}/RouterRoutes.java (94%) diff --git a/dyndrest-data/pom.xml b/dyndrest-data/pom.xml index cbe687d..35579a9 100644 --- a/dyndrest-data/pom.xml +++ b/dyndrest-data/pom.xml @@ -8,7 +8,8 @@ ../pom.xml dyndrest-data - dyndrest-model + dyndrest-data + jar This modules contains the model and the database layer. @@ -18,6 +19,14 @@ dyndrest-checkstyle ${project.version} + + org.projectlombok + lombok + + + com.fasterxml.jackson.core + jackson-annotations + org.springframework.boot spring-boot diff --git a/dyndrest-api/pom.xml b/dyndrest-routes/pom.xml similarity index 86% rename from dyndrest-api/pom.xml rename to dyndrest-routes/pom.xml index 3470569..79aed2f 100644 --- a/dyndrest-api/pom.xml +++ b/dyndrest-routes/pom.xml @@ -5,10 +5,11 @@ codes.thischwa dyndrest 0.9.0-SNAPSHOT - ../pom.xml - dyndrest-api - dyndrest-api + dyndrest-routes + dyndrest-routes + + jar @@ -19,7 +20,7 @@ io.swagger.core.v3 swagger-annotations-jakarta - 2.2.19 + ${swaggerv3-annotation.version} compile diff --git a/dyndrest-api/src/main/java/codes/thischwa/dyndrest/AdminRoutes.java b/dyndrest-routes/src/main/java/codes/thischwa/dyndrest/route/AdminRoutes.java similarity index 99% rename from dyndrest-api/src/main/java/codes/thischwa/dyndrest/AdminRoutes.java rename to dyndrest-routes/src/main/java/codes/thischwa/dyndrest/route/AdminRoutes.java index f5ef498..c1cdabd 100644 --- a/dyndrest-api/src/main/java/codes/thischwa/dyndrest/AdminRoutes.java +++ b/dyndrest-routes/src/main/java/codes/thischwa/dyndrest/route/AdminRoutes.java @@ -1,4 +1,4 @@ -package codes.thischwa.dyndrest; +package codes.thischwa.dyndrest.route; import codes.thischwa.dyndrest.model.FullHost; import codes.thischwa.dyndrest.model.Zone; diff --git a/dyndrest-api/src/main/java/codes/thischwa/dyndrest/ApiRoutes.java b/dyndrest-routes/src/main/java/codes/thischwa/dyndrest/route/ApiRoutes.java similarity index 98% rename from dyndrest-api/src/main/java/codes/thischwa/dyndrest/ApiRoutes.java rename to dyndrest-routes/src/main/java/codes/thischwa/dyndrest/route/ApiRoutes.java index 9781e6a..6a969d8 100644 --- a/dyndrest-api/src/main/java/codes/thischwa/dyndrest/ApiRoutes.java +++ b/dyndrest-routes/src/main/java/codes/thischwa/dyndrest/route/ApiRoutes.java @@ -1,4 +1,4 @@ -package codes.thischwa.dyndrest; +package codes.thischwa.dyndrest.route; import codes.thischwa.dyndrest.model.IpSetting; import io.swagger.v3.oas.annotations.ExternalDocumentation; @@ -41,9 +41,9 @@ @ExternalDocumentation( description = "DynDRest on Github", url = "https://github.com/th-schwarz/DynDRest")) -public// @formatter:on +// @formatter:on // naming conventions: https://restfulapi.net/resource-naming/ -interface ApiRoutes { +public interface ApiRoutes { @Operation( summary = diff --git a/dyndrest-api/src/main/java/codes/thischwa/dyndrest/RouterRoutes.java b/dyndrest-routes/src/main/java/codes/thischwa/dyndrest/route/RouterRoutes.java similarity index 94% rename from dyndrest-api/src/main/java/codes/thischwa/dyndrest/RouterRoutes.java rename to dyndrest-routes/src/main/java/codes/thischwa/dyndrest/route/RouterRoutes.java index cea1dfa..02c9c50 100644 --- a/dyndrest-api/src/main/java/codes/thischwa/dyndrest/RouterRoutes.java +++ b/dyndrest-routes/src/main/java/codes/thischwa/dyndrest/route/RouterRoutes.java @@ -1,4 +1,4 @@ -package codes.thischwa.dyndrest; +package codes.thischwa.dyndrest.route; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Schema; @@ -16,7 +16,7 @@ */ public interface RouterRoutes { /*+ - * It's a duplicate of {@link codes.thischwa.dyndrest.ApiRoutes#updateHost} for routers which can't use the Put method. + * It's a duplicate of {@link codes.thischwa.dyndrest.api.ApiRoutes#updateHost} for routers which can't use the Put method. */ @Operation( summary = diff --git a/dyndrest-server/pom.xml b/dyndrest-server/pom.xml index d7d7953..0eca112 100644 --- a/dyndrest-server/pom.xml +++ b/dyndrest-server/pom.xml @@ -9,6 +9,7 @@ dyndrest-server dyndrest-server + jar @@ -23,7 +24,7 @@ codes.thischwa - dyndrest-api + dyndrest-routes ${project.version} diff --git a/dyndrest-server/src/main/java/codes/thischwa/dyndrest/server/AdminController.java b/dyndrest-server/src/main/java/codes/thischwa/dyndrest/server/AdminController.java index b52316a..81cee94 100644 --- a/dyndrest-server/src/main/java/codes/thischwa/dyndrest/server/AdminController.java +++ b/dyndrest-server/src/main/java/codes/thischwa/dyndrest/server/AdminController.java @@ -1,6 +1,6 @@ package codes.thischwa.dyndrest.server; -import codes.thischwa.dyndrest.AdminRoutes; +import codes.thischwa.dyndrest.route.AdminRoutes; import codes.thischwa.dyndrest.model.config.AppConfig; import codes.thischwa.dyndrest.model.FullHost; import codes.thischwa.dyndrest.model.Zone; diff --git a/dyndrest-server/src/main/java/codes/thischwa/dyndrest/server/ApiController.java b/dyndrest-server/src/main/java/codes/thischwa/dyndrest/server/ApiController.java index 2c2ff3a..a9d33e0 100644 --- a/dyndrest-server/src/main/java/codes/thischwa/dyndrest/server/ApiController.java +++ b/dyndrest-server/src/main/java/codes/thischwa/dyndrest/server/ApiController.java @@ -1,7 +1,7 @@ package codes.thischwa.dyndrest.server; -import codes.thischwa.dyndrest.ApiRoutes; -import codes.thischwa.dyndrest.RouterRoutes; +import codes.thischwa.dyndrest.route.ApiRoutes; +import codes.thischwa.dyndrest.route.RouterRoutes; import codes.thischwa.dyndrest.model.config.AppConfig; import codes.thischwa.dyndrest.model.IpSetting; import codes.thischwa.dyndrest.model.UpdateLog; diff --git a/dyndrest-service/pom.xml b/dyndrest-service/pom.xml index 5dd11f2..bfa2b91 100644 --- a/dyndrest-service/pom.xml +++ b/dyndrest-service/pom.xml @@ -9,6 +9,7 @@ dyndrest-service dyndrest-service + jar diff --git a/pom.xml b/pom.xml index d220e26..5816c7d 100644 --- a/pom.xml +++ b/pom.xml @@ -17,13 +17,13 @@ pom + dyndrest-data dyndrest-server dyndrest-checkstyle - dyndrest-data - dyndrest-api dyndrest-service test-module + dyndrest-routes @@ -36,6 +36,7 @@ 0.2.8 3.5.3 3.1.11 + 2.2.21 ${project.basedir}/fake-repo @@ -85,14 +86,6 @@ janino ${janino.version} - - org.projectlombok - lombok - - - com.fasterxml.jackson.core - jackson-annotations - org.springframework.boot spring-boot-starter-test @@ -113,6 +106,14 @@ + + org.apache.maven.plugins + maven-compiler-plugin + + ${java.version} + ${java.version} + + org.apache.maven.plugins maven-surefire-plugin