From 6c0049ad4763c97fef4478fb524398486d4c2506 Mon Sep 17 00:00:00 2001 From: Thorsten Marx Date: Wed, 30 Oct 2024 12:39:26 +0100 Subject: [PATCH 1/3] make cms home configurable --- .gitignore | 25 ++++++++- .../java/com/condation/cms/api/Constants.java | 2 + .../condation/cms/api/utils/ServerUtil.java | 44 +++++++++++++++ .../com/condation/cms/api/utils/SiteUtil.java | 22 ++++++++ .../configuration/ConfigurationFactory.java | 17 ++++-- .../configs/TaxonomyConfiguration.java | 12 +++- .../properties/ExtendedServerProperties.java | 3 +- .../cms/core/theme/DefaultTheme.java | 17 +++--- .../TaxonomyConfigurationTest.java | 1 + cms-git/pom.xml | 4 ++ .../condation/cms/git/tasks/CloneTask.java | 6 +- .../condation/cms/git/tasks/FetchTask.java | 6 +- .../condation/cms/git/tasks/MergeTask.java | 6 +- .../condation/cms/git/tasks/ResetTask.java | 6 +- cms-server/nbactions-dist.xml | 6 +- .../java/com/condation/cms/CMSServer.java | 7 ++- .../java/com/condation/cms/cli/CMSCli.java | 10 +++- .../commands/extensions/InstallCommand.java | 12 ++-- .../cms/cli/commands/host/ReloadHost.java | 6 +- .../modules/AbstractModuleCommand.java | 5 +- .../cli/commands/modules/GetAllCommand.java | 3 +- .../cms/cli/commands/modules/GetCommand.java | 5 +- .../cms/cli/commands/server/AddUser.java | 5 +- .../cms/cli/commands/server/RemoveUser.java | 5 +- .../cms/cli/commands/server/Startup.java | 7 ++- .../cms/cli/commands/server/Stop.java | 8 ++- .../commands/themes/AbstractThemeCommand.java | 4 +- .../cli/commands/themes/GetAllCommand.java | 5 +- .../cms/cli/commands/themes/GetCommand.java | 5 +- .../condation/cms/cli/tools/ModulesUtil.java | 7 ++- .../condation/cms/cli/tools/ThemesUtil.java | 7 ++- .../com/condation/cms/server/JettyServer.java | 5 +- .../java/com/condation/cms/server/VHost.java | 37 ++++++------ .../cms/server/configs/SiteHandlerModule.java | 4 +- .../cms/server/configs/SiteModule.java | 28 ++++----- .../com/condation/cms/utils/SiteUtils.java | 53 ------------------ {cms-server => test-server}/hosts/Caddyfile | 0 .../hosts/demo/assets/favicon.ico | Bin .../hosts/demo/assets/images/test.jpg | Bin .../hosts/demo/config/media.toml | 0 .../hosts/demo/content/.technical/404.md | 0 .../hosts/demo/content/index.md | 0 .../hosts/demo/content/robots.txt | 0 .../example-module/configuration.properties | 0 .../markedj-module/configuration.properties | 0 .../search-module/configuration.properties | 0 .../seo-module/configuration.properties | 0 .../thymeleaf-module/configuration.properties | 0 .../hosts/demo/site.toml | 0 .../hosts/demo2/content/.technical/404.md | 0 .../demo2/content/blog/2023-09/hello-world.md | 0 .../demo2/content/blog/2023-09/new-post.md | 0 .../demo2/content/blog/2023-10/new-post.md | 0 .../hosts/demo2/content/blog/index.md | 0 .../hosts/demo2/content/index.md | 0 .../hosts/demo2/extensions/test.extension.js | 0 .../hosts/demo2/messages/labels.properties | 0 .../example-module/configuration.properties | 0 .../markedjs-module/configuration.properties | 0 .../pebble-module/configuration.properties | 0 .../thymeleaf-module/configuration.properties | 0 .../hosts/demo2/site.yaml | 0 .../hosts/demo2/templates/blog-entry.html | 0 .../hosts/demo2/templates/blog.html | 0 .../hosts/demo2/templates/start.html | 0 .../hosts/features/assets/app-1.js | 0 .../hosts/features/assets/favicon.ico | Bin .../hosts/features/assets/form-1.css | 0 .../hosts/features/assets/form-1.js | 0 .../hosts/features/assets/images/test.jpg | Bin .../features/assets/images/test.jpg.meta.yaml | 0 .../hosts/features/assets/styles-1.css | 0 .../hosts/features/config/auth.yaml | 0 .../hosts/features/config/forms.yaml | 0 .../hosts/features/config/taxonomy.tags.yaml | 0 .../hosts/features/config/taxonomy.yaml | 0 .../hosts/features/config/users.realm | 0 .../hosts/features/content/.technical/404.md | 0 .../content/.technical/test/example.md | 0 .../content/blog/2023-09/hello-world.md | 0 .../features/content/blog/2023-09/new-post.md | 0 .../features/content/blog/2023-10/new-post.md | 0 .../hosts/features/content/blog/index.md | 0 .../hosts/features/content/contact/index.md | 0 .../features/content/content-editing/index.md | 0 .../content/content-editing/index.part.01.md | 0 .../content/content-editing/index.part.02.md | 0 .../content/content-editing/index.part.03.md | 0 .../hosts/features/content/extending/index.md | 0 .../features/content/forms/contact/success.md | 0 .../hosts/features/content/forms/error.md | 0 .../hosts/features/content/google/index.md | 0 .../hosts/features/content/index.md | 0 .../features/content/installation/index.md | 0 .../hosts/features/content/json/index.md | 0 .../hosts/features/content/modules/index.md | 0 .../features/content/navigation/index.md | 0 .../content/navigation/subfolder/index.md | 0 .../content/navigation/subfolder/other.md | 0 .../hosts/features/content/robots.txt | 0 .../hosts/features/content/search/index.md | 0 .../features/content/shortcodes/index.md | 0 .../features/content/templating/index.md | 0 .../content/templating/index.part.01.md | 0 .../content/templating/index.part.02.md | 0 .../content/templating/index.part.03.md | 0 .../hosts/features/content/view/index.md | 0 .../features/extensions/content.extension.js | 0 .../features/extensions/http.extension.js | 0 .../hosts/features/extensions/libs/module.mjs | 0 .../features/extensions/menu.extension.js | 0 .../features/extensions/query.extension.js | 0 .../features/extensions/template.extension.js | 0 .../features/extensions/test.extension.js | 0 .../hosts/features/extensions/theme.hooks.js | 0 .../hosts/features/extras/products.json | 0 .../hosts/features/messages/labels.properties | 0 .../hosts/features/site-dev.yaml | 0 .../hosts/features/site.globals.js | 0 .../hosts/features/site.yaml | 0 .../hosts/features/templates/contact.html | 0 .../hosts/features/templates/start.html | 0 .../hosts/features/templates/taxonomy.html | 0 .../features/templates/taxonomy.single.html | 0 .../hosts/features/templates/test.json | 0 .../hosts/features/templates/views/test.html | 0 .../hosts/features/test/form.http | 0 .../features/test/forms-module/send.http | 0 .../test/ui-module/directory-create.http | 0 .../test/ui-module/directory-delete.http | 0 .../features/test/ui-module/file-create.http | 0 .../features/test/ui-module/file-read.http | 0 .../features/test/ui-module/file-write.http | 0 .../features/test/ui-module/list-files.http | 0 {cms-server => test-server}/log4j2.xml | 2 +- .../libs/example-module-7.0.0.jar | Bin .../modules/example-module/module.properties | 0 {cms-server => test-server}/server.toml | 0 {cms-server => test-server}/server.yaml | 0 .../themes/demo/assets/style.css | 0 .../themes/demo/config/media.toml | 0 .../themes/demo/extensions/theme.extension.js | 0 .../themes/demo/messages/labels.properties | 0 .../themes/demo/templates/libs/fragments.html | 0 .../themes/demo/templates/start.html | 0 .../themes/demo/theme.toml | 0 .../themes/parent/assets/images/parent.jpg | Bin .../themes/parent/assets/parent.js | 0 .../parent/extensions/parent.extension.js | 0 .../themes/parent/messages/labels.properties | 0 .../themes/parent/templates/blog-entry.html | 0 .../themes/parent/templates/blog.html | 0 .../themes/parent/templates/content.html | 0 .../themes/parent/templates/content.part.html | 0 .../themes/parent/templates/error.html | 0 .../parent/templates/libs/fragments.html | 0 .../themes/parent/templates/navigation.html | 0 .../themes/parent/templates/search.html | 0 .../themes/parent/templates/start.html | 0 .../themes/parent/theme.yaml | 0 .../bootstrap-5.3.2/css/bootstrap.min.css | 0 .../bootstrap-5.3.2/css/bootstrap.min.css.map | 0 .../js/bootstrap.bundle.min.js | 0 .../js/bootstrap.bundle.min.js.map | 0 .../bootstrap-icons.min.css | 0 .../fonts/bootstrap-icons.woff | Bin .../fonts/bootstrap-icons.woff2 | Bin .../themes/test/assets/favicon.ico | Bin .../themes/test/assets/images/test.jpg | Bin .../themes/test/assets/prism-1.29.0/prism.css | 0 .../themes/test/assets/prism-1.29.0/prism.js | 0 .../themes/test/assets/search-1.css | 0 .../themes/test/assets/search-1.js | 0 .../themes/test/extensions/theme.extension.js | 0 .../themes/test/messages/labels.properties | 0 .../themes/test/templates/content.html | 0 .../themes/test/theme.yaml | 0 177 files changed, 259 insertions(+), 148 deletions(-) create mode 100644 cms-api/src/main/java/com/condation/cms/api/utils/ServerUtil.java delete mode 100644 cms-server/src/main/java/com/condation/cms/utils/SiteUtils.java rename {cms-server => test-server}/hosts/Caddyfile (100%) rename {cms-server => test-server}/hosts/demo/assets/favicon.ico (100%) rename {cms-server => test-server}/hosts/demo/assets/images/test.jpg (100%) rename {cms-server => test-server}/hosts/demo/config/media.toml (100%) rename {cms-server => test-server}/hosts/demo/content/.technical/404.md (100%) rename {cms-server => test-server}/hosts/demo/content/index.md (100%) rename {cms-server => test-server}/hosts/demo/content/robots.txt (100%) rename {cms-server => test-server}/hosts/demo/modules_data/example-module/configuration.properties (100%) rename {cms-server => test-server}/hosts/demo/modules_data/markedj-module/configuration.properties (100%) rename {cms-server => test-server}/hosts/demo/modules_data/search-module/configuration.properties (100%) rename {cms-server => test-server}/hosts/demo/modules_data/seo-module/configuration.properties (100%) rename {cms-server => test-server}/hosts/demo/modules_data/thymeleaf-module/configuration.properties (100%) rename {cms-server => test-server}/hosts/demo/site.toml (100%) rename {cms-server => test-server}/hosts/demo2/content/.technical/404.md (100%) rename {cms-server => test-server}/hosts/demo2/content/blog/2023-09/hello-world.md (100%) rename {cms-server => test-server}/hosts/demo2/content/blog/2023-09/new-post.md (100%) rename {cms-server => test-server}/hosts/demo2/content/blog/2023-10/new-post.md (100%) rename {cms-server => test-server}/hosts/demo2/content/blog/index.md (100%) rename {cms-server => test-server}/hosts/demo2/content/index.md (100%) rename {cms-server => test-server}/hosts/demo2/extensions/test.extension.js (100%) rename {cms-server => test-server}/hosts/demo2/messages/labels.properties (100%) rename {cms-server => test-server}/hosts/demo2/modules_data/example-module/configuration.properties (100%) rename {cms-server => test-server}/hosts/demo2/modules_data/markedjs-module/configuration.properties (100%) rename {cms-server => test-server}/hosts/demo2/modules_data/pebble-module/configuration.properties (100%) rename {cms-server => test-server}/hosts/demo2/modules_data/thymeleaf-module/configuration.properties (100%) rename {cms-server => test-server}/hosts/demo2/site.yaml (100%) rename {cms-server => test-server}/hosts/demo2/templates/blog-entry.html (100%) rename {cms-server => test-server}/hosts/demo2/templates/blog.html (100%) rename {cms-server => test-server}/hosts/demo2/templates/start.html (100%) rename {cms-server => test-server}/hosts/features/assets/app-1.js (100%) rename {cms-server => test-server}/hosts/features/assets/favicon.ico (100%) rename {cms-server => test-server}/hosts/features/assets/form-1.css (100%) rename {cms-server => test-server}/hosts/features/assets/form-1.js (100%) rename {cms-server => test-server}/hosts/features/assets/images/test.jpg (100%) rename {cms-server => test-server}/hosts/features/assets/images/test.jpg.meta.yaml (100%) rename {cms-server => test-server}/hosts/features/assets/styles-1.css (100%) rename {cms-server => test-server}/hosts/features/config/auth.yaml (100%) rename {cms-server => test-server}/hosts/features/config/forms.yaml (100%) rename {cms-server => test-server}/hosts/features/config/taxonomy.tags.yaml (100%) rename {cms-server => test-server}/hosts/features/config/taxonomy.yaml (100%) rename {cms-server => test-server}/hosts/features/config/users.realm (100%) rename {cms-server => test-server}/hosts/features/content/.technical/404.md (100%) rename {cms-server => test-server}/hosts/features/content/.technical/test/example.md (100%) rename {cms-server => test-server}/hosts/features/content/blog/2023-09/hello-world.md (100%) rename {cms-server => test-server}/hosts/features/content/blog/2023-09/new-post.md (100%) rename {cms-server => test-server}/hosts/features/content/blog/2023-10/new-post.md (100%) rename {cms-server => test-server}/hosts/features/content/blog/index.md (100%) rename {cms-server => test-server}/hosts/features/content/contact/index.md (100%) rename {cms-server => test-server}/hosts/features/content/content-editing/index.md (100%) rename {cms-server => test-server}/hosts/features/content/content-editing/index.part.01.md (100%) rename {cms-server => test-server}/hosts/features/content/content-editing/index.part.02.md (100%) rename {cms-server => test-server}/hosts/features/content/content-editing/index.part.03.md (100%) rename {cms-server => test-server}/hosts/features/content/extending/index.md (100%) rename {cms-server => test-server}/hosts/features/content/forms/contact/success.md (100%) rename {cms-server => test-server}/hosts/features/content/forms/error.md (100%) rename {cms-server => test-server}/hosts/features/content/google/index.md (100%) rename {cms-server => test-server}/hosts/features/content/index.md (100%) rename {cms-server => test-server}/hosts/features/content/installation/index.md (100%) rename {cms-server => test-server}/hosts/features/content/json/index.md (100%) rename {cms-server => test-server}/hosts/features/content/modules/index.md (100%) rename {cms-server => test-server}/hosts/features/content/navigation/index.md (100%) rename {cms-server => test-server}/hosts/features/content/navigation/subfolder/index.md (100%) rename {cms-server => test-server}/hosts/features/content/navigation/subfolder/other.md (100%) rename {cms-server => test-server}/hosts/features/content/robots.txt (100%) rename {cms-server => test-server}/hosts/features/content/search/index.md (100%) rename {cms-server => test-server}/hosts/features/content/shortcodes/index.md (100%) rename {cms-server => test-server}/hosts/features/content/templating/index.md (100%) rename {cms-server => test-server}/hosts/features/content/templating/index.part.01.md (100%) rename {cms-server => test-server}/hosts/features/content/templating/index.part.02.md (100%) rename {cms-server => test-server}/hosts/features/content/templating/index.part.03.md (100%) rename {cms-server => test-server}/hosts/features/content/view/index.md (100%) rename {cms-server => test-server}/hosts/features/extensions/content.extension.js (100%) rename {cms-server => test-server}/hosts/features/extensions/http.extension.js (100%) rename {cms-server => test-server}/hosts/features/extensions/libs/module.mjs (100%) rename {cms-server => test-server}/hosts/features/extensions/menu.extension.js (100%) rename {cms-server => test-server}/hosts/features/extensions/query.extension.js (100%) rename {cms-server => test-server}/hosts/features/extensions/template.extension.js (100%) rename {cms-server => test-server}/hosts/features/extensions/test.extension.js (100%) rename {cms-server => test-server}/hosts/features/extensions/theme.hooks.js (100%) rename {cms-server => test-server}/hosts/features/extras/products.json (100%) rename {cms-server => test-server}/hosts/features/messages/labels.properties (100%) rename {cms-server => test-server}/hosts/features/site-dev.yaml (100%) rename {cms-server => test-server}/hosts/features/site.globals.js (100%) rename {cms-server => test-server}/hosts/features/site.yaml (100%) rename {cms-server => test-server}/hosts/features/templates/contact.html (100%) rename {cms-server => test-server}/hosts/features/templates/start.html (100%) rename {cms-server => test-server}/hosts/features/templates/taxonomy.html (100%) rename {cms-server => test-server}/hosts/features/templates/taxonomy.single.html (100%) rename {cms-server => test-server}/hosts/features/templates/test.json (100%) rename {cms-server => test-server}/hosts/features/templates/views/test.html (100%) rename {cms-server => test-server}/hosts/features/test/form.http (100%) rename {cms-server => test-server}/hosts/features/test/forms-module/send.http (100%) rename {cms-server => test-server}/hosts/features/test/ui-module/directory-create.http (100%) rename {cms-server => test-server}/hosts/features/test/ui-module/directory-delete.http (100%) rename {cms-server => test-server}/hosts/features/test/ui-module/file-create.http (100%) rename {cms-server => test-server}/hosts/features/test/ui-module/file-read.http (100%) rename {cms-server => test-server}/hosts/features/test/ui-module/file-write.http (100%) rename {cms-server => test-server}/hosts/features/test/ui-module/list-files.http (100%) rename {cms-server => test-server}/log4j2.xml (96%) rename {cms-server => test-server}/modules/example-module/libs/example-module-7.0.0.jar (100%) rename {cms-server => test-server}/modules/example-module/module.properties (100%) rename {cms-server => test-server}/server.toml (100%) rename {cms-server => test-server}/server.yaml (100%) rename {cms-server => test-server}/themes/demo/assets/style.css (100%) rename {cms-server => test-server}/themes/demo/config/media.toml (100%) rename {cms-server => test-server}/themes/demo/extensions/theme.extension.js (100%) rename {cms-server => test-server}/themes/demo/messages/labels.properties (100%) rename {cms-server => test-server}/themes/demo/templates/libs/fragments.html (100%) rename {cms-server => test-server}/themes/demo/templates/start.html (100%) rename {cms-server => test-server}/themes/demo/theme.toml (100%) rename {cms-server => test-server}/themes/parent/assets/images/parent.jpg (100%) rename {cms-server => test-server}/themes/parent/assets/parent.js (100%) rename {cms-server => test-server}/themes/parent/extensions/parent.extension.js (100%) rename {cms-server => test-server}/themes/parent/messages/labels.properties (100%) rename {cms-server => test-server}/themes/parent/templates/blog-entry.html (100%) rename {cms-server => test-server}/themes/parent/templates/blog.html (100%) rename {cms-server => test-server}/themes/parent/templates/content.html (100%) rename {cms-server => test-server}/themes/parent/templates/content.part.html (100%) rename {cms-server => test-server}/themes/parent/templates/error.html (100%) rename {cms-server => test-server}/themes/parent/templates/libs/fragments.html (100%) rename {cms-server => test-server}/themes/parent/templates/navigation.html (100%) rename {cms-server => test-server}/themes/parent/templates/search.html (100%) rename {cms-server => test-server}/themes/parent/templates/start.html (100%) rename {cms-server => test-server}/themes/parent/theme.yaml (100%) rename {cms-server => test-server}/themes/test/assets/bootstrap-5.3.2/css/bootstrap.min.css (100%) rename {cms-server => test-server}/themes/test/assets/bootstrap-5.3.2/css/bootstrap.min.css.map (100%) rename {cms-server => test-server}/themes/test/assets/bootstrap-5.3.2/js/bootstrap.bundle.min.js (100%) rename {cms-server => test-server}/themes/test/assets/bootstrap-5.3.2/js/bootstrap.bundle.min.js.map (100%) rename {cms-server => test-server}/themes/test/assets/bootstrap-icons-1.11.1/bootstrap-icons.min.css (100%) rename {cms-server => test-server}/themes/test/assets/bootstrap-icons-1.11.1/fonts/bootstrap-icons.woff (100%) rename {cms-server => test-server}/themes/test/assets/bootstrap-icons-1.11.1/fonts/bootstrap-icons.woff2 (100%) rename {cms-server => test-server}/themes/test/assets/favicon.ico (100%) rename {cms-server => test-server}/themes/test/assets/images/test.jpg (100%) rename {cms-server => test-server}/themes/test/assets/prism-1.29.0/prism.css (100%) rename {cms-server => test-server}/themes/test/assets/prism-1.29.0/prism.js (100%) rename {cms-server => test-server}/themes/test/assets/search-1.css (100%) rename {cms-server => test-server}/themes/test/assets/search-1.js (100%) rename {cms-server => test-server}/themes/test/extensions/theme.extension.js (100%) rename {cms-server => test-server}/themes/test/messages/labels.properties (100%) rename {cms-server => test-server}/themes/test/templates/content.html (100%) rename {cms-server => test-server}/themes/test/theme.yaml (100%) diff --git a/.gitignore b/.gitignore index f301e4aa..4007c6ce 100644 --- a/.gitignore +++ b/.gitignore @@ -37,7 +37,30 @@ cms-server/modules/seo-module cms-server/modules/forms-module cms-server/modules/markedj-module cms-server/cms.pid +/cms-server/hosts/features/data/ /distribution/temp/ /distribution/build/ /distribution/dist/ -/cms-server/hosts/features/data/ +test-server/hosts/marx-software +test-server/hosts/demo/modules_data/search-module/index +test-server/hosts/demo/modules_data/ui-module +test-server/hosts/demo/temp/ +test-server/hosts/features/modules_data/ +test-server/hosts/features/temp +test-server/hosts/features_de/modules_data/ +test-server/hosts/features_de/temp/ +test-server/hosts/theme-demo/modules_data/search-module/index +test-server/hosts/theme-demo/modules_data/ui-module +test-server/modules/flexmark-module +test-server/modules/markedjs-module +test-server/modules/pebble-module +test-server/modules/thymeleaf-module +test-server/modules/freemarker-module +test-server/modules/ui-module +test-server/modules/pug-module +test-server/modules/search-module +test-server/modules/seo-module +test-server/modules/forms-module +test-server/modules/markedj-module +test-server/cms.pid +test-server/hosts/features/data/ \ No newline at end of file diff --git a/cms-api/src/main/java/com/condation/cms/api/Constants.java b/cms-api/src/main/java/com/condation/cms/api/Constants.java index 49d033a1..78ccab5a 100644 --- a/cms-api/src/main/java/com/condation/cms/api/Constants.java +++ b/cms-api/src/main/java/com/condation/cms/api/Constants.java @@ -70,6 +70,8 @@ public static class Folders { public static final String ASSETS = "assets/"; public static final String EXTENSIONS = "extensions/"; public static final String MODULES = "modules/"; + public static final String HOSTS = "hosts/"; + public static final String THEMES = "themes/"; } public static class NodeType { diff --git a/cms-api/src/main/java/com/condation/cms/api/utils/ServerUtil.java b/cms-api/src/main/java/com/condation/cms/api/utils/ServerUtil.java new file mode 100644 index 00000000..e8ce243f --- /dev/null +++ b/cms-api/src/main/java/com/condation/cms/api/utils/ServerUtil.java @@ -0,0 +1,44 @@ +package com.condation.cms.api.utils; + +/*- + * #%L + * cms-api + * %% + * Copyright (C) 2023 - 2024 CondationCMS + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * . + * #L% + */ + +import java.nio.file.Path; + +public final class ServerUtil { + + private ServerUtil(){} + + public static Path getHome () { + if (System.getenv().containsKey("CMS_HOME")) { + return Path.of(System.getenv("CMS_HOME")); + } + if (System.getProperties().containsKey("cms.home")) { + return Path.of(System.getProperties().getProperty("cms.home")); + } + return Path.of("."); + } + + public static Path getPath (String path) { + return getHome().resolve(path); + } +} diff --git a/cms-api/src/main/java/com/condation/cms/api/utils/SiteUtil.java b/cms-api/src/main/java/com/condation/cms/api/utils/SiteUtil.java index a62ff1c3..715a0877 100644 --- a/cms-api/src/main/java/com/condation/cms/api/utils/SiteUtil.java +++ b/cms-api/src/main/java/com/condation/cms/api/utils/SiteUtil.java @@ -24,6 +24,11 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; + +import com.condation.cms.api.SiteProperties; +import com.condation.cms.api.theme.Theme; /** * @@ -38,4 +43,21 @@ public static boolean isSite(Path check) { return Files.exists(check.resolve("site.yaml")) || Files.exists(check.resolve("site.toml")); } + + public static List getActiveModules(SiteProperties siteProperties, Theme theme) { + List activeModules = new ArrayList<>(); + activeModules.addAll(siteProperties.activeModules()); + if (!theme.empty()) { + activeModules.addAll(theme.properties().activeModules()); + + if (theme.getParentTheme() != null) { + activeModules.addAll(theme.getParentTheme().properties().activeModules()); + } + } + return activeModules; + } + + public static String getRequiredTheme(SiteProperties siteProperties, Theme theme) { + return siteProperties.theme(); + } } diff --git a/cms-core/src/main/java/com/condation/cms/core/configuration/ConfigurationFactory.java b/cms-core/src/main/java/com/condation/cms/core/configuration/ConfigurationFactory.java index a7fc0aef..1c2b085c 100644 --- a/cms-core/src/main/java/com/condation/cms/core/configuration/ConfigurationFactory.java +++ b/cms-core/src/main/java/com/condation/cms/core/configuration/ConfigurationFactory.java @@ -1,5 +1,6 @@ package com.condation.cms.core.configuration; +import com.condation.cms.api.Constants; /*- * #%L * tests @@ -25,6 +26,7 @@ import com.condation.cms.core.configuration.configs.SimpleConfiguration; import com.condation.cms.api.eventbus.EventBus; import com.condation.cms.api.scheduler.CronJobScheduler; +import com.condation.cms.api.utils.ServerUtil; import com.condation.cms.core.configuration.configs.MediaConfiguration; import com.condation.cms.core.configuration.configs.TaxonomyConfiguration; import com.condation.cms.core.configuration.reload.CronReload; @@ -93,11 +95,12 @@ public static SimpleConfiguration themeConfiguration(String id, String themePath return themeConfiguration(id, null, themePath); } private static SimpleConfiguration themeConfiguration(String id, EventBus eventBus, String theme) throws IOException { + var themeBase = ServerUtil.getPath(Constants.Folders.THEMES); return SimpleConfiguration.builder(eventBus) .id(id) .reloadStrategy(new NoReload()) - .addSource(YamlConfigSource.build(Path.of("themes/%s/theme.yaml".formatted(theme)))) - .addSource(TomlConfigSource.build(Path.of("themes/%s/theme.toml".formatted(theme)))) + .addSource(YamlConfigSource.build(themeBase.resolve("%s/theme.yaml".formatted(theme)))) + .addSource(TomlConfigSource.build(themeBase.resolve("%s/theme.toml".formatted(theme)))) .build(); } @@ -108,18 +111,19 @@ private static SimpleConfiguration serverConfiguration(EventBus eventBus) throws return SimpleConfiguration.builder(eventBus) .id("server") .reloadStrategy(new NoReload()) - .addSource(YamlConfigSource.build(Path.of("server.yaml"))) - .addSource(TomlConfigSource.build(Path.of("server.toml"))) + .addSource(YamlConfigSource.build(ServerUtil.getPath("server.yaml"))) + .addSource(TomlConfigSource.build(ServerUtil.getPath("server.toml"))) .build(); } private static MediaConfiguration mediaConfiguration(EventBus eventBus, Path hostBase, List themes) throws IOException { + var themeBase = ServerUtil.getPath(Constants.Folders.THEMES); List themeSources = new ArrayList<>(); for (String theme : themes) { themeSources.add( - YamlConfigSource.build(Path.of("themes/%s/config/media.yaml".formatted(theme)))); + YamlConfigSource.build(themeBase.resolve("%s/config/media.yaml".formatted(theme)))); themeSources.add( - TomlConfigSource.build(Path.of("themes/%s/config/media.toml".formatted(theme)))); + TomlConfigSource.build(themeBase.resolve("%s/config/media.toml".formatted(theme)))); }; themeSources.add(YamlConfigSource.build(hostBase.resolve("config/media.yaml"))); @@ -165,6 +169,7 @@ private static TaxonomyConfiguration taxonomyConfiguration(EventBus eventBus, Pa return TaxonomyConfiguration.builder(eventBus) .id("taxonomy") .reloadStrategy(reloadStrategy) + .hostBase(hostBase) .addSource(YamlConfigSource.build(hostBase.resolve("config/taxonomy.yaml"))) .addSource(TomlConfigSource.build(hostBase.resolve("config/taxonomy.toml"))) .build(); diff --git a/cms-core/src/main/java/com/condation/cms/core/configuration/configs/TaxonomyConfiguration.java b/cms-core/src/main/java/com/condation/cms/core/configuration/configs/TaxonomyConfiguration.java index 1c9e2c29..464af957 100644 --- a/cms-core/src/main/java/com/condation/cms/core/configuration/configs/TaxonomyConfiguration.java +++ b/cms-core/src/main/java/com/condation/cms/core/configuration/configs/TaxonomyConfiguration.java @@ -56,6 +56,7 @@ public class TaxonomyConfiguration extends AbstractConfiguration implements ICon private final ReloadStrategy reloadStrategy; private final EventBus eventBus; private final String id; + private final Path hostBase; private ConcurrentMap taxonomies = new ConcurrentHashMap<>(); @@ -64,6 +65,7 @@ public TaxonomyConfiguration(Builder builder) { this.reloadStrategy = builder.reloadStrategy; this.eventBus = builder.eventBus; this.id = builder.id; + this.hostBase = builder.hostBase; reloadStrategy.register(this); reload(); @@ -109,8 +111,8 @@ private void loadValues(Taxonomy taxonomy) { var tomlFile = "configs/taxonomy.%s.toml".formatted(taxonomy.getSlug()); var valueSrc = List.of( - YamlConfigSource.build(Path.of(yamlFile)), - TomlConfigSource.build(Path.of(tomlFile)) + YamlConfigSource.build(hostBase.resolve(yamlFile)), + TomlConfigSource.build(hostBase.resolve(tomlFile)) ); var values = valueSrc.stream() @@ -138,11 +140,17 @@ public static class Builder { private ReloadStrategy reloadStrategy = new NoReload(); private String id = UUID.randomUUID().toString(); private final EventBus eventBus; + private Path hostBase; public Builder (EventBus eventbus) { this.eventBus = eventbus; } + public Builder hostBase (Path hostBase) { + this.hostBase = hostBase; + return this; + } + public Builder id (String uniqueId) { this.id = uniqueId; return this; diff --git a/cms-core/src/main/java/com/condation/cms/core/configuration/properties/ExtendedServerProperties.java b/cms-core/src/main/java/com/condation/cms/core/configuration/properties/ExtendedServerProperties.java index 4ffa74c4..c2b101ea 100644 --- a/cms-core/src/main/java/com/condation/cms/core/configuration/properties/ExtendedServerProperties.java +++ b/cms-core/src/main/java/com/condation/cms/core/configuration/properties/ExtendedServerProperties.java @@ -27,6 +27,7 @@ import com.condation.cms.api.IPCProperties; import com.condation.cms.api.PerformanceProperties; import com.condation.cms.api.ServerProperties; +import com.condation.cms.api.utils.ServerUtil; import com.condation.cms.core.configuration.configs.SimpleConfiguration; import java.nio.file.Path; @@ -59,7 +60,7 @@ public APMProperties apm() { @Override public Path getThemesFolder() { - return Path.of("themes/"); + return ServerUtil.getPath(Constants.Folders.THEMES); } @Override diff --git a/cms-core/src/main/java/com/condation/cms/core/theme/DefaultTheme.java b/cms-core/src/main/java/com/condation/cms/core/theme/DefaultTheme.java index 2815f8f3..d2a3af15 100644 --- a/cms-core/src/main/java/com/condation/cms/core/theme/DefaultTheme.java +++ b/cms-core/src/main/java/com/condation/cms/core/theme/DefaultTheme.java @@ -1,5 +1,9 @@ package com.condation.cms.core.theme; +import java.io.IOException; +import java.nio.file.Path; +import java.util.Map; + /*- * #%L * cms-server @@ -25,22 +29,15 @@ import com.condation.cms.api.ServerProperties; import com.condation.cms.api.SiteProperties; import com.condation.cms.api.ThemeProperties; -import com.condation.cms.core.messages.EmptyMessageSource; import com.condation.cms.api.messages.MessageSource; -import com.condation.cms.core.messages.ThemeMessageSource; import com.condation.cms.api.theme.Theme; -import com.condation.cms.core.configuration.ConfigManagement; import com.condation.cms.core.configuration.ConfigurationFactory; import com.condation.cms.core.configuration.properties.ExtendedThemeProperties; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.Collections; -import java.util.Map; +import com.condation.cms.core.messages.EmptyMessageSource; +import com.condation.cms.core.messages.ThemeMessageSource; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.yaml.snakeyaml.Yaml; /** * diff --git a/cms-core/src/test/java/com/condation/cms/core/configuration/TaxonomyConfigurationTest.java b/cms-core/src/test/java/com/condation/cms/core/configuration/TaxonomyConfigurationTest.java index 41067424..a2f05c6d 100644 --- a/cms-core/src/test/java/com/condation/cms/core/configuration/TaxonomyConfigurationTest.java +++ b/cms-core/src/test/java/com/condation/cms/core/configuration/TaxonomyConfigurationTest.java @@ -52,6 +52,7 @@ public class TaxonomyConfigurationTest { public void setup() throws IOException, SchedulerException { configuration = TaxonomyConfiguration.builder(eventBus) .id("taxonomy-config") + .hostBase(Path.of(".")) .addSource(YamlConfigSource.build(Path.of("configs/taxonomy.yaml"))) .addSource(TomlConfigSource.build(Path.of("configs/taxonomy.toml"))) .build(); diff --git a/cms-git/pom.xml b/cms-git/pom.xml index 3a87a19f..f660d2b7 100644 --- a/cms-git/pom.xml +++ b/cms-git/pom.xml @@ -9,6 +9,10 @@ cms-git jar + + com.condation.cms + cms-api + org.eclipse.jgit org.eclipse.jgit diff --git a/cms-git/src/main/java/com/condation/cms/git/tasks/CloneTask.java b/cms-git/src/main/java/com/condation/cms/git/tasks/CloneTask.java index 73c30b35..7e09c2cc 100644 --- a/cms-git/src/main/java/com/condation/cms/git/tasks/CloneTask.java +++ b/cms-git/src/main/java/com/condation/cms/git/tasks/CloneTask.java @@ -1,5 +1,7 @@ package com.condation.cms.git.tasks; +import com.condation.cms.api.utils.ServerUtil; + /*- * #%L * cms-git @@ -47,7 +49,7 @@ public class CloneTask implements Task { @Override public Boolean call() throws Exception { - Path targetFolder = Path.of(repo.getFolder()); + Path targetFolder = ServerUtil.getPath(repo.getFolder()); if (Files.exists(targetFolder)) { log.trace("repository already cloned"); return Boolean.TRUE; @@ -62,7 +64,7 @@ public Boolean call() throws Exception { try { result = Git.cloneRepository() .setURI(repo.getUri()) - .setDirectory(new File(repo.getFolder())) + .setDirectory(targetFolder.toFile()) .setBranchesToClone(Arrays.asList("refs/heads/" + repo.getBranch())) .setBranch("refs/heads/" + repo.getBranch()) .setCredentialsProvider(credentialProvider) diff --git a/cms-git/src/main/java/com/condation/cms/git/tasks/FetchTask.java b/cms-git/src/main/java/com/condation/cms/git/tasks/FetchTask.java index d34cc490..31d2bc38 100644 --- a/cms-git/src/main/java/com/condation/cms/git/tasks/FetchTask.java +++ b/cms-git/src/main/java/com/condation/cms/git/tasks/FetchTask.java @@ -1,5 +1,7 @@ package com.condation.cms.git.tasks; +import com.condation.cms.api.utils.ServerUtil; + /*- * #%L * cms-git @@ -45,7 +47,7 @@ public class FetchTask implements Task { @Override public Boolean call() throws Exception { - Path targetFolder = Path.of(repo.getFolder()); + Path targetFolder = ServerUtil.getPath(repo.getFolder()); if (!Files.exists(targetFolder)) { log.trace("target folder does not exists"); return Boolean.FALSE; @@ -56,7 +58,7 @@ public Boolean call() throws Exception { repo.getCredentials().getPassword() ); - Git git_repo = Git.open(new File(repo.getFolder())); + Git git_repo = Git.open(targetFolder.toFile()); try { var result = git_repo.fetch() diff --git a/cms-git/src/main/java/com/condation/cms/git/tasks/MergeTask.java b/cms-git/src/main/java/com/condation/cms/git/tasks/MergeTask.java index c996fb5c..f30287ab 100644 --- a/cms-git/src/main/java/com/condation/cms/git/tasks/MergeTask.java +++ b/cms-git/src/main/java/com/condation/cms/git/tasks/MergeTask.java @@ -1,5 +1,7 @@ package com.condation.cms.git.tasks; +import com.condation.cms.api.utils.ServerUtil; + /*- * #%L * cms-git @@ -45,7 +47,7 @@ public class MergeTask implements Task { @Override public Boolean call() throws Exception { - Path targetFolder = Path.of(repo.getFolder()); + Path targetFolder = ServerUtil.getPath(repo.getFolder()); if (!Files.exists(targetFolder)) { log.trace("target folder does not exists"); return Boolean.FALSE; @@ -56,7 +58,7 @@ public Boolean call() throws Exception { repo.getCredentials().getPassword() ); - Git git_repo = Git.open(new File(repo.getFolder())); + Git git_repo = Git.open(targetFolder.toFile()); try { var result = git_repo.merge() diff --git a/cms-git/src/main/java/com/condation/cms/git/tasks/ResetTask.java b/cms-git/src/main/java/com/condation/cms/git/tasks/ResetTask.java index 3120c92c..2acaf960 100644 --- a/cms-git/src/main/java/com/condation/cms/git/tasks/ResetTask.java +++ b/cms-git/src/main/java/com/condation/cms/git/tasks/ResetTask.java @@ -1,5 +1,7 @@ package com.condation.cms.git.tasks; +import com.condation.cms.api.utils.ServerUtil; + /*- * #%L * cms-git @@ -46,7 +48,7 @@ public class ResetTask implements Task { @Override public Boolean call() throws Exception { - Path targetFolder = Path.of(repo.getFolder()); + Path targetFolder = ServerUtil.getPath(repo.getFolder()); if (!Files.exists(targetFolder)) { log.trace("target folder does not exists"); return Boolean.FALSE; @@ -57,7 +59,7 @@ public Boolean call() throws Exception { repo.getCredentials().getPassword() ); - Git git_repo = Git.open(new File(repo.getFolder())); + Git git_repo = Git.open(targetFolder.toFile()); try { git_repo.reset().setMode(ResetCommand.ResetType.HARD).setRef("refs/heads/" + repo.getBranch()); diff --git a/cms-server/nbactions-dist.xml b/cms-server/nbactions-dist.xml index c6755fb3..faa399eb 100644 --- a/cms-server/nbactions-dist.xml +++ b/cms-server/nbactions-dist.xml @@ -12,7 +12,7 @@ ${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs} - server start + server start -Dcms.home=../test-server/ com.condation.cms.cli.CMSCli java @@ -29,7 +29,7 @@ -agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address} ${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs} - server start + server start -Dcms.home=../test-server/ com.condation.cms.cli.CMSCli java true @@ -49,7 +49,7 @@ ${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs} com.condation.cms.cli.CMSCli java - server start + server start -Dcms.home=../test-server/ diff --git a/cms-server/src/main/java/com/condation/cms/CMSServer.java b/cms-server/src/main/java/com/condation/cms/CMSServer.java index 9ce0ec8c..2fb9deb9 100644 --- a/cms-server/src/main/java/com/condation/cms/CMSServer.java +++ b/cms-server/src/main/java/com/condation/cms/CMSServer.java @@ -25,6 +25,8 @@ import com.condation.cms.api.Constants; +import com.condation.cms.api.utils.ServerUtil; + import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @@ -40,11 +42,12 @@ public class CMSServer { public static boolean isRunning () { - if (!Files.exists(Path.of(Constants.PID_FILE))) { + var pidFile = ServerUtil.getPath(Constants.PID_FILE); + if (!Files.exists(pidFile)) { return false; } try { - var pid = Files.readString(Path.of(Constants.PID_FILE)); + var pid = Files.readString(pidFile); return ProcessHandle.of(Long.parseLong(pid)).isPresent(); } catch (IOException ex) { diff --git a/cms-server/src/main/java/com/condation/cms/cli/CMSCli.java b/cms-server/src/main/java/com/condation/cms/cli/CMSCli.java index 92b1e653..91545518 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/CMSCli.java +++ b/cms-server/src/main/java/com/condation/cms/cli/CMSCli.java @@ -24,6 +24,10 @@ import java.io.File; +import java.nio.file.Path; + +import com.condation.cms.api.utils.ServerUtil; + import picocli.CommandLine; /** @@ -33,9 +37,13 @@ public class CMSCli { static { - File log4j2File = new File("log4j2.xml"); + File log4j2File = ServerUtil.getPath("log4j2.xml").toFile(); if (log4j2File.exists()) { System.setProperty("log4j2.configurationFile", log4j2File.toURI().toString()); + if (System.getProperty("cms-logs-folder") == null) { + var relative = Path.of(".").relativize(ServerUtil.getPath("logs/")); + System.setProperty("cms-logs-folder", relative.toString()); + } } } diff --git a/cms-server/src/main/java/com/condation/cms/cli/commands/extensions/InstallCommand.java b/cms-server/src/main/java/com/condation/cms/cli/commands/extensions/InstallCommand.java index 23aca649..0d7daebd 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/commands/extensions/InstallCommand.java +++ b/cms-server/src/main/java/com/condation/cms/cli/commands/extensions/InstallCommand.java @@ -1,5 +1,8 @@ package com.condation.cms.cli.commands.extensions; +import com.condation.cms.api.Constants; +import com.condation.cms.api.utils.ServerUtil; + /*- * #%L * cms-server @@ -82,16 +85,17 @@ public void run() { } try { - if (!Files.exists(Path.of("hosts/%s".formatted(host)))) { + var hostsBase = ServerUtil.getPath(Constants.Folders.HOSTS); + if (!Files.exists(hostsBase.resolve("%s".formatted(host)))) { System.err.printf("site %s doesn't exists", host); return; } - if (!Files.exists(Path.of("hosts/%s/extensions".formatted(host)))) { - Files.createDirectories(Path.of("hosts/%s/extensions".formatted(host))); + if (!Files.exists(hostsBase.resolve("%s/extensions".formatted(host)))) { + Files.createDirectories(hostsBase.resolve("%s/extensions".formatted(host))); } Files.writeString( - Path.of("hosts/%s/extensions/%s.js".formatted(host, extension)), + hostsBase.resolve("%s/extensions/%s.js".formatted(host, extension)), content.get()); System.out.printf("extension '%s' successfuly downloaded into '%s'!", extension, host); diff --git a/cms-server/src/main/java/com/condation/cms/cli/commands/host/ReloadHost.java b/cms-server/src/main/java/com/condation/cms/cli/commands/host/ReloadHost.java index 02405357..9cf23af6 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/commands/host/ReloadHost.java +++ b/cms-server/src/main/java/com/condation/cms/cli/commands/host/ReloadHost.java @@ -26,6 +26,7 @@ import com.condation.cms.api.Constants; import com.condation.cms.api.ServerProperties; +import com.condation.cms.api.utils.ServerUtil; import com.condation.cms.core.configuration.ConfigurationFactory; import com.condation.cms.core.configuration.properties.ExtendedServerProperties; import com.condation.cms.ipc.Command; @@ -80,10 +81,11 @@ public void run() { } private static Optional getCMSProcess () throws Exception { - if (!Files.exists(Path.of(Constants.PID_FILE))) { + var pidFile = ServerUtil.getPath(Constants.PID_FILE); + if (!Files.exists(pidFile)) { return Optional.empty(); } - var pid = Files.readString(Path.of(Constants.PID_FILE)); + var pid = Files.readString(pidFile); return ProcessHandle.of(Long.parseLong(pid.trim())); } diff --git a/cms-server/src/main/java/com/condation/cms/cli/commands/modules/AbstractModuleCommand.java b/cms-server/src/main/java/com/condation/cms/cli/commands/modules/AbstractModuleCommand.java index bbfefd65..be7ac516 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/commands/modules/AbstractModuleCommand.java +++ b/cms-server/src/main/java/com/condation/cms/cli/commands/modules/AbstractModuleCommand.java @@ -25,6 +25,7 @@ import com.condation.cms.CMSServer; +import com.condation.cms.api.utils.ServerUtil; import com.condation.cms.extensions.repository.ModuleInfo; import com.condation.cms.extensions.repository.RemoteModuleRepository; import java.io.IOException; @@ -58,11 +59,11 @@ public boolean isCompatibleWithServer(String extension) { } public static Path getModuleFolder (String module) { - return Path.of("modules/" + module); + return ServerUtil.getPath("modules/" + module); } public static void createModulesFolder () throws IOException { - var modPath = Path.of("modules/"); + var modPath = ServerUtil.getPath("modules/"); if (!Files.exists(modPath)) { Files.createDirectories(modPath); } diff --git a/cms-server/src/main/java/com/condation/cms/cli/commands/modules/GetAllCommand.java b/cms-server/src/main/java/com/condation/cms/cli/commands/modules/GetAllCommand.java index 3cf4eb83..5bfd2c4b 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/commands/modules/GetAllCommand.java +++ b/cms-server/src/main/java/com/condation/cms/cli/commands/modules/GetAllCommand.java @@ -22,6 +22,7 @@ * #L% */ import com.condation.cms.CMSServer; +import com.condation.cms.api.utils.ServerUtil; import com.condation.cms.cli.tools.ModulesUtil; import com.condation.cms.extensions.repository.InstallationHelper; import java.io.IOException; @@ -89,7 +90,7 @@ private boolean installModule(String module) { var info = getRepository().getInfo(module).get(); System.out.printf("get module %s \r\n", module); - getRepository().download(info.getFile(), Path.of("modules/")); + getRepository().download(info.getFile(), ServerUtil.getPath("modules/")); System.out.println("module downloaded"); return true; } else { diff --git a/cms-server/src/main/java/com/condation/cms/cli/commands/modules/GetCommand.java b/cms-server/src/main/java/com/condation/cms/cli/commands/modules/GetCommand.java index d213865b..ef4b6ad6 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/commands/modules/GetCommand.java +++ b/cms-server/src/main/java/com/condation/cms/cli/commands/modules/GetCommand.java @@ -24,6 +24,9 @@ import com.condation.cms.CMSServer; +import com.condation.cms.api.Constants; +import com.condation.cms.api.utils.ServerUtil; + import static com.condation.cms.cli.commands.modules.AbstractModuleCommand.createModulesFolder; import com.condation.cms.extensions.repository.InstallationHelper; import java.io.IOException; @@ -83,7 +86,7 @@ public void run() { var info = getRepository().getInfo(module).get(); System.out.printf("get module %s \r\n", module); - getRepository().download(info.getFile(), Path.of("modules/")); + getRepository().download(info.getFile(), ServerUtil.getPath(Constants.Folders.MODULES)); System.out.println("module downloaded"); } else { System.out.printf("can not find module %s in registry", module); diff --git a/cms-server/src/main/java/com/condation/cms/cli/commands/server/AddUser.java b/cms-server/src/main/java/com/condation/cms/cli/commands/server/AddUser.java index 148939b2..ca5730f0 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/commands/server/AddUser.java +++ b/cms-server/src/main/java/com/condation/cms/cli/commands/server/AddUser.java @@ -1,5 +1,8 @@ package com.condation.cms.cli.commands.server; +import com.condation.cms.api.Constants; +import com.condation.cms.api.utils.ServerUtil; + /*- * #%L * cms-server @@ -63,7 +66,7 @@ public class AddUser implements Runnable { @Override public void run() { try { - UserService userService = new UserService(Path.of("hosts/" + host)); + UserService userService = new UserService(ServerUtil.getPath(Constants.Folders.HOSTS).resolve(host)); userService.addUser(UserService.Realm.of(realm), username, password, groups); log.info("user added successfuly"); diff --git a/cms-server/src/main/java/com/condation/cms/cli/commands/server/RemoveUser.java b/cms-server/src/main/java/com/condation/cms/cli/commands/server/RemoveUser.java index 52d860b9..630b9fbf 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/commands/server/RemoveUser.java +++ b/cms-server/src/main/java/com/condation/cms/cli/commands/server/RemoveUser.java @@ -1,5 +1,8 @@ package com.condation.cms.cli.commands.server; +import com.condation.cms.api.Constants; +import com.condation.cms.api.utils.ServerUtil; + /*- * #%L * cms-server @@ -53,7 +56,7 @@ public class RemoveUser implements Runnable { @Override public void run() { try { - UserService userService = new UserService(Path.of("hosts/" + host)); + UserService userService = new UserService(ServerUtil.getPath(Constants.Folders.HOSTS).resolve(host)); userService.removeUser(UserService.Realm.of(realm), username); log.info("user added successfuly"); diff --git a/cms-server/src/main/java/com/condation/cms/cli/commands/server/Startup.java b/cms-server/src/main/java/com/condation/cms/cli/commands/server/Startup.java index cc9527e1..f49aafd5 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/commands/server/Startup.java +++ b/cms-server/src/main/java/com/condation/cms/cli/commands/server/Startup.java @@ -27,6 +27,7 @@ import com.condation.cms.api.Constants; import com.condation.cms.api.ServerContext; import com.condation.cms.api.ServerProperties; +import com.condation.cms.api.utils.ServerUtil; import com.condation.cms.cli.tools.ModulesUtil; import com.condation.cms.cli.tools.ThemesUtil; import com.condation.cms.git.RepositoryManager; @@ -112,12 +113,12 @@ private void checkInstalledModules() { private static void writePidFile () throws IOException { - Files.deleteIfExists(Path.of(Constants.PID_FILE)); - Files.writeString(Path.of(Constants.PID_FILE), String.valueOf(ProcessHandle.current().pid())); + Files.deleteIfExists(ServerUtil.getPath(Constants.PID_FILE)); + Files.writeString(ServerUtil.getPath(Constants.PID_FILE), String.valueOf(ProcessHandle.current().pid())); } private static void initGitRepositoryManager(Injector globaInjector) throws IOException { - Path gitConfig = Path.of("git.yaml"); + Path gitConfig = ServerUtil.getPath("git.yaml"); if (!Files.exists(gitConfig)) { log.info("no repository configuration found"); return; diff --git a/cms-server/src/main/java/com/condation/cms/cli/commands/server/Stop.java b/cms-server/src/main/java/com/condation/cms/cli/commands/server/Stop.java index 6dd7c437..a15be1fd 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/commands/server/Stop.java +++ b/cms-server/src/main/java/com/condation/cms/cli/commands/server/Stop.java @@ -26,6 +26,7 @@ import com.condation.cms.api.Constants; import com.condation.cms.api.ServerProperties; +import com.condation.cms.api.utils.ServerUtil; import com.condation.cms.core.configuration.ConfigurationFactory; import com.condation.cms.core.configuration.properties.ExtendedServerProperties; import com.condation.cms.ipc.Command; @@ -58,7 +59,7 @@ public void run() { ipcClient.send(new Command("shutdown")); - Files.deleteIfExists(Path.of(Constants.PID_FILE)); + Files.deleteIfExists(ServerUtil.getPath(Constants.PID_FILE)); } @@ -68,10 +69,11 @@ public void run() { } private static Optional getCMSProcess () throws Exception { - if (!Files.exists(Path.of(Constants.PID_FILE))) { + var pidFile = ServerUtil.getPath(Constants.PID_FILE); + if (!Files.exists(pidFile)) { return Optional.empty(); } - var pid = Files.readString(Path.of(Constants.PID_FILE)); + var pid = Files.readString(pidFile); return ProcessHandle.of(Long.parseLong(pid.trim())); } diff --git a/cms-server/src/main/java/com/condation/cms/cli/commands/themes/AbstractThemeCommand.java b/cms-server/src/main/java/com/condation/cms/cli/commands/themes/AbstractThemeCommand.java index 56f376d9..53a2a3b5 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/commands/themes/AbstractThemeCommand.java +++ b/cms-server/src/main/java/com/condation/cms/cli/commands/themes/AbstractThemeCommand.java @@ -24,6 +24,8 @@ import com.condation.cms.CMSServer; +import com.condation.cms.api.Constants; +import com.condation.cms.api.utils.ServerUtil; import com.condation.cms.core.configuration.ConfigurationFactory; import com.condation.cms.core.configuration.properties.ExtendedThemeProperties; import com.condation.cms.extensions.repository.ModuleInfo; @@ -48,7 +50,7 @@ public abstract class AbstractThemeCommand { private RemoteModuleRepository repository = new RemoteModuleRepository(ModuleInfo.class, DEFAULT_REGISTRY_URL); protected static Path getThemeFolder (String theme) { - return Path.of("themes/" + theme); + return ServerUtil.getPath(Constants.Folders.THEMES).resolve(theme); } protected boolean isCompatibleWithServer(String extension) { diff --git a/cms-server/src/main/java/com/condation/cms/cli/commands/themes/GetAllCommand.java b/cms-server/src/main/java/com/condation/cms/cli/commands/themes/GetAllCommand.java index 8fbafb21..14649ed1 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/commands/themes/GetAllCommand.java +++ b/cms-server/src/main/java/com/condation/cms/cli/commands/themes/GetAllCommand.java @@ -1,5 +1,8 @@ package com.condation.cms.cli.commands.themes; +import com.condation.cms.api.Constants; +import com.condation.cms.api.utils.ServerUtil; + /*- * #%L * cms-server @@ -72,7 +75,7 @@ public void getTheme(String theme) { var info = getRepository().getInfo(theme).get(); System.out.println("get theme"); - getRepository().download(info.getFile(), Path.of("themes/")); + getRepository().download(info.getFile(), ServerUtil.getPath(Constants.Folders.THEMES)); System.out.println("theme downloaded"); } diff --git a/cms-server/src/main/java/com/condation/cms/cli/commands/themes/GetCommand.java b/cms-server/src/main/java/com/condation/cms/cli/commands/themes/GetCommand.java index 7b9326d0..0585c3ac 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/commands/themes/GetCommand.java +++ b/cms-server/src/main/java/com/condation/cms/cli/commands/themes/GetCommand.java @@ -1,5 +1,8 @@ package com.condation.cms.cli.commands.themes; +import com.condation.cms.api.Constants; +import com.condation.cms.api.utils.ServerUtil; + /*- * #%L * cms-server @@ -76,7 +79,7 @@ public void run() { var info = getRepository().getInfo(theme).get(); System.out.println("get theme"); - getRepository().download(info.getFile(), Path.of("themes/")); + getRepository().download(info.getFile(), ServerUtil.getPath(Constants.Folders.THEMES)); System.out.println("theme downloaded"); } diff --git a/cms-server/src/main/java/com/condation/cms/cli/tools/ModulesUtil.java b/cms-server/src/main/java/com/condation/cms/cli/tools/ModulesUtil.java index 28005155..cddccab2 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/tools/ModulesUtil.java +++ b/cms-server/src/main/java/com/condation/cms/cli/tools/ModulesUtil.java @@ -1,5 +1,8 @@ package com.condation.cms.cli.tools; +import com.condation.cms.api.Constants; +import com.condation.cms.api.utils.ServerUtil; + /*- * #%L * cms-server @@ -55,8 +58,8 @@ public static Set getRequiredModules() { Set requiredModules = new HashSet<>(); try { - var hosts = Path.of("hosts/"); - var themes = Path.of("themes/"); + var hosts = ServerUtil.getPath(Constants.Folders.HOSTS); + var themes = ServerUtil.getPath(Constants.Folders.THEMES); if (Files.exists(hosts)) { Files.list(hosts) .filter(ModulesUtil::isHost) diff --git a/cms-server/src/main/java/com/condation/cms/cli/tools/ThemesUtil.java b/cms-server/src/main/java/com/condation/cms/cli/tools/ThemesUtil.java index db302e30..f3ff4cf1 100644 --- a/cms-server/src/main/java/com/condation/cms/cli/tools/ThemesUtil.java +++ b/cms-server/src/main/java/com/condation/cms/cli/tools/ThemesUtil.java @@ -1,5 +1,8 @@ package com.condation.cms.cli.tools; +import com.condation.cms.api.Constants; +import com.condation.cms.api.utils.ServerUtil; + /*- * #%L * cms-server @@ -64,7 +67,7 @@ public static Set getRequiredThemes () { public static Set getRequiredSiteThemes () { Set requiredThemes = new HashSet<>(); try { - Files.list(Path.of("hosts/")) + Files.list(ServerUtil.getPath(Constants.Folders.HOSTS)) .filter(ThemesUtil::isHost) .forEach(site -> { try { @@ -88,7 +91,7 @@ public static Set getRequiredSiteThemes () { private static Set getRequiredParentThemes () { Set requiredThemes = new HashSet<>(); try { - Files.list(Path.of("themes/")) + Files.list(ServerUtil.getPath(Constants.Folders.THEMES)) .filter(ThemesUtil::isTheme) .forEach(themeConfig -> { try { diff --git a/cms-server/src/main/java/com/condation/cms/server/JettyServer.java b/cms-server/src/main/java/com/condation/cms/server/JettyServer.java index dff0431b..ca03566e 100644 --- a/cms-server/src/main/java/com/condation/cms/server/JettyServer.java +++ b/cms-server/src/main/java/com/condation/cms/server/JettyServer.java @@ -33,6 +33,7 @@ import com.condation.cms.api.eventbus.events.lifecycle.ReloadHostEvent; import com.condation.cms.api.eventbus.events.lifecycle.ServerReadyEvent; import com.condation.cms.api.eventbus.events.lifecycle.ServerShutdownInitiated; +import com.condation.cms.api.utils.ServerUtil; import com.condation.cms.api.utils.SiteUtil; import com.condation.cms.core.eventbus.DefaultEventBus; import com.google.inject.Injector; @@ -95,11 +96,11 @@ public void startup() throws IOException { var properties = globalInjector.getInstance(ServerProperties.class); - Files.list(Path.of("hosts")).forEach((hostPath) -> { + Files.list(ServerUtil.getPath(Constants.Folders.HOSTS)).forEach((hostPath) -> { if (SiteUtil.isSite(hostPath)) { try { var host = new VHost(hostPath); - host.init(Path.of(Constants.Folders.MODULES), globalInjector); + host.init(ServerUtil.getPath(Constants.Folders.MODULES), globalInjector); vhosts.add(host); } catch (IOException ex) { log.error(null, ex); diff --git a/cms-server/src/main/java/com/condation/cms/server/VHost.java b/cms-server/src/main/java/com/condation/cms/server/VHost.java index 72a96c6e..a052dcb2 100644 --- a/cms-server/src/main/java/com/condation/cms/server/VHost.java +++ b/cms-server/src/main/java/com/condation/cms/server/VHost.java @@ -1,5 +1,17 @@ package com.condation.cms.server; +import java.io.IOException; +import java.nio.file.Path; +import java.util.List; + +import org.eclipse.jetty.http.pathmap.PathSpec; +import org.eclipse.jetty.server.Handler; +import org.eclipse.jetty.server.handler.ContextHandler; +import org.eclipse.jetty.server.handler.ContextHandlerCollection; +import org.eclipse.jetty.server.handler.PathMappingsHandler; +import org.eclipse.jetty.server.handler.ResourceHandler; +import org.eclipse.jetty.server.handler.gzip.GzipHandler; + /*- * #%L * cms-server @@ -42,6 +54,7 @@ import com.condation.cms.api.module.CMSModuleContext; import com.condation.cms.api.template.TemplateEngine; import com.condation.cms.api.theme.Theme; +import com.condation.cms.api.utils.SiteUtil; import com.condation.cms.content.ContentResolver; import com.condation.cms.core.configuration.ConfigManagement; import com.condation.cms.extensions.GlobalExtensions; @@ -57,38 +70,28 @@ import com.condation.cms.server.configs.SiteHandlerModule; import com.condation.cms.server.configs.SiteModule; import com.condation.cms.server.configs.ThemeModule; +import com.condation.cms.server.filter.CreateRequestContextFilter; +import com.condation.cms.server.filter.InitRequestContextFilter; import com.condation.cms.server.filter.PooledRequestContextFilter; +import com.condation.cms.server.filter.RequestLoggingFilter; import com.condation.cms.server.handler.auth.JettyAuthenticationHandler; import com.condation.cms.server.handler.cache.CacheHandler; import com.condation.cms.server.handler.content.JettyContentHandler; import com.condation.cms.server.handler.content.JettyTaxonomyHandler; import com.condation.cms.server.handler.content.JettyViewHandler; -import com.condation.cms.server.handler.extensions.JettyHttpHandlerExtensionHandler; import com.condation.cms.server.handler.extensions.JettyExtensionRouteHandler; +import com.condation.cms.server.handler.extensions.JettyHttpHandlerExtensionHandler; import com.condation.cms.server.handler.media.JettyMediaHandler; import com.condation.cms.server.handler.module.JettyModuleHandler; import com.condation.cms.server.handler.module.JettyRouteHandler; import com.condation.cms.server.handler.module.JettyRoutesHandler; -import com.condation.cms.server.filter.CreateRequestContextFilter; -import com.condation.cms.server.filter.InitRequestContextFilter; -import com.condation.cms.server.filter.RequestLoggingFilter; -import com.condation.cms.utils.SiteUtils; import com.condation.modules.api.ModuleManager; import com.google.inject.Injector; import com.google.inject.Key; import com.google.inject.name.Names; -import java.io.IOException; -import java.nio.file.Path; -import java.util.List; + import lombok.Getter; import lombok.extern.slf4j.Slf4j; -import org.eclipse.jetty.http.pathmap.PathSpec; -import org.eclipse.jetty.server.Handler; -import org.eclipse.jetty.server.handler.ContextHandler; -import org.eclipse.jetty.server.handler.ContextHandlerCollection; -import org.eclipse.jetty.server.handler.PathMappingsHandler; -import org.eclipse.jetty.server.handler.ResourceHandler; -import org.eclipse.jetty.server.handler.gzip.GzipHandler; /** * @@ -134,7 +137,7 @@ public void reload() { this.injector.getInstance(SiteMediaManager.class).reloadTheme(theme); - this.injector.getInstance(ThemeMediaManager.class).reloadTheme(theme);; + this.injector.getInstance(ThemeMediaManager.class).reloadTheme(theme); ResourceHandler themeAssetsHandler = this.injector.getInstance(Key.get(ResourceHandler.class, Names.named("theme"))); themeAssetsHandler.stop(); @@ -211,7 +214,7 @@ private void initSiteGlobals() throws IOException { } protected List getActiveModules() { - return SiteUtils.getActiveModules( + return SiteUtil.getActiveModules( injector.getInstance(SiteProperties.class), injector.getInstance(Theme.class) ); diff --git a/cms-server/src/main/java/com/condation/cms/server/configs/SiteHandlerModule.java b/cms-server/src/main/java/com/condation/cms/server/configs/SiteHandlerModule.java index 81bd26ff..ed91e3d4 100644 --- a/cms-server/src/main/java/com/condation/cms/server/configs/SiteHandlerModule.java +++ b/cms-server/src/main/java/com/condation/cms/server/configs/SiteHandlerModule.java @@ -28,6 +28,7 @@ import com.condation.cms.api.cache.CacheManager; import com.condation.cms.api.cache.ICache; import com.condation.cms.api.theme.Theme; +import com.condation.cms.api.utils.SiteUtil; import com.condation.cms.auth.services.AuthService; import com.condation.cms.auth.services.UserService; import com.condation.cms.media.SiteMediaManager; @@ -43,7 +44,6 @@ import com.condation.cms.server.handler.module.JettyRouteHandler; import com.condation.cms.server.handler.module.JettyRoutesHandler; import com.condation.cms.server.FileFolderPathResource; -import com.condation.cms.utils.SiteUtils; import com.condation.modules.api.ModuleManager; import com.google.inject.AbstractModule; import com.google.inject.Provides; @@ -94,7 +94,7 @@ public JettyAuthenticationHandler authHandler(CacheManager cacheManager, UserSer @Provides @Singleton public JettyModuleHandler moduleHandler(Theme theme, ModuleManager moduleManager, SiteProperties siteProperties) throws IOException { - return new JettyModuleHandler(moduleManager, SiteUtils.getActiveModules(siteProperties, theme)); + return new JettyModuleHandler(moduleManager, SiteUtil.getActiveModules(siteProperties, theme)); } @Provides diff --git a/cms-server/src/main/java/com/condation/cms/server/configs/SiteModule.java b/cms-server/src/main/java/com/condation/cms/server/configs/SiteModule.java index 2cfd6851..ee51c5ad 100644 --- a/cms-server/src/main/java/com/condation/cms/server/configs/SiteModule.java +++ b/cms-server/src/main/java/com/condation/cms/server/configs/SiteModule.java @@ -1,5 +1,11 @@ package com.condation.cms.server.configs; +import java.io.IOException; +import java.nio.file.Path; + +import org.apache.commons.jexl3.JexlBuilder; +import org.graalvm.polyglot.Engine; + /*- * #%L * cms-server @@ -28,7 +34,6 @@ import com.condation.cms.api.SiteProperties; import com.condation.cms.api.configuration.Configuration; import com.condation.cms.api.configuration.configs.ServerConfiguration; -import com.condation.cms.api.configuration.configs.SiteConfiguration; import com.condation.cms.api.content.ContentParser; import com.condation.cms.api.db.DB; import com.condation.cms.api.db.cms.NIOReadOnlyFile; @@ -44,7 +49,6 @@ import com.condation.cms.api.feature.features.ThemeFeature; import com.condation.cms.api.mapper.ContentNodeMapper; import com.condation.cms.api.media.MediaService; -import com.condation.cms.core.messages.DefaultMessageSource; import com.condation.cms.api.messages.MessageSource; import com.condation.cms.api.messaging.Messaging; import com.condation.cms.api.scheduler.CronJobContext; @@ -59,34 +63,30 @@ import com.condation.cms.content.TaxonomyResolver; import com.condation.cms.content.ViewResolver; import com.condation.cms.content.shortcodes.TagParser; -import com.condation.cms.extensions.ExtensionManager; -import com.condation.cms.filesystem.FileDB; -import com.condation.cms.filesystem.MetaData; -import com.condation.cms.media.FileMediaService; -import com.condation.cms.media.SiteMediaManager; -import com.condation.cms.request.RequestContextFactory; import com.condation.cms.content.template.functions.taxonomy.TaxonomyFunction; import com.condation.cms.core.configuration.ConfigManagement; import com.condation.cms.core.configuration.ConfigurationFactory; -import com.condation.cms.core.configuration.configs.SimpleConfiguration; -import com.condation.cms.core.configuration.properties.ExtendedServerProperties; import com.condation.cms.core.configuration.properties.ExtendedSiteProperties; import com.condation.cms.core.eventbus.MessagingEventBus; +import com.condation.cms.core.messages.DefaultMessageSource; import com.condation.cms.core.messaging.DefaultMessaging; import com.condation.cms.core.scheduler.SiteCronJobScheduler; import com.condation.cms.core.theme.DefaultTheme; +import com.condation.cms.extensions.ExtensionManager; +import com.condation.cms.filesystem.FileDB; +import com.condation.cms.filesystem.MetaData; +import com.condation.cms.media.FileMediaService; +import com.condation.cms.media.SiteMediaManager; +import com.condation.cms.request.RequestContextFactory; import com.condation.modules.api.ModuleManager; import com.google.inject.AbstractModule; import com.google.inject.Injector; import com.google.inject.Provides; import com.google.inject.Singleton; import com.google.inject.name.Named; -import java.io.IOException; -import java.nio.file.Path; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.jexl3.JexlBuilder; -import org.graalvm.polyglot.Engine; /** * diff --git a/cms-server/src/main/java/com/condation/cms/utils/SiteUtils.java b/cms-server/src/main/java/com/condation/cms/utils/SiteUtils.java deleted file mode 100644 index 88304088..00000000 --- a/cms-server/src/main/java/com/condation/cms/utils/SiteUtils.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.condation.cms.utils; - -/*- - * #%L - * cms-server - * %% - * Copyright (C) 2023 - 2024 CondationCMS - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * . - * #L% - */ - - - -import com.condation.cms.api.SiteProperties; -import com.condation.cms.api.theme.Theme; -import java.util.ArrayList; -import java.util.List; - -/** - * - * @author t.marx - */ -public abstract class SiteUtils { - public static List getActiveModules(SiteProperties siteProperties, Theme theme) { - List activeModules = new ArrayList<>(); - activeModules.addAll(siteProperties.activeModules()); - if (!theme.empty()) { - activeModules.addAll(theme.properties().activeModules()); - - if (theme.getParentTheme() != null) { - activeModules.addAll(theme.getParentTheme().properties().activeModules()); - } - } - return activeModules; - } - - public static String getRequiredTheme(SiteProperties siteProperties, Theme theme) { - return siteProperties.theme(); - } -} diff --git a/cms-server/hosts/Caddyfile b/test-server/hosts/Caddyfile similarity index 100% rename from cms-server/hosts/Caddyfile rename to test-server/hosts/Caddyfile diff --git a/cms-server/hosts/demo/assets/favicon.ico b/test-server/hosts/demo/assets/favicon.ico similarity index 100% rename from cms-server/hosts/demo/assets/favicon.ico rename to test-server/hosts/demo/assets/favicon.ico diff --git a/cms-server/hosts/demo/assets/images/test.jpg b/test-server/hosts/demo/assets/images/test.jpg similarity index 100% rename from cms-server/hosts/demo/assets/images/test.jpg rename to test-server/hosts/demo/assets/images/test.jpg diff --git a/cms-server/hosts/demo/config/media.toml b/test-server/hosts/demo/config/media.toml similarity index 100% rename from cms-server/hosts/demo/config/media.toml rename to test-server/hosts/demo/config/media.toml diff --git a/cms-server/hosts/demo/content/.technical/404.md b/test-server/hosts/demo/content/.technical/404.md similarity index 100% rename from cms-server/hosts/demo/content/.technical/404.md rename to test-server/hosts/demo/content/.technical/404.md diff --git a/cms-server/hosts/demo/content/index.md b/test-server/hosts/demo/content/index.md similarity index 100% rename from cms-server/hosts/demo/content/index.md rename to test-server/hosts/demo/content/index.md diff --git a/cms-server/hosts/demo/content/robots.txt b/test-server/hosts/demo/content/robots.txt similarity index 100% rename from cms-server/hosts/demo/content/robots.txt rename to test-server/hosts/demo/content/robots.txt diff --git a/cms-server/hosts/demo/modules_data/example-module/configuration.properties b/test-server/hosts/demo/modules_data/example-module/configuration.properties similarity index 100% rename from cms-server/hosts/demo/modules_data/example-module/configuration.properties rename to test-server/hosts/demo/modules_data/example-module/configuration.properties diff --git a/cms-server/hosts/demo/modules_data/markedj-module/configuration.properties b/test-server/hosts/demo/modules_data/markedj-module/configuration.properties similarity index 100% rename from cms-server/hosts/demo/modules_data/markedj-module/configuration.properties rename to test-server/hosts/demo/modules_data/markedj-module/configuration.properties diff --git a/cms-server/hosts/demo/modules_data/search-module/configuration.properties b/test-server/hosts/demo/modules_data/search-module/configuration.properties similarity index 100% rename from cms-server/hosts/demo/modules_data/search-module/configuration.properties rename to test-server/hosts/demo/modules_data/search-module/configuration.properties diff --git a/cms-server/hosts/demo/modules_data/seo-module/configuration.properties b/test-server/hosts/demo/modules_data/seo-module/configuration.properties similarity index 100% rename from cms-server/hosts/demo/modules_data/seo-module/configuration.properties rename to test-server/hosts/demo/modules_data/seo-module/configuration.properties diff --git a/cms-server/hosts/demo/modules_data/thymeleaf-module/configuration.properties b/test-server/hosts/demo/modules_data/thymeleaf-module/configuration.properties similarity index 100% rename from cms-server/hosts/demo/modules_data/thymeleaf-module/configuration.properties rename to test-server/hosts/demo/modules_data/thymeleaf-module/configuration.properties diff --git a/cms-server/hosts/demo/site.toml b/test-server/hosts/demo/site.toml similarity index 100% rename from cms-server/hosts/demo/site.toml rename to test-server/hosts/demo/site.toml diff --git a/cms-server/hosts/demo2/content/.technical/404.md b/test-server/hosts/demo2/content/.technical/404.md similarity index 100% rename from cms-server/hosts/demo2/content/.technical/404.md rename to test-server/hosts/demo2/content/.technical/404.md diff --git a/cms-server/hosts/demo2/content/blog/2023-09/hello-world.md b/test-server/hosts/demo2/content/blog/2023-09/hello-world.md similarity index 100% rename from cms-server/hosts/demo2/content/blog/2023-09/hello-world.md rename to test-server/hosts/demo2/content/blog/2023-09/hello-world.md diff --git a/cms-server/hosts/demo2/content/blog/2023-09/new-post.md b/test-server/hosts/demo2/content/blog/2023-09/new-post.md similarity index 100% rename from cms-server/hosts/demo2/content/blog/2023-09/new-post.md rename to test-server/hosts/demo2/content/blog/2023-09/new-post.md diff --git a/cms-server/hosts/demo2/content/blog/2023-10/new-post.md b/test-server/hosts/demo2/content/blog/2023-10/new-post.md similarity index 100% rename from cms-server/hosts/demo2/content/blog/2023-10/new-post.md rename to test-server/hosts/demo2/content/blog/2023-10/new-post.md diff --git a/cms-server/hosts/demo2/content/blog/index.md b/test-server/hosts/demo2/content/blog/index.md similarity index 100% rename from cms-server/hosts/demo2/content/blog/index.md rename to test-server/hosts/demo2/content/blog/index.md diff --git a/cms-server/hosts/demo2/content/index.md b/test-server/hosts/demo2/content/index.md similarity index 100% rename from cms-server/hosts/demo2/content/index.md rename to test-server/hosts/demo2/content/index.md diff --git a/cms-server/hosts/demo2/extensions/test.extension.js b/test-server/hosts/demo2/extensions/test.extension.js similarity index 100% rename from cms-server/hosts/demo2/extensions/test.extension.js rename to test-server/hosts/demo2/extensions/test.extension.js diff --git a/cms-server/hosts/demo2/messages/labels.properties b/test-server/hosts/demo2/messages/labels.properties similarity index 100% rename from cms-server/hosts/demo2/messages/labels.properties rename to test-server/hosts/demo2/messages/labels.properties diff --git a/cms-server/hosts/demo2/modules_data/example-module/configuration.properties b/test-server/hosts/demo2/modules_data/example-module/configuration.properties similarity index 100% rename from cms-server/hosts/demo2/modules_data/example-module/configuration.properties rename to test-server/hosts/demo2/modules_data/example-module/configuration.properties diff --git a/cms-server/hosts/demo2/modules_data/markedjs-module/configuration.properties b/test-server/hosts/demo2/modules_data/markedjs-module/configuration.properties similarity index 100% rename from cms-server/hosts/demo2/modules_data/markedjs-module/configuration.properties rename to test-server/hosts/demo2/modules_data/markedjs-module/configuration.properties diff --git a/cms-server/hosts/demo2/modules_data/pebble-module/configuration.properties b/test-server/hosts/demo2/modules_data/pebble-module/configuration.properties similarity index 100% rename from cms-server/hosts/demo2/modules_data/pebble-module/configuration.properties rename to test-server/hosts/demo2/modules_data/pebble-module/configuration.properties diff --git a/cms-server/hosts/demo2/modules_data/thymeleaf-module/configuration.properties b/test-server/hosts/demo2/modules_data/thymeleaf-module/configuration.properties similarity index 100% rename from cms-server/hosts/demo2/modules_data/thymeleaf-module/configuration.properties rename to test-server/hosts/demo2/modules_data/thymeleaf-module/configuration.properties diff --git a/cms-server/hosts/demo2/site.yaml b/test-server/hosts/demo2/site.yaml similarity index 100% rename from cms-server/hosts/demo2/site.yaml rename to test-server/hosts/demo2/site.yaml diff --git a/cms-server/hosts/demo2/templates/blog-entry.html b/test-server/hosts/demo2/templates/blog-entry.html similarity index 100% rename from cms-server/hosts/demo2/templates/blog-entry.html rename to test-server/hosts/demo2/templates/blog-entry.html diff --git a/cms-server/hosts/demo2/templates/blog.html b/test-server/hosts/demo2/templates/blog.html similarity index 100% rename from cms-server/hosts/demo2/templates/blog.html rename to test-server/hosts/demo2/templates/blog.html diff --git a/cms-server/hosts/demo2/templates/start.html b/test-server/hosts/demo2/templates/start.html similarity index 100% rename from cms-server/hosts/demo2/templates/start.html rename to test-server/hosts/demo2/templates/start.html diff --git a/cms-server/hosts/features/assets/app-1.js b/test-server/hosts/features/assets/app-1.js similarity index 100% rename from cms-server/hosts/features/assets/app-1.js rename to test-server/hosts/features/assets/app-1.js diff --git a/cms-server/hosts/features/assets/favicon.ico b/test-server/hosts/features/assets/favicon.ico similarity index 100% rename from cms-server/hosts/features/assets/favicon.ico rename to test-server/hosts/features/assets/favicon.ico diff --git a/cms-server/hosts/features/assets/form-1.css b/test-server/hosts/features/assets/form-1.css similarity index 100% rename from cms-server/hosts/features/assets/form-1.css rename to test-server/hosts/features/assets/form-1.css diff --git a/cms-server/hosts/features/assets/form-1.js b/test-server/hosts/features/assets/form-1.js similarity index 100% rename from cms-server/hosts/features/assets/form-1.js rename to test-server/hosts/features/assets/form-1.js diff --git a/cms-server/hosts/features/assets/images/test.jpg b/test-server/hosts/features/assets/images/test.jpg similarity index 100% rename from cms-server/hosts/features/assets/images/test.jpg rename to test-server/hosts/features/assets/images/test.jpg diff --git a/cms-server/hosts/features/assets/images/test.jpg.meta.yaml b/test-server/hosts/features/assets/images/test.jpg.meta.yaml similarity index 100% rename from cms-server/hosts/features/assets/images/test.jpg.meta.yaml rename to test-server/hosts/features/assets/images/test.jpg.meta.yaml diff --git a/cms-server/hosts/features/assets/styles-1.css b/test-server/hosts/features/assets/styles-1.css similarity index 100% rename from cms-server/hosts/features/assets/styles-1.css rename to test-server/hosts/features/assets/styles-1.css diff --git a/cms-server/hosts/features/config/auth.yaml b/test-server/hosts/features/config/auth.yaml similarity index 100% rename from cms-server/hosts/features/config/auth.yaml rename to test-server/hosts/features/config/auth.yaml diff --git a/cms-server/hosts/features/config/forms.yaml b/test-server/hosts/features/config/forms.yaml similarity index 100% rename from cms-server/hosts/features/config/forms.yaml rename to test-server/hosts/features/config/forms.yaml diff --git a/cms-server/hosts/features/config/taxonomy.tags.yaml b/test-server/hosts/features/config/taxonomy.tags.yaml similarity index 100% rename from cms-server/hosts/features/config/taxonomy.tags.yaml rename to test-server/hosts/features/config/taxonomy.tags.yaml diff --git a/cms-server/hosts/features/config/taxonomy.yaml b/test-server/hosts/features/config/taxonomy.yaml similarity index 100% rename from cms-server/hosts/features/config/taxonomy.yaml rename to test-server/hosts/features/config/taxonomy.yaml diff --git a/cms-server/hosts/features/config/users.realm b/test-server/hosts/features/config/users.realm similarity index 100% rename from cms-server/hosts/features/config/users.realm rename to test-server/hosts/features/config/users.realm diff --git a/cms-server/hosts/features/content/.technical/404.md b/test-server/hosts/features/content/.technical/404.md similarity index 100% rename from cms-server/hosts/features/content/.technical/404.md rename to test-server/hosts/features/content/.technical/404.md diff --git a/cms-server/hosts/features/content/.technical/test/example.md b/test-server/hosts/features/content/.technical/test/example.md similarity index 100% rename from cms-server/hosts/features/content/.technical/test/example.md rename to test-server/hosts/features/content/.technical/test/example.md diff --git a/cms-server/hosts/features/content/blog/2023-09/hello-world.md b/test-server/hosts/features/content/blog/2023-09/hello-world.md similarity index 100% rename from cms-server/hosts/features/content/blog/2023-09/hello-world.md rename to test-server/hosts/features/content/blog/2023-09/hello-world.md diff --git a/cms-server/hosts/features/content/blog/2023-09/new-post.md b/test-server/hosts/features/content/blog/2023-09/new-post.md similarity index 100% rename from cms-server/hosts/features/content/blog/2023-09/new-post.md rename to test-server/hosts/features/content/blog/2023-09/new-post.md diff --git a/cms-server/hosts/features/content/blog/2023-10/new-post.md b/test-server/hosts/features/content/blog/2023-10/new-post.md similarity index 100% rename from cms-server/hosts/features/content/blog/2023-10/new-post.md rename to test-server/hosts/features/content/blog/2023-10/new-post.md diff --git a/cms-server/hosts/features/content/blog/index.md b/test-server/hosts/features/content/blog/index.md similarity index 100% rename from cms-server/hosts/features/content/blog/index.md rename to test-server/hosts/features/content/blog/index.md diff --git a/cms-server/hosts/features/content/contact/index.md b/test-server/hosts/features/content/contact/index.md similarity index 100% rename from cms-server/hosts/features/content/contact/index.md rename to test-server/hosts/features/content/contact/index.md diff --git a/cms-server/hosts/features/content/content-editing/index.md b/test-server/hosts/features/content/content-editing/index.md similarity index 100% rename from cms-server/hosts/features/content/content-editing/index.md rename to test-server/hosts/features/content/content-editing/index.md diff --git a/cms-server/hosts/features/content/content-editing/index.part.01.md b/test-server/hosts/features/content/content-editing/index.part.01.md similarity index 100% rename from cms-server/hosts/features/content/content-editing/index.part.01.md rename to test-server/hosts/features/content/content-editing/index.part.01.md diff --git a/cms-server/hosts/features/content/content-editing/index.part.02.md b/test-server/hosts/features/content/content-editing/index.part.02.md similarity index 100% rename from cms-server/hosts/features/content/content-editing/index.part.02.md rename to test-server/hosts/features/content/content-editing/index.part.02.md diff --git a/cms-server/hosts/features/content/content-editing/index.part.03.md b/test-server/hosts/features/content/content-editing/index.part.03.md similarity index 100% rename from cms-server/hosts/features/content/content-editing/index.part.03.md rename to test-server/hosts/features/content/content-editing/index.part.03.md diff --git a/cms-server/hosts/features/content/extending/index.md b/test-server/hosts/features/content/extending/index.md similarity index 100% rename from cms-server/hosts/features/content/extending/index.md rename to test-server/hosts/features/content/extending/index.md diff --git a/cms-server/hosts/features/content/forms/contact/success.md b/test-server/hosts/features/content/forms/contact/success.md similarity index 100% rename from cms-server/hosts/features/content/forms/contact/success.md rename to test-server/hosts/features/content/forms/contact/success.md diff --git a/cms-server/hosts/features/content/forms/error.md b/test-server/hosts/features/content/forms/error.md similarity index 100% rename from cms-server/hosts/features/content/forms/error.md rename to test-server/hosts/features/content/forms/error.md diff --git a/cms-server/hosts/features/content/google/index.md b/test-server/hosts/features/content/google/index.md similarity index 100% rename from cms-server/hosts/features/content/google/index.md rename to test-server/hosts/features/content/google/index.md diff --git a/cms-server/hosts/features/content/index.md b/test-server/hosts/features/content/index.md similarity index 100% rename from cms-server/hosts/features/content/index.md rename to test-server/hosts/features/content/index.md diff --git a/cms-server/hosts/features/content/installation/index.md b/test-server/hosts/features/content/installation/index.md similarity index 100% rename from cms-server/hosts/features/content/installation/index.md rename to test-server/hosts/features/content/installation/index.md diff --git a/cms-server/hosts/features/content/json/index.md b/test-server/hosts/features/content/json/index.md similarity index 100% rename from cms-server/hosts/features/content/json/index.md rename to test-server/hosts/features/content/json/index.md diff --git a/cms-server/hosts/features/content/modules/index.md b/test-server/hosts/features/content/modules/index.md similarity index 100% rename from cms-server/hosts/features/content/modules/index.md rename to test-server/hosts/features/content/modules/index.md diff --git a/cms-server/hosts/features/content/navigation/index.md b/test-server/hosts/features/content/navigation/index.md similarity index 100% rename from cms-server/hosts/features/content/navigation/index.md rename to test-server/hosts/features/content/navigation/index.md diff --git a/cms-server/hosts/features/content/navigation/subfolder/index.md b/test-server/hosts/features/content/navigation/subfolder/index.md similarity index 100% rename from cms-server/hosts/features/content/navigation/subfolder/index.md rename to test-server/hosts/features/content/navigation/subfolder/index.md diff --git a/cms-server/hosts/features/content/navigation/subfolder/other.md b/test-server/hosts/features/content/navigation/subfolder/other.md similarity index 100% rename from cms-server/hosts/features/content/navigation/subfolder/other.md rename to test-server/hosts/features/content/navigation/subfolder/other.md diff --git a/cms-server/hosts/features/content/robots.txt b/test-server/hosts/features/content/robots.txt similarity index 100% rename from cms-server/hosts/features/content/robots.txt rename to test-server/hosts/features/content/robots.txt diff --git a/cms-server/hosts/features/content/search/index.md b/test-server/hosts/features/content/search/index.md similarity index 100% rename from cms-server/hosts/features/content/search/index.md rename to test-server/hosts/features/content/search/index.md diff --git a/cms-server/hosts/features/content/shortcodes/index.md b/test-server/hosts/features/content/shortcodes/index.md similarity index 100% rename from cms-server/hosts/features/content/shortcodes/index.md rename to test-server/hosts/features/content/shortcodes/index.md diff --git a/cms-server/hosts/features/content/templating/index.md b/test-server/hosts/features/content/templating/index.md similarity index 100% rename from cms-server/hosts/features/content/templating/index.md rename to test-server/hosts/features/content/templating/index.md diff --git a/cms-server/hosts/features/content/templating/index.part.01.md b/test-server/hosts/features/content/templating/index.part.01.md similarity index 100% rename from cms-server/hosts/features/content/templating/index.part.01.md rename to test-server/hosts/features/content/templating/index.part.01.md diff --git a/cms-server/hosts/features/content/templating/index.part.02.md b/test-server/hosts/features/content/templating/index.part.02.md similarity index 100% rename from cms-server/hosts/features/content/templating/index.part.02.md rename to test-server/hosts/features/content/templating/index.part.02.md diff --git a/cms-server/hosts/features/content/templating/index.part.03.md b/test-server/hosts/features/content/templating/index.part.03.md similarity index 100% rename from cms-server/hosts/features/content/templating/index.part.03.md rename to test-server/hosts/features/content/templating/index.part.03.md diff --git a/cms-server/hosts/features/content/view/index.md b/test-server/hosts/features/content/view/index.md similarity index 100% rename from cms-server/hosts/features/content/view/index.md rename to test-server/hosts/features/content/view/index.md diff --git a/cms-server/hosts/features/extensions/content.extension.js b/test-server/hosts/features/extensions/content.extension.js similarity index 100% rename from cms-server/hosts/features/extensions/content.extension.js rename to test-server/hosts/features/extensions/content.extension.js diff --git a/cms-server/hosts/features/extensions/http.extension.js b/test-server/hosts/features/extensions/http.extension.js similarity index 100% rename from cms-server/hosts/features/extensions/http.extension.js rename to test-server/hosts/features/extensions/http.extension.js diff --git a/cms-server/hosts/features/extensions/libs/module.mjs b/test-server/hosts/features/extensions/libs/module.mjs similarity index 100% rename from cms-server/hosts/features/extensions/libs/module.mjs rename to test-server/hosts/features/extensions/libs/module.mjs diff --git a/cms-server/hosts/features/extensions/menu.extension.js b/test-server/hosts/features/extensions/menu.extension.js similarity index 100% rename from cms-server/hosts/features/extensions/menu.extension.js rename to test-server/hosts/features/extensions/menu.extension.js diff --git a/cms-server/hosts/features/extensions/query.extension.js b/test-server/hosts/features/extensions/query.extension.js similarity index 100% rename from cms-server/hosts/features/extensions/query.extension.js rename to test-server/hosts/features/extensions/query.extension.js diff --git a/cms-server/hosts/features/extensions/template.extension.js b/test-server/hosts/features/extensions/template.extension.js similarity index 100% rename from cms-server/hosts/features/extensions/template.extension.js rename to test-server/hosts/features/extensions/template.extension.js diff --git a/cms-server/hosts/features/extensions/test.extension.js b/test-server/hosts/features/extensions/test.extension.js similarity index 100% rename from cms-server/hosts/features/extensions/test.extension.js rename to test-server/hosts/features/extensions/test.extension.js diff --git a/cms-server/hosts/features/extensions/theme.hooks.js b/test-server/hosts/features/extensions/theme.hooks.js similarity index 100% rename from cms-server/hosts/features/extensions/theme.hooks.js rename to test-server/hosts/features/extensions/theme.hooks.js diff --git a/cms-server/hosts/features/extras/products.json b/test-server/hosts/features/extras/products.json similarity index 100% rename from cms-server/hosts/features/extras/products.json rename to test-server/hosts/features/extras/products.json diff --git a/cms-server/hosts/features/messages/labels.properties b/test-server/hosts/features/messages/labels.properties similarity index 100% rename from cms-server/hosts/features/messages/labels.properties rename to test-server/hosts/features/messages/labels.properties diff --git a/cms-server/hosts/features/site-dev.yaml b/test-server/hosts/features/site-dev.yaml similarity index 100% rename from cms-server/hosts/features/site-dev.yaml rename to test-server/hosts/features/site-dev.yaml diff --git a/cms-server/hosts/features/site.globals.js b/test-server/hosts/features/site.globals.js similarity index 100% rename from cms-server/hosts/features/site.globals.js rename to test-server/hosts/features/site.globals.js diff --git a/cms-server/hosts/features/site.yaml b/test-server/hosts/features/site.yaml similarity index 100% rename from cms-server/hosts/features/site.yaml rename to test-server/hosts/features/site.yaml diff --git a/cms-server/hosts/features/templates/contact.html b/test-server/hosts/features/templates/contact.html similarity index 100% rename from cms-server/hosts/features/templates/contact.html rename to test-server/hosts/features/templates/contact.html diff --git a/cms-server/hosts/features/templates/start.html b/test-server/hosts/features/templates/start.html similarity index 100% rename from cms-server/hosts/features/templates/start.html rename to test-server/hosts/features/templates/start.html diff --git a/cms-server/hosts/features/templates/taxonomy.html b/test-server/hosts/features/templates/taxonomy.html similarity index 100% rename from cms-server/hosts/features/templates/taxonomy.html rename to test-server/hosts/features/templates/taxonomy.html diff --git a/cms-server/hosts/features/templates/taxonomy.single.html b/test-server/hosts/features/templates/taxonomy.single.html similarity index 100% rename from cms-server/hosts/features/templates/taxonomy.single.html rename to test-server/hosts/features/templates/taxonomy.single.html diff --git a/cms-server/hosts/features/templates/test.json b/test-server/hosts/features/templates/test.json similarity index 100% rename from cms-server/hosts/features/templates/test.json rename to test-server/hosts/features/templates/test.json diff --git a/cms-server/hosts/features/templates/views/test.html b/test-server/hosts/features/templates/views/test.html similarity index 100% rename from cms-server/hosts/features/templates/views/test.html rename to test-server/hosts/features/templates/views/test.html diff --git a/cms-server/hosts/features/test/form.http b/test-server/hosts/features/test/form.http similarity index 100% rename from cms-server/hosts/features/test/form.http rename to test-server/hosts/features/test/form.http diff --git a/cms-server/hosts/features/test/forms-module/send.http b/test-server/hosts/features/test/forms-module/send.http similarity index 100% rename from cms-server/hosts/features/test/forms-module/send.http rename to test-server/hosts/features/test/forms-module/send.http diff --git a/cms-server/hosts/features/test/ui-module/directory-create.http b/test-server/hosts/features/test/ui-module/directory-create.http similarity index 100% rename from cms-server/hosts/features/test/ui-module/directory-create.http rename to test-server/hosts/features/test/ui-module/directory-create.http diff --git a/cms-server/hosts/features/test/ui-module/directory-delete.http b/test-server/hosts/features/test/ui-module/directory-delete.http similarity index 100% rename from cms-server/hosts/features/test/ui-module/directory-delete.http rename to test-server/hosts/features/test/ui-module/directory-delete.http diff --git a/cms-server/hosts/features/test/ui-module/file-create.http b/test-server/hosts/features/test/ui-module/file-create.http similarity index 100% rename from cms-server/hosts/features/test/ui-module/file-create.http rename to test-server/hosts/features/test/ui-module/file-create.http diff --git a/cms-server/hosts/features/test/ui-module/file-read.http b/test-server/hosts/features/test/ui-module/file-read.http similarity index 100% rename from cms-server/hosts/features/test/ui-module/file-read.http rename to test-server/hosts/features/test/ui-module/file-read.http diff --git a/cms-server/hosts/features/test/ui-module/file-write.http b/test-server/hosts/features/test/ui-module/file-write.http similarity index 100% rename from cms-server/hosts/features/test/ui-module/file-write.http rename to test-server/hosts/features/test/ui-module/file-write.http diff --git a/cms-server/hosts/features/test/ui-module/list-files.http b/test-server/hosts/features/test/ui-module/list-files.http similarity index 100% rename from cms-server/hosts/features/test/ui-module/list-files.http rename to test-server/hosts/features/test/ui-module/list-files.http diff --git a/cms-server/log4j2.xml b/test-server/log4j2.xml similarity index 96% rename from cms-server/log4j2.xml rename to test-server/log4j2.xml index d99de29b..5f595f58 100644 --- a/cms-server/log4j2.xml +++ b/test-server/log4j2.xml @@ -2,7 +2,7 @@ %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1} - %m%n - logs/ + ${sys:cms-logs-folder} 5 diff --git a/cms-server/modules/example-module/libs/example-module-7.0.0.jar b/test-server/modules/example-module/libs/example-module-7.0.0.jar similarity index 100% rename from cms-server/modules/example-module/libs/example-module-7.0.0.jar rename to test-server/modules/example-module/libs/example-module-7.0.0.jar diff --git a/cms-server/modules/example-module/module.properties b/test-server/modules/example-module/module.properties similarity index 100% rename from cms-server/modules/example-module/module.properties rename to test-server/modules/example-module/module.properties diff --git a/cms-server/server.toml b/test-server/server.toml similarity index 100% rename from cms-server/server.toml rename to test-server/server.toml diff --git a/cms-server/server.yaml b/test-server/server.yaml similarity index 100% rename from cms-server/server.yaml rename to test-server/server.yaml diff --git a/cms-server/themes/demo/assets/style.css b/test-server/themes/demo/assets/style.css similarity index 100% rename from cms-server/themes/demo/assets/style.css rename to test-server/themes/demo/assets/style.css diff --git a/cms-server/themes/demo/config/media.toml b/test-server/themes/demo/config/media.toml similarity index 100% rename from cms-server/themes/demo/config/media.toml rename to test-server/themes/demo/config/media.toml diff --git a/cms-server/themes/demo/extensions/theme.extension.js b/test-server/themes/demo/extensions/theme.extension.js similarity index 100% rename from cms-server/themes/demo/extensions/theme.extension.js rename to test-server/themes/demo/extensions/theme.extension.js diff --git a/cms-server/themes/demo/messages/labels.properties b/test-server/themes/demo/messages/labels.properties similarity index 100% rename from cms-server/themes/demo/messages/labels.properties rename to test-server/themes/demo/messages/labels.properties diff --git a/cms-server/themes/demo/templates/libs/fragments.html b/test-server/themes/demo/templates/libs/fragments.html similarity index 100% rename from cms-server/themes/demo/templates/libs/fragments.html rename to test-server/themes/demo/templates/libs/fragments.html diff --git a/cms-server/themes/demo/templates/start.html b/test-server/themes/demo/templates/start.html similarity index 100% rename from cms-server/themes/demo/templates/start.html rename to test-server/themes/demo/templates/start.html diff --git a/cms-server/themes/demo/theme.toml b/test-server/themes/demo/theme.toml similarity index 100% rename from cms-server/themes/demo/theme.toml rename to test-server/themes/demo/theme.toml diff --git a/cms-server/themes/parent/assets/images/parent.jpg b/test-server/themes/parent/assets/images/parent.jpg similarity index 100% rename from cms-server/themes/parent/assets/images/parent.jpg rename to test-server/themes/parent/assets/images/parent.jpg diff --git a/cms-server/themes/parent/assets/parent.js b/test-server/themes/parent/assets/parent.js similarity index 100% rename from cms-server/themes/parent/assets/parent.js rename to test-server/themes/parent/assets/parent.js diff --git a/cms-server/themes/parent/extensions/parent.extension.js b/test-server/themes/parent/extensions/parent.extension.js similarity index 100% rename from cms-server/themes/parent/extensions/parent.extension.js rename to test-server/themes/parent/extensions/parent.extension.js diff --git a/cms-server/themes/parent/messages/labels.properties b/test-server/themes/parent/messages/labels.properties similarity index 100% rename from cms-server/themes/parent/messages/labels.properties rename to test-server/themes/parent/messages/labels.properties diff --git a/cms-server/themes/parent/templates/blog-entry.html b/test-server/themes/parent/templates/blog-entry.html similarity index 100% rename from cms-server/themes/parent/templates/blog-entry.html rename to test-server/themes/parent/templates/blog-entry.html diff --git a/cms-server/themes/parent/templates/blog.html b/test-server/themes/parent/templates/blog.html similarity index 100% rename from cms-server/themes/parent/templates/blog.html rename to test-server/themes/parent/templates/blog.html diff --git a/cms-server/themes/parent/templates/content.html b/test-server/themes/parent/templates/content.html similarity index 100% rename from cms-server/themes/parent/templates/content.html rename to test-server/themes/parent/templates/content.html diff --git a/cms-server/themes/parent/templates/content.part.html b/test-server/themes/parent/templates/content.part.html similarity index 100% rename from cms-server/themes/parent/templates/content.part.html rename to test-server/themes/parent/templates/content.part.html diff --git a/cms-server/themes/parent/templates/error.html b/test-server/themes/parent/templates/error.html similarity index 100% rename from cms-server/themes/parent/templates/error.html rename to test-server/themes/parent/templates/error.html diff --git a/cms-server/themes/parent/templates/libs/fragments.html b/test-server/themes/parent/templates/libs/fragments.html similarity index 100% rename from cms-server/themes/parent/templates/libs/fragments.html rename to test-server/themes/parent/templates/libs/fragments.html diff --git a/cms-server/themes/parent/templates/navigation.html b/test-server/themes/parent/templates/navigation.html similarity index 100% rename from cms-server/themes/parent/templates/navigation.html rename to test-server/themes/parent/templates/navigation.html diff --git a/cms-server/themes/parent/templates/search.html b/test-server/themes/parent/templates/search.html similarity index 100% rename from cms-server/themes/parent/templates/search.html rename to test-server/themes/parent/templates/search.html diff --git a/cms-server/themes/parent/templates/start.html b/test-server/themes/parent/templates/start.html similarity index 100% rename from cms-server/themes/parent/templates/start.html rename to test-server/themes/parent/templates/start.html diff --git a/cms-server/themes/parent/theme.yaml b/test-server/themes/parent/theme.yaml similarity index 100% rename from cms-server/themes/parent/theme.yaml rename to test-server/themes/parent/theme.yaml diff --git a/cms-server/themes/test/assets/bootstrap-5.3.2/css/bootstrap.min.css b/test-server/themes/test/assets/bootstrap-5.3.2/css/bootstrap.min.css similarity index 100% rename from cms-server/themes/test/assets/bootstrap-5.3.2/css/bootstrap.min.css rename to test-server/themes/test/assets/bootstrap-5.3.2/css/bootstrap.min.css diff --git a/cms-server/themes/test/assets/bootstrap-5.3.2/css/bootstrap.min.css.map b/test-server/themes/test/assets/bootstrap-5.3.2/css/bootstrap.min.css.map similarity index 100% rename from cms-server/themes/test/assets/bootstrap-5.3.2/css/bootstrap.min.css.map rename to test-server/themes/test/assets/bootstrap-5.3.2/css/bootstrap.min.css.map diff --git a/cms-server/themes/test/assets/bootstrap-5.3.2/js/bootstrap.bundle.min.js b/test-server/themes/test/assets/bootstrap-5.3.2/js/bootstrap.bundle.min.js similarity index 100% rename from cms-server/themes/test/assets/bootstrap-5.3.2/js/bootstrap.bundle.min.js rename to test-server/themes/test/assets/bootstrap-5.3.2/js/bootstrap.bundle.min.js diff --git a/cms-server/themes/test/assets/bootstrap-5.3.2/js/bootstrap.bundle.min.js.map b/test-server/themes/test/assets/bootstrap-5.3.2/js/bootstrap.bundle.min.js.map similarity index 100% rename from cms-server/themes/test/assets/bootstrap-5.3.2/js/bootstrap.bundle.min.js.map rename to test-server/themes/test/assets/bootstrap-5.3.2/js/bootstrap.bundle.min.js.map diff --git a/cms-server/themes/test/assets/bootstrap-icons-1.11.1/bootstrap-icons.min.css b/test-server/themes/test/assets/bootstrap-icons-1.11.1/bootstrap-icons.min.css similarity index 100% rename from cms-server/themes/test/assets/bootstrap-icons-1.11.1/bootstrap-icons.min.css rename to test-server/themes/test/assets/bootstrap-icons-1.11.1/bootstrap-icons.min.css diff --git a/cms-server/themes/test/assets/bootstrap-icons-1.11.1/fonts/bootstrap-icons.woff b/test-server/themes/test/assets/bootstrap-icons-1.11.1/fonts/bootstrap-icons.woff similarity index 100% rename from cms-server/themes/test/assets/bootstrap-icons-1.11.1/fonts/bootstrap-icons.woff rename to test-server/themes/test/assets/bootstrap-icons-1.11.1/fonts/bootstrap-icons.woff diff --git a/cms-server/themes/test/assets/bootstrap-icons-1.11.1/fonts/bootstrap-icons.woff2 b/test-server/themes/test/assets/bootstrap-icons-1.11.1/fonts/bootstrap-icons.woff2 similarity index 100% rename from cms-server/themes/test/assets/bootstrap-icons-1.11.1/fonts/bootstrap-icons.woff2 rename to test-server/themes/test/assets/bootstrap-icons-1.11.1/fonts/bootstrap-icons.woff2 diff --git a/cms-server/themes/test/assets/favicon.ico b/test-server/themes/test/assets/favicon.ico similarity index 100% rename from cms-server/themes/test/assets/favicon.ico rename to test-server/themes/test/assets/favicon.ico diff --git a/cms-server/themes/test/assets/images/test.jpg b/test-server/themes/test/assets/images/test.jpg similarity index 100% rename from cms-server/themes/test/assets/images/test.jpg rename to test-server/themes/test/assets/images/test.jpg diff --git a/cms-server/themes/test/assets/prism-1.29.0/prism.css b/test-server/themes/test/assets/prism-1.29.0/prism.css similarity index 100% rename from cms-server/themes/test/assets/prism-1.29.0/prism.css rename to test-server/themes/test/assets/prism-1.29.0/prism.css diff --git a/cms-server/themes/test/assets/prism-1.29.0/prism.js b/test-server/themes/test/assets/prism-1.29.0/prism.js similarity index 100% rename from cms-server/themes/test/assets/prism-1.29.0/prism.js rename to test-server/themes/test/assets/prism-1.29.0/prism.js diff --git a/cms-server/themes/test/assets/search-1.css b/test-server/themes/test/assets/search-1.css similarity index 100% rename from cms-server/themes/test/assets/search-1.css rename to test-server/themes/test/assets/search-1.css diff --git a/cms-server/themes/test/assets/search-1.js b/test-server/themes/test/assets/search-1.js similarity index 100% rename from cms-server/themes/test/assets/search-1.js rename to test-server/themes/test/assets/search-1.js diff --git a/cms-server/themes/test/extensions/theme.extension.js b/test-server/themes/test/extensions/theme.extension.js similarity index 100% rename from cms-server/themes/test/extensions/theme.extension.js rename to test-server/themes/test/extensions/theme.extension.js diff --git a/cms-server/themes/test/messages/labels.properties b/test-server/themes/test/messages/labels.properties similarity index 100% rename from cms-server/themes/test/messages/labels.properties rename to test-server/themes/test/messages/labels.properties diff --git a/cms-server/themes/test/templates/content.html b/test-server/themes/test/templates/content.html similarity index 100% rename from cms-server/themes/test/templates/content.html rename to test-server/themes/test/templates/content.html diff --git a/cms-server/themes/test/theme.yaml b/test-server/themes/test/theme.yaml similarity index 100% rename from cms-server/themes/test/theme.yaml rename to test-server/themes/test/theme.yaml From ff17ab6cfa1a2e35c008d2667a806f04b1fb6753 Mon Sep 17 00:00:00 2001 From: Thorsten Marx Date: Wed, 30 Oct 2024 15:07:35 +0100 Subject: [PATCH 2/3] update build --- cms-server/src/assembly/executable.xml | 8 ++++---- distribution/build.xml | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cms-server/src/assembly/executable.xml b/cms-server/src/assembly/executable.xml index 827adf2f..6b561cbd 100644 --- a/cms-server/src/assembly/executable.xml +++ b/cms-server/src/assembly/executable.xml @@ -9,26 +9,26 @@ - ${project.basedir} + ${project.basedir}../test-server server.toml log4j2.xml - ${project.basedir}/hosts + ${project.basedir}../test-server/hosts demo/**/* - ${project.basedir}/themes + ${project.basedir}../test-server/themes demo/**/* - ${project.basedir}/modules + ${project.basedir}../test-server/modules **/* diff --git a/distribution/build.xml b/distribution/build.xml index 6530056b..6009d8f2 100644 --- a/distribution/build.xml +++ b/distribution/build.xml @@ -1,6 +1,6 @@ - 7.1.1 + 7.1.2 v3.0.0 @@ -16,20 +16,20 @@ - - + + - - + + - - + + From a22c2268790f7b4cc0e132523648d5c2bb762366 Mon Sep 17 00:00:00 2001 From: Thorsten Marx Date: Wed, 30 Oct 2024 16:19:18 +0100 Subject: [PATCH 3/3] add mockito update --- pom.xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pom.xml b/pom.xml index fc43f2d9..ad6c2b84 100644 --- a/pom.xml +++ b/pom.xml @@ -390,6 +390,11 @@ maven-surefire-plugin 3.5.1 + + org.apache.maven.plugins + maven-dependency-plugin + 3.8.1 + @@ -492,6 +497,24 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + + properties + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + @{argLine} -javaagent:${org.mockito:mockito-core:jar} + +