From a54bd5de4199dd4bcae4fddea0f6e81f3b904756 Mon Sep 17 00:00:00 2001 From: Guillaume Dugas Date: Tue, 26 Aug 2025 17:33:03 +0200 Subject: [PATCH] Project init --- .dockerignore | 5 + .github/workflows/build.yml | 27 ++ .gitignore | 45 +++ .mvn/settings.xml | 19 + .mvn/wrapper/.gitignore | 1 + .mvn/wrapper/MavenWrapperDownloader.java | 93 +++++ .mvn/wrapper/maven-wrapper.properties | 20 ++ README.md | 62 ++++ modules/pathit-core/deployment/pom.xml | 70 ++++ .../core/deployment/PathitCoreProcessor.java | 41 +++ .../core/test/PathitCoreDevModeTest.java | 23 ++ .../pathit/core/test/PathitCoreTest.java | 22 ++ modules/pathit-core/integration-tests/pom.xml | 97 +++++ .../pathit/core/it/PathitCoreResource.java | 32 ++ .../src/main/resources/application.properties | 0 .../pathit/core/it/PathitCoreResourceIT.java | 7 + .../core/it/PathitCoreResourceTest.java | 21 ++ modules/pathit-core/pom.xml | 61 ++++ modules/pathit-core/runtime/pom.xml | 108 ++++++ .../pathit/core/PathMapRepository.java | 9 + .../pathit/core/mappers/PathMapMapper.java | 19 + .../pathit/core/models/PathMap.java | 27 ++ .../pathit/core/models/PushRequest.java | 21 ++ .../pathit/core/resources/AdminResource.java | 28 ++ .../core/resources/PathMapResource.java | 40 +++ .../pathit/core/services/PathMapService.java | 26 ++ .../src/main/resources/META-INF/beans.xml | 0 .../resources/META-INF/quarkus-extension.yaml | 9 + .../src/main/resources/application.properties | 1 + .../main/resources/templates/redirect.html | 9 + .../deployment/pom.xml | 57 +++ .../PathitSecurityPropertiesProcessor.java | 16 + .../PathitSecurityPropertiesDevModeTest.java | 23 ++ .../test/PathitSecurityPropertiesTest.java | 23 ++ .../integration-tests/pom.xml | 97 +++++ .../it/PathitSecurityPropertiesResource.java | 32 ++ .../src/main/resources/application.properties | 0 .../PathitSecurityPropertiesResourceIT.java | 7 + .../PathitSecurityPropertiesResourceTest.java | 21 ++ modules/pathit-security-properties/pom.xml | 72 ++++ .../runtime/pom.xml | 64 ++++ .../resources/META-INF/quarkus-extension.yaml | 9 + .../src/main/resources/application.properties | 4 + .../deployment/pom.xml | 75 ++++ .../PathitStoragePostgresProcessor.java | 37 ++ .../PathitStoragePostgresDevModeTest.java | 23 ++ .../test/PathitStoragePostgresTest.java | 23 ++ .../integration-tests/pom.xml | 97 +++++ .../it/PathitStoragePostgresResource.java | 32 ++ .../src/main/resources/application.properties | 0 .../it/PathitStoragePostgresResourceIT.java | 7 + .../it/PathitStoragePostgresResourceTest.java | 21 ++ modules/pathit-storage-postgres/pom.xml | 72 ++++ .../pathit-storage-postgres/runtime/pom.xml | 107 ++++++ .../postgres/entity/PathMapEntity.java | 28 ++ .../postgres/mappers/PathMapEntityMapper.java | 12 + .../repository/PathMapJpaRepository.java | 34 ++ .../src/main/resources/META-INF/beans.xml | 0 .../resources/META-INF/quarkus-extension.yaml | 9 + .../src/main/resources/application.properties | 11 + .../resources/db/migration/V1.0.0__Base.sql | 11 + mvnw | 332 ++++++++++++++++++ mvnw.cmd | 206 +++++++++++ pom.xml | 108 ++++++ 64 files changed, 2613 insertions(+) create mode 100644 .dockerignore create mode 100644 .github/workflows/build.yml create mode 100644 .gitignore create mode 100644 .mvn/settings.xml create mode 100644 .mvn/wrapper/.gitignore create mode 100644 .mvn/wrapper/MavenWrapperDownloader.java create mode 100644 .mvn/wrapper/maven-wrapper.properties create mode 100644 README.md create mode 100644 modules/pathit-core/deployment/pom.xml create mode 100644 modules/pathit-core/deployment/src/main/java/fr/codeanddata/pathit/core/deployment/PathitCoreProcessor.java create mode 100644 modules/pathit-core/deployment/src/test/java/fr/codeanddata/pathit/core/test/PathitCoreDevModeTest.java create mode 100644 modules/pathit-core/deployment/src/test/java/fr/codeanddata/pathit/core/test/PathitCoreTest.java create mode 100644 modules/pathit-core/integration-tests/pom.xml create mode 100644 modules/pathit-core/integration-tests/src/main/java/fr/codeanddata/pathit/core/it/PathitCoreResource.java create mode 100644 modules/pathit-core/integration-tests/src/main/resources/application.properties create mode 100644 modules/pathit-core/integration-tests/src/test/java/fr/codeanddata/pathit/core/it/PathitCoreResourceIT.java create mode 100644 modules/pathit-core/integration-tests/src/test/java/fr/codeanddata/pathit/core/it/PathitCoreResourceTest.java create mode 100644 modules/pathit-core/pom.xml create mode 100644 modules/pathit-core/runtime/pom.xml create mode 100644 modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/PathMapRepository.java create mode 100644 modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/mappers/PathMapMapper.java create mode 100644 modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/models/PathMap.java create mode 100644 modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/models/PushRequest.java create mode 100644 modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/resources/AdminResource.java create mode 100644 modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/resources/PathMapResource.java create mode 100644 modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/services/PathMapService.java create mode 100644 modules/pathit-core/runtime/src/main/resources/META-INF/beans.xml create mode 100644 modules/pathit-core/runtime/src/main/resources/META-INF/quarkus-extension.yaml create mode 100644 modules/pathit-core/runtime/src/main/resources/application.properties create mode 100644 modules/pathit-core/runtime/src/main/resources/templates/redirect.html create mode 100644 modules/pathit-security-properties/deployment/pom.xml create mode 100644 modules/pathit-security-properties/deployment/src/main/java/fr/codeanddata/pathit/security/properties/deployment/PathitSecurityPropertiesProcessor.java create mode 100644 modules/pathit-security-properties/deployment/src/test/java/fr/codeanddata/pathit/security/properties/test/PathitSecurityPropertiesDevModeTest.java create mode 100644 modules/pathit-security-properties/deployment/src/test/java/fr/codeanddata/pathit/security/properties/test/PathitSecurityPropertiesTest.java create mode 100644 modules/pathit-security-properties/integration-tests/pom.xml create mode 100644 modules/pathit-security-properties/integration-tests/src/main/java/fr/codeanddata/pathit/security/properties/it/PathitSecurityPropertiesResource.java create mode 100644 modules/pathit-security-properties/integration-tests/src/main/resources/application.properties create mode 100644 modules/pathit-security-properties/integration-tests/src/test/java/fr/codeanddata/pathit/security/properties/it/PathitSecurityPropertiesResourceIT.java create mode 100644 modules/pathit-security-properties/integration-tests/src/test/java/fr/codeanddata/pathit/security/properties/it/PathitSecurityPropertiesResourceTest.java create mode 100644 modules/pathit-security-properties/pom.xml create mode 100644 modules/pathit-security-properties/runtime/pom.xml create mode 100644 modules/pathit-security-properties/runtime/src/main/resources/META-INF/quarkus-extension.yaml create mode 100644 modules/pathit-security-properties/runtime/src/main/resources/application.properties create mode 100644 modules/pathit-storage-postgres/deployment/pom.xml create mode 100644 modules/pathit-storage-postgres/deployment/src/main/java/fr/codeanddata/pathit/storage/postgres/deployment/PathitStoragePostgresProcessor.java create mode 100644 modules/pathit-storage-postgres/deployment/src/test/java/fr/codeanddata/pathit/storage/postgres/test/PathitStoragePostgresDevModeTest.java create mode 100644 modules/pathit-storage-postgres/deployment/src/test/java/fr/codeanddata/pathit/storage/postgres/test/PathitStoragePostgresTest.java create mode 100644 modules/pathit-storage-postgres/integration-tests/pom.xml create mode 100644 modules/pathit-storage-postgres/integration-tests/src/main/java/fr/codeanddata/pathit/storage/postgres/it/PathitStoragePostgresResource.java create mode 100644 modules/pathit-storage-postgres/integration-tests/src/main/resources/application.properties create mode 100644 modules/pathit-storage-postgres/integration-tests/src/test/java/fr/codeanddata/pathit/storage/postgres/it/PathitStoragePostgresResourceIT.java create mode 100644 modules/pathit-storage-postgres/integration-tests/src/test/java/fr/codeanddata/pathit/storage/postgres/it/PathitStoragePostgresResourceTest.java create mode 100644 modules/pathit-storage-postgres/pom.xml create mode 100644 modules/pathit-storage-postgres/runtime/pom.xml create mode 100644 modules/pathit-storage-postgres/runtime/src/main/java/fr/codeanddata/pathit/storage/postgres/entity/PathMapEntity.java create mode 100644 modules/pathit-storage-postgres/runtime/src/main/java/fr/codeanddata/pathit/storage/postgres/mappers/PathMapEntityMapper.java create mode 100644 modules/pathit-storage-postgres/runtime/src/main/java/fr/codeanddata/pathit/storage/postgres/repository/PathMapJpaRepository.java create mode 100644 modules/pathit-storage-postgres/runtime/src/main/resources/META-INF/beans.xml create mode 100644 modules/pathit-storage-postgres/runtime/src/main/resources/META-INF/quarkus-extension.yaml create mode 100644 modules/pathit-storage-postgres/runtime/src/main/resources/application.properties create mode 100644 modules/pathit-storage-postgres/runtime/src/main/resources/db/migration/V1.0.0__Base.sql create mode 100755 mvnw create mode 100644 mvnw.cmd create mode 100644 pom.xml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..94810d0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +* +!target/*-runner +!target/*-runner.jar +!target/lib/* +!target/quarkus-app/* \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..aca145b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,27 @@ +name: Maven build +run-name: Build application with maven +on: [ push ] + +jobs: + build: + runs-on: ubuntu-latest + env: + MAVEN_ACCESS_TOKEN: ${{ secrets.CI_TOKEN }} + MAVEN_REPO_OWNER: ${{ gitea.owner }} + steps: + - name: Check out latest repository code + uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + + - name: Build project + run: ./mvnw -s .mvn/settings.xml clean install -DskipTests + + - name: Deploy project + run: | + echo $MAVEN_REPO_OWNER + ./mvnw -s .mvn/settings.xml deploy + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..91a800a --- /dev/null +++ b/.gitignore @@ -0,0 +1,45 @@ +#Maven +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +release.properties +.flattened-pom.xml + +# Eclipse +.project +.classpath +.settings/ +bin/ + +# IntelliJ +.idea +*.ipr +*.iml +*.iws + +# NetBeans +nb-configuration.xml + +# Visual Studio Code +.vscode +.factorypath + +# OSX +.DS_Store + +# Vim +*.swp +*.swo + +# patch +*.orig +*.rej + +# Local environment +.env + +# Plugin directory +/.quarkus/cli/plugins/ +# TLS Certificates +.certs/ diff --git a/.mvn/settings.xml b/.mvn/settings.xml new file mode 100644 index 0000000..984d060 --- /dev/null +++ b/.mvn/settings.xml @@ -0,0 +1,19 @@ + + + + gitea + + + + Authorization + token ${env.MAVEN_ACCESS_TOKEN} + + + + + + + diff --git a/.mvn/wrapper/.gitignore b/.mvn/wrapper/.gitignore new file mode 100644 index 0000000..e72f5e8 --- /dev/null +++ b/.mvn/wrapper/.gitignore @@ -0,0 +1 @@ +maven-wrapper.jar diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 0000000..0636a7b --- /dev/null +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,93 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import java.io.IOException; +import java.io.InputStream; +import java.net.Authenticator; +import java.net.PasswordAuthentication; +import java.net.URI; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.util.concurrent.ThreadLocalRandom; + +public final class MavenWrapperDownloader { + private static final String WRAPPER_VERSION = "3.3.2"; + + private static final boolean VERBOSE = Boolean.parseBoolean(System.getenv("MVNW_VERBOSE")); + + public static void main(String[] args) { + log("Apache Maven Wrapper Downloader " + WRAPPER_VERSION); + + if (args.length != 2) { + System.err.println(" - ERROR wrapperUrl or wrapperJarPath parameter missing"); + System.exit(1); + } + + try { + log(" - Downloader started"); + final URL wrapperUrl = URI.create(args[0]).toURL(); + final String jarPath = args[1].replace("..", ""); // Sanitize path + final Path wrapperJarPath = Paths.get(jarPath).toAbsolutePath().normalize(); + downloadFileFromURL(wrapperUrl, wrapperJarPath); + log("Done"); + } catch (IOException e) { + System.err.println("- Error downloading: " + e.getMessage()); + if (VERBOSE) { + e.printStackTrace(); + } + System.exit(1); + } + } + + private static void downloadFileFromURL(URL wrapperUrl, Path wrapperJarPath) + throws IOException { + log(" - Downloading to: " + wrapperJarPath); + if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { + final String username = System.getenv("MVNW_USERNAME"); + final char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); + Authenticator.setDefault(new Authenticator() { + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(username, password); + } + }); + } + Path temp = wrapperJarPath + .getParent() + .resolve(wrapperJarPath.getFileName() + "." + + Long.toUnsignedString(ThreadLocalRandom.current().nextLong()) + ".tmp"); + try (InputStream inStream = wrapperUrl.openStream()) { + Files.copy(inStream, temp, StandardCopyOption.REPLACE_EXISTING); + Files.move(temp, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING); + } finally { + Files.deleteIfExists(temp); + } + log(" - Downloader complete"); + } + + private static void log(String msg) { + if (VERBOSE) { + System.out.println(msg); + } + } + +} diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..1a580be --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +wrapperVersion=3.3.2 +distributionType=source +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..fe7afe9 --- /dev/null +++ b/README.md @@ -0,0 +1,62 @@ +# pathit + +This project uses Quarkus, the Supersonic Subatomic Java Framework. + +If you want to learn more about Quarkus, please visit its website: . + +## Running the application in dev mode + +You can run your application in dev mode that enables live coding using: + +```shell script +./mvnw quarkus:dev +``` + +> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at . + +## Packaging and running the application + +The application can be packaged using: + +```shell script +./mvnw package +``` + +It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory. +Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory. + +The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`. + +If you want to build an _über-jar_, execute the following command: + +```shell script +./mvnw package -Dquarkus.package.jar.type=uber-jar +``` + +The application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`. + +## Creating a native executable + +You can create a native executable using: + +```shell script +./mvnw package -Dnative +``` + +Or, if you don't have GraalVM installed, you can run the native executable build in a container using: + +```shell script +./mvnw package -Dnative -Dquarkus.native.container-build=true +``` + +You can then execute your native executable with: `./target/pathit-1.0-SNAPSHOT-runner` + +If you want to learn more about building native executables, please consult . + +## Provided Code + +### REST + +Easily start your REST Web Services + +[Related guide section...](https://quarkus.io/guides/getting-started-reactive#reactive-jax-rs-resources) diff --git a/modules/pathit-core/deployment/pom.xml b/modules/pathit-core/deployment/pom.xml new file mode 100644 index 0000000..3124533 --- /dev/null +++ b/modules/pathit-core/deployment/pom.xml @@ -0,0 +1,70 @@ + + + 4.0.0 + + pathit-core-deployment + Pathit Core - Deployment + + fr.codeanddata.pathit + pathit-core-parent + 1.0-SNAPSHOT + ../pom.xml + + + + + io.quarkus + quarkus-arc-deployment + + + io.quarkus + quarkus-rest-deployment + + + io.quarkus + quarkus-rest-jackson-deployment + + + io.quarkus + quarkus-security-deployment + + + io.quarkus + quarkus-qute-deployment + + + + fr.codeanddata.pathit + pathit-core + ${project.version} + + + io.quarkus + quarkus-junit5-internal + test + + + + + + + maven-compiler-plugin + + + default-compile + + + + io.quarkus + quarkus-extension-processor + ${quarkus.version} + + + + + + + + + diff --git a/modules/pathit-core/deployment/src/main/java/fr/codeanddata/pathit/core/deployment/PathitCoreProcessor.java b/modules/pathit-core/deployment/src/main/java/fr/codeanddata/pathit/core/deployment/PathitCoreProcessor.java new file mode 100644 index 0000000..fc912e6 --- /dev/null +++ b/modules/pathit-core/deployment/src/main/java/fr/codeanddata/pathit/core/deployment/PathitCoreProcessor.java @@ -0,0 +1,41 @@ +package fr.codeanddata.pathit.core.deployment; + +import fr.codeanddata.pathit.core.mappers.PathMapMapper; +import fr.codeanddata.pathit.core.mappers.PathMapMapperImpl; +import fr.codeanddata.pathit.core.resources.AdminResource; +import fr.codeanddata.pathit.core.resources.PathMapResource; +import fr.codeanddata.pathit.core.services.PathMapService; +import io.quarkus.arc.deployment.AdditionalBeanBuildItem; +import io.quarkus.deployment.annotations.BuildProducer; +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; +import io.quarkus.deployment.builditem.IndexDependencyBuildItem; + +class PathitCoreProcessor { + + private static final String FEATURE = "pathit-core"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + + @BuildStep + IndexDependencyBuildItem index() { + return new IndexDependencyBuildItem("fr.codeanddata.pathit.core", FEATURE); + } + + @BuildStep + void addRestEndpoints(BuildProducer additionalBeans) { + additionalBeans.produce(AdditionalBeanBuildItem.unremovableOf(AdminResource.class)); + additionalBeans.produce(AdditionalBeanBuildItem.unremovableOf(PathMapResource.class)); + additionalBeans.produce(AdditionalBeanBuildItem.unremovableOf(PathMapService.class)); + } + + @BuildStep + AdditionalBeanBuildItem indexMapper() { + return new AdditionalBeanBuildItem(PathMapMapperImpl.class); + } + + +} diff --git a/modules/pathit-core/deployment/src/test/java/fr/codeanddata/pathit/core/test/PathitCoreDevModeTest.java b/modules/pathit-core/deployment/src/test/java/fr/codeanddata/pathit/core/test/PathitCoreDevModeTest.java new file mode 100644 index 0000000..9b792b1 --- /dev/null +++ b/modules/pathit-core/deployment/src/test/java/fr/codeanddata/pathit/core/test/PathitCoreDevModeTest.java @@ -0,0 +1,23 @@ +package fr.codeanddata.pathit.core.test; + +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.RegisterExtension; + +import io.quarkus.test.QuarkusDevModeTest; + +public class PathitCoreDevModeTest { + + // Start hot reload (DevMode) test with your extension loaded + @RegisterExtension + static final QuarkusDevModeTest devModeTest = new QuarkusDevModeTest() + .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)); + + @Test + public void writeYourOwnDevModeTest() { + // Write your dev mode tests here - see the testing extension guide https://quarkus.io/guides/writing-extensions#testing-hot-reload for more information + Assertions.assertTrue(true, "Add dev mode assertions to " + getClass().getName()); + } +} diff --git a/modules/pathit-core/deployment/src/test/java/fr/codeanddata/pathit/core/test/PathitCoreTest.java b/modules/pathit-core/deployment/src/test/java/fr/codeanddata/pathit/core/test/PathitCoreTest.java new file mode 100644 index 0000000..a4602cc --- /dev/null +++ b/modules/pathit-core/deployment/src/test/java/fr/codeanddata/pathit/core/test/PathitCoreTest.java @@ -0,0 +1,22 @@ +package fr.codeanddata.pathit.core.test; + +import io.quarkus.test.QuarkusUnitTest; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.RegisterExtension; + +public class PathitCoreTest { + + // Start unit test with your extension loaded + @RegisterExtension + static final QuarkusUnitTest unitTest = new QuarkusUnitTest() + .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)); + + @Test + public void writeYourOwnUnitTest() { + // Write your unit tests here - see the testing extension guide https://quarkus.io/guides/writing-extensions#testing-extensions for more information + Assertions.assertTrue(true, "Add some assertions to " + getClass().getName()); + } +} diff --git a/modules/pathit-core/integration-tests/pom.xml b/modules/pathit-core/integration-tests/pom.xml new file mode 100644 index 0000000..dc3d396 --- /dev/null +++ b/modules/pathit-core/integration-tests/pom.xml @@ -0,0 +1,97 @@ + + + 4.0.0 + + + fr.codeanddata.pathit + pathit-core-parent + 1.0.0-SNAPSHOT + + pathit-core-integration-tests + Pathit Core - Integration Tests + + + true + + + + + io.quarkus + quarkus-rest + + + fr.codeanddata.pathit + pathit-core + ${project.version} + + + io.quarkus + quarkus-junit5 + test + + + io.rest-assured + rest-assured + test + + + + + + + io.quarkus + quarkus-maven-plugin + + + + build + + + + + + maven-failsafe-plugin + + + + integration-test + verify + + + + + + ${project.build.directory}/${project.build.finalName}-runner + org.jboss.logmanager.LogManager + ${maven.home} + + + + + + + + + native-image + + + native + + + + + + maven-surefire-plugin + + ${native.surefire.skip} + + + + + + false + true + + + + diff --git a/modules/pathit-core/integration-tests/src/main/java/fr/codeanddata/pathit/core/it/PathitCoreResource.java b/modules/pathit-core/integration-tests/src/main/java/fr/codeanddata/pathit/core/it/PathitCoreResource.java new file mode 100644 index 0000000..2f0b6fe --- /dev/null +++ b/modules/pathit-core/integration-tests/src/main/java/fr/codeanddata/pathit/core/it/PathitCoreResource.java @@ -0,0 +1,32 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package fr.codeanddata.pathit.core.it; + +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; + +@Path("/pathit-pathit") +@ApplicationScoped +public class PathitCoreResource { + // add some rest methods here + + @GET + public String hello() { + return "Hello pathit-pathit"; + } +} diff --git a/modules/pathit-core/integration-tests/src/main/resources/application.properties b/modules/pathit-core/integration-tests/src/main/resources/application.properties new file mode 100644 index 0000000..e69de29 diff --git a/modules/pathit-core/integration-tests/src/test/java/fr/codeanddata/pathit/core/it/PathitCoreResourceIT.java b/modules/pathit-core/integration-tests/src/test/java/fr/codeanddata/pathit/core/it/PathitCoreResourceIT.java new file mode 100644 index 0000000..9f67bb6 --- /dev/null +++ b/modules/pathit-core/integration-tests/src/test/java/fr/codeanddata/pathit/core/it/PathitCoreResourceIT.java @@ -0,0 +1,7 @@ +package fr.codeanddata.pathit.core.it; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +public class PathitCoreResourceIT extends PathitCoreResourceTest { +} diff --git a/modules/pathit-core/integration-tests/src/test/java/fr/codeanddata/pathit/core/it/PathitCoreResourceTest.java b/modules/pathit-core/integration-tests/src/test/java/fr/codeanddata/pathit/core/it/PathitCoreResourceTest.java new file mode 100644 index 0000000..c55b5f7 --- /dev/null +++ b/modules/pathit-core/integration-tests/src/test/java/fr/codeanddata/pathit/core/it/PathitCoreResourceTest.java @@ -0,0 +1,21 @@ +package fr.codeanddata.pathit.core.it; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.Matchers.is; + +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusTest; + +@QuarkusTest +public class PathitCoreResourceTest { + + @Test + public void testHelloEndpoint() { + given() + .when().get("/pathit-pathit") + .then() + .statusCode(200) + .body(is("Hello pathit-pathit")); + } +} diff --git a/modules/pathit-core/pom.xml b/modules/pathit-core/pom.xml new file mode 100644 index 0000000..bb98a01 --- /dev/null +++ b/modules/pathit-core/pom.xml @@ -0,0 +1,61 @@ + + + 4.0.0 + pathit-core-parent + Pathit Core - Parent + pom + + + fr.codeanddata.pathit + pathit-pom + 1.0-SNAPSHOT + ../../pom.xml + + + + deployment + runtime + + + + + + + io.quarkus + quarkus-maven-plugin + ${quarkus.version} + + + maven-surefire-plugin + ${surefire-plugin.version} + + + org.jboss.logmanager.LogManager + ${maven.home} + ${settings.localRepository} + + + + + maven-failsafe-plugin + ${failsafe-plugin.version} + + + org.jboss.logmanager.LogManager + ${maven.home} + ${settings.localRepository} + + + + + maven-compiler-plugin + ${compiler-plugin.version} + + true + + + + + + diff --git a/modules/pathit-core/runtime/pom.xml b/modules/pathit-core/runtime/pom.xml new file mode 100644 index 0000000..4a5fe49 --- /dev/null +++ b/modules/pathit-core/runtime/pom.xml @@ -0,0 +1,108 @@ + + + 4.0.0 + + pathit-core + Pathit Core - Runtime + + fr.codeanddata.pathit + pathit-core-parent + 1.0-SNAPSHOT + ../pom.xml + + + + + io.quarkus + quarkus-arc + + + io.quarkus + quarkus-rest + + + io.quarkus + quarkus-rest-jackson + + + io.quarkus + quarkus-security + + + io.quarkus + quarkus-qute + + + + + org.projectlombok + lombok + ${lombok.version} + provided + + + org.mapstruct + mapstruct + ${mapstruct.version} + + + io.quarkus + quarkus-junit5 + test + + + io.rest-assured + rest-assured + test + + + + + + + io.quarkus + quarkus-extension-maven-plugin + ${quarkus.version} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + + + + + maven-compiler-plugin + + + default-compile + + + + org.projectlombok + lombok + ${lombok.version} + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + + + io.quarkus + quarkus-extension-processor + ${quarkus.version} + + + + + + + + + diff --git a/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/PathMapRepository.java b/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/PathMapRepository.java new file mode 100644 index 0000000..dffaba9 --- /dev/null +++ b/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/PathMapRepository.java @@ -0,0 +1,9 @@ +package fr.codeanddata.pathit.core; + +import fr.codeanddata.pathit.core.models.PathMap; +import io.smallrye.mutiny.Uni; + +public interface PathMapRepository { + Uni create(PathMap pathMap); + Uni getByHash(String hash); +} diff --git a/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/mappers/PathMapMapper.java b/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/mappers/PathMapMapper.java new file mode 100644 index 0000000..64442aa --- /dev/null +++ b/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/mappers/PathMapMapper.java @@ -0,0 +1,19 @@ +package fr.codeanddata.pathit.core.mappers; + +import fr.codeanddata.pathit.core.models.PathMap; +import fr.codeanddata.pathit.core.models.PushRequest; +import org.mapstruct.Mapper; +import org.mapstruct.MappingConstants; + +import java.time.LocalDateTime; + +@Mapper(componentModel = MappingConstants.ComponentModel.CDI) +public abstract class PathMapMapper { + public PathMap toModel(PushRequest pushRequest) { + return PathMap.builder() + .hash(pushRequest.getHash()) + .destination(pushRequest.getDestination()) + .creationDate(LocalDateTime.now()) + .build(); + } +} diff --git a/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/models/PathMap.java b/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/models/PathMap.java new file mode 100644 index 0000000..b34dfe2 --- /dev/null +++ b/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/models/PathMap.java @@ -0,0 +1,27 @@ +package fr.codeanddata.pathit.core.models; + +import lombok.*; + +import java.time.LocalDateTime; + +@Getter +@Setter +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class PathMap { + /** + * + */ + String hash; + + /** + * + */ + String destination; + + /** + * + */ + LocalDateTime creationDate; +} diff --git a/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/models/PushRequest.java b/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/models/PushRequest.java new file mode 100644 index 0000000..b9cd1a2 --- /dev/null +++ b/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/models/PushRequest.java @@ -0,0 +1,21 @@ +package fr.codeanddata.pathit.core.models; + + +import lombok.*; + +@Getter +@Setter +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class PushRequest { + /** + * + */ + String hash; + + /** + * + */ + String destination; +} diff --git a/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/resources/AdminResource.java b/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/resources/AdminResource.java new file mode 100644 index 0000000..b2526d8 --- /dev/null +++ b/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/resources/AdminResource.java @@ -0,0 +1,28 @@ +package fr.codeanddata.pathit.core.resources; + +import fr.codeanddata.pathit.core.models.PathMap; +import fr.codeanddata.pathit.core.models.PushRequest; +import fr.codeanddata.pathit.core.services.PathMapService; +import io.smallrye.mutiny.Uni; +import jakarta.annotation.security.RolesAllowed; +import jakarta.inject.Inject; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; + +@Path("/admin/api/pathmap") +public class AdminResource { + + @Inject + PathMapService pathMapService; + + @POST + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + @RolesAllowed("pathit") + public Uni push(PushRequest pushRequest) { + return pathMapService.push(pushRequest); + } +} diff --git a/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/resources/PathMapResource.java b/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/resources/PathMapResource.java new file mode 100644 index 0000000..59410ab --- /dev/null +++ b/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/resources/PathMapResource.java @@ -0,0 +1,40 @@ +package fr.codeanddata.pathit.core.resources; + +import fr.codeanddata.pathit.core.services.PathMapService; +import io.quarkus.qute.Template; +import io.smallrye.mutiny.Uni; +import jakarta.annotation.security.PermitAll; +import jakarta.inject.Inject; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import org.jboss.resteasy.reactive.RestPath; + +@Path("/") +public class PathMapResource { + + @Inject + PathMapService pathMapService; + + @Inject + Template redirect; + + @GET + @Path("{hash}") + @Produces(MediaType.TEXT_HTML) + @PermitAll + public Uni mapPath(@RestPath String hash) { + return pathMapService.getByHash(hash) + .map(pathMap -> Response.status(Response.Status.FOUND) + .header("Location", pathMap.getDestination()) + .entity(redirect.data("location", pathMap.getDestination()).render()) + .build()) + + .onFailure().recoverWithItem(e -> Response + .status(Response.Status.SERVICE_UNAVAILABLE) + .entity(redirect.data("location", hash).render()) + .build()); + } +} diff --git a/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/services/PathMapService.java b/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/services/PathMapService.java new file mode 100644 index 0000000..00f501b --- /dev/null +++ b/modules/pathit-core/runtime/src/main/java/fr/codeanddata/pathit/core/services/PathMapService.java @@ -0,0 +1,26 @@ +package fr.codeanddata.pathit.core.services; + +import fr.codeanddata.pathit.core.PathMapRepository; +import fr.codeanddata.pathit.core.mappers.PathMapMapper; +import fr.codeanddata.pathit.core.models.PathMap; +import fr.codeanddata.pathit.core.models.PushRequest; +import io.smallrye.mutiny.Uni; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + +@ApplicationScoped +public class PathMapService { + @Inject + PathMapRepository pathMapRepository; + + @Inject + PathMapMapper mapper; + + public Uni push(PushRequest pushRequest) { + return pathMapRepository.create(mapper.toModel(pushRequest)); + } + + public Uni getByHash(String hash) { + return pathMapRepository.getByHash(hash); + } +} diff --git a/modules/pathit-core/runtime/src/main/resources/META-INF/beans.xml b/modules/pathit-core/runtime/src/main/resources/META-INF/beans.xml new file mode 100644 index 0000000..e69de29 diff --git a/modules/pathit-core/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/modules/pathit-core/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 0000000..a5c1a6a --- /dev/null +++ b/modules/pathit-core/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,9 @@ +name: Pathit Core +#description: Do something useful. +metadata: +# keywords: +# - pathit-pathit +# guide: ... # To create and publish this guide, see https://github.com/quarkiverse/quarkiverse/wiki#documenting-your-extension +# categories: +# - "miscellaneous" +# status: "preview" diff --git a/modules/pathit-core/runtime/src/main/resources/application.properties b/modules/pathit-core/runtime/src/main/resources/application.properties new file mode 100644 index 0000000..835bb44 --- /dev/null +++ b/modules/pathit-core/runtime/src/main/resources/application.properties @@ -0,0 +1 @@ +quarkus.native.resources.includes=src/main/resources/templates/** diff --git a/modules/pathit-core/runtime/src/main/resources/templates/redirect.html b/modules/pathit-core/runtime/src/main/resources/templates/redirect.html new file mode 100644 index 0000000..5825dec --- /dev/null +++ b/modules/pathit-core/runtime/src/main/resources/templates/redirect.html @@ -0,0 +1,9 @@ + + + {location} + + + +

You will be redirect soon. Please wait.

+ + diff --git a/modules/pathit-security-properties/deployment/pom.xml b/modules/pathit-security-properties/deployment/pom.xml new file mode 100644 index 0000000..7ab697d --- /dev/null +++ b/modules/pathit-security-properties/deployment/pom.xml @@ -0,0 +1,57 @@ + + + 4.0.0 + + + fr.codeanddata.pathit + pathit-security-properties-parent + 1.0-SNAPSHOT + ../pom.xml + + pathit-security-properties-deployment + Pathit Security Properties - Deployment + + + + io.quarkus + quarkus-arc-deployment + + + io.quarkus + quarkus-elytron-security-properties-file-deployment + + + fr.codeanddata.pathit + pathit-security-properties + ${project.version} + + + io.quarkus + quarkus-junit5-internal + test + + + + + + + maven-compiler-plugin + + + default-compile + + + + io.quarkus + quarkus-extension-processor + ${quarkus.version} + + + + + + + + + diff --git a/modules/pathit-security-properties/deployment/src/main/java/fr/codeanddata/pathit/security/properties/deployment/PathitSecurityPropertiesProcessor.java b/modules/pathit-security-properties/deployment/src/main/java/fr/codeanddata/pathit/security/properties/deployment/PathitSecurityPropertiesProcessor.java new file mode 100644 index 0000000..6e716e1 --- /dev/null +++ b/modules/pathit-security-properties/deployment/src/main/java/fr/codeanddata/pathit/security/properties/deployment/PathitSecurityPropertiesProcessor.java @@ -0,0 +1,16 @@ +package fr.codeanddata.pathit.security.properties.deployment; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; +import io.quarkus.deployment.builditem.IndexDependencyBuildItem; + +class PathitSecurityPropertiesProcessor { + + private static final String FEATURE = "pathit-security-properties"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + +} diff --git a/modules/pathit-security-properties/deployment/src/test/java/fr/codeanddata/pathit/security/properties/test/PathitSecurityPropertiesDevModeTest.java b/modules/pathit-security-properties/deployment/src/test/java/fr/codeanddata/pathit/security/properties/test/PathitSecurityPropertiesDevModeTest.java new file mode 100644 index 0000000..3c7ee30 --- /dev/null +++ b/modules/pathit-security-properties/deployment/src/test/java/fr/codeanddata/pathit/security/properties/test/PathitSecurityPropertiesDevModeTest.java @@ -0,0 +1,23 @@ +package fr.codeanddata.pathit.security.properties.test; + +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.RegisterExtension; + +import io.quarkus.test.QuarkusDevModeTest; + +public class PathitSecurityPropertiesDevModeTest { + + // Start hot reload (DevMode) test with your extension loaded + @RegisterExtension + static final QuarkusDevModeTest devModeTest = new QuarkusDevModeTest() + .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)); + + @Test + public void writeYourOwnDevModeTest() { + // Write your dev mode tests here - see the testing extension guide https://quarkus.io/guides/writing-extensions#testing-hot-reload for more information + Assertions.assertTrue(true, "Add dev mode assertions to " + getClass().getName()); + } +} diff --git a/modules/pathit-security-properties/deployment/src/test/java/fr/codeanddata/pathit/security/properties/test/PathitSecurityPropertiesTest.java b/modules/pathit-security-properties/deployment/src/test/java/fr/codeanddata/pathit/security/properties/test/PathitSecurityPropertiesTest.java new file mode 100644 index 0000000..21321e0 --- /dev/null +++ b/modules/pathit-security-properties/deployment/src/test/java/fr/codeanddata/pathit/security/properties/test/PathitSecurityPropertiesTest.java @@ -0,0 +1,23 @@ +package fr.codeanddata.pathit.security.properties.test; + +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.RegisterExtension; + +import io.quarkus.test.QuarkusUnitTest; + +public class PathitSecurityPropertiesTest { + + // Start unit test with your extension loaded + @RegisterExtension + static final QuarkusUnitTest unitTest = new QuarkusUnitTest() + .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)); + + @Test + public void writeYourOwnUnitTest() { + // Write your unit tests here - see the testing extension guide https://quarkus.io/guides/writing-extensions#testing-extensions for more information + Assertions.assertTrue(true, "Add some assertions to " + getClass().getName()); + } +} diff --git a/modules/pathit-security-properties/integration-tests/pom.xml b/modules/pathit-security-properties/integration-tests/pom.xml new file mode 100644 index 0000000..70a5753 --- /dev/null +++ b/modules/pathit-security-properties/integration-tests/pom.xml @@ -0,0 +1,97 @@ + + + 4.0.0 + + + fr.codeanddata.pathit + pathit-security-properties-parent + 1.0.0-SNAPSHOT + + pathit-security-properties-integration-tests + Pathit Security Properties - Integration Tests + + + true + + + + + io.quarkus + quarkus-rest + + + fr.codeanddata.pathit + pathit-security-properties + ${project.version} + + + io.quarkus + quarkus-junit5 + test + + + io.rest-assured + rest-assured + test + + + + + + + io.quarkus + quarkus-maven-plugin + + + + build + + + + + + maven-failsafe-plugin + + + + integration-test + verify + + + + + + ${project.build.directory}/${project.build.finalName}-runner + org.jboss.logmanager.LogManager + ${maven.home} + + + + + + + + + native-image + + + native + + + + + + maven-surefire-plugin + + ${native.surefire.skip} + + + + + + false + true + + + + diff --git a/modules/pathit-security-properties/integration-tests/src/main/java/fr/codeanddata/pathit/security/properties/it/PathitSecurityPropertiesResource.java b/modules/pathit-security-properties/integration-tests/src/main/java/fr/codeanddata/pathit/security/properties/it/PathitSecurityPropertiesResource.java new file mode 100644 index 0000000..fdf0659 --- /dev/null +++ b/modules/pathit-security-properties/integration-tests/src/main/java/fr/codeanddata/pathit/security/properties/it/PathitSecurityPropertiesResource.java @@ -0,0 +1,32 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package fr.codeanddata.pathit.security.properties.it; + +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; + +@Path("/pathit-security-properties") +@ApplicationScoped +public class PathitSecurityPropertiesResource { + // add some rest methods here + + @GET + public String hello() { + return "Hello pathit-security-properties"; + } +} diff --git a/modules/pathit-security-properties/integration-tests/src/main/resources/application.properties b/modules/pathit-security-properties/integration-tests/src/main/resources/application.properties new file mode 100644 index 0000000..e69de29 diff --git a/modules/pathit-security-properties/integration-tests/src/test/java/fr/codeanddata/pathit/security/properties/it/PathitSecurityPropertiesResourceIT.java b/modules/pathit-security-properties/integration-tests/src/test/java/fr/codeanddata/pathit/security/properties/it/PathitSecurityPropertiesResourceIT.java new file mode 100644 index 0000000..c615e3b --- /dev/null +++ b/modules/pathit-security-properties/integration-tests/src/test/java/fr/codeanddata/pathit/security/properties/it/PathitSecurityPropertiesResourceIT.java @@ -0,0 +1,7 @@ +package fr.codeanddata.pathit.security.properties.it; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +public class PathitSecurityPropertiesResourceIT extends PathitSecurityPropertiesResourceTest { +} diff --git a/modules/pathit-security-properties/integration-tests/src/test/java/fr/codeanddata/pathit/security/properties/it/PathitSecurityPropertiesResourceTest.java b/modules/pathit-security-properties/integration-tests/src/test/java/fr/codeanddata/pathit/security/properties/it/PathitSecurityPropertiesResourceTest.java new file mode 100644 index 0000000..0822c65 --- /dev/null +++ b/modules/pathit-security-properties/integration-tests/src/test/java/fr/codeanddata/pathit/security/properties/it/PathitSecurityPropertiesResourceTest.java @@ -0,0 +1,21 @@ +package fr.codeanddata.pathit.security.properties.it; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.Matchers.is; + +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusTest; + +@QuarkusTest +public class PathitSecurityPropertiesResourceTest { + + @Test + public void testHelloEndpoint() { + given() + .when().get("/pathit-security-properties") + .then() + .statusCode(200) + .body(is("Hello pathit-security-properties")); + } +} diff --git a/modules/pathit-security-properties/pom.xml b/modules/pathit-security-properties/pom.xml new file mode 100644 index 0000000..4f98b34 --- /dev/null +++ b/modules/pathit-security-properties/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + pathit-security-properties-parent + Pathit Security Properties - Parent + pom + + fr.codeanddata.pathit + pathit-pom + 1.0-SNAPSHOT + ../../pom.xml + + + + deployment + runtime + + + + + + io.quarkus + quarkus-bom + ${quarkus.version} + pom + import + + + + + + + + + io.quarkus + quarkus-maven-plugin + ${quarkus.version} + + + maven-surefire-plugin + ${surefire-plugin.version} + + + org.jboss.logmanager.LogManager + ${maven.home} + ${settings.localRepository} + + + + + maven-failsafe-plugin + ${failsafe-plugin.version} + + + org.jboss.logmanager.LogManager + ${maven.home} + ${settings.localRepository} + + + + + maven-compiler-plugin + ${compiler-plugin.version} + + true + + + + + + diff --git a/modules/pathit-security-properties/runtime/pom.xml b/modules/pathit-security-properties/runtime/pom.xml new file mode 100644 index 0000000..b95a25e --- /dev/null +++ b/modules/pathit-security-properties/runtime/pom.xml @@ -0,0 +1,64 @@ + + + 4.0.0 + + + fr.codeanddata.pathit + pathit-security-properties-parent + 1.0-SNAPSHOT + ../pom.xml + + + pathit-security-properties + Pathit Security Properties - Runtime + + + + io.quarkus + quarkus-arc + + + io.quarkus + quarkus-elytron-security-properties-file + + + + + + + io.quarkus + quarkus-extension-maven-plugin + ${quarkus.version} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + + + + + maven-compiler-plugin + + + default-compile + + + + io.quarkus + quarkus-extension-processor + ${quarkus.version} + + + + + + + + + diff --git a/modules/pathit-security-properties/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/modules/pathit-security-properties/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 0000000..4a2e504 --- /dev/null +++ b/modules/pathit-security-properties/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,9 @@ +name: Pathit Security Properties +#description: Do something useful. +metadata: +# keywords: +# - pathit-security-properties +# guide: ... # To create and publish this guide, see https://github.com/quarkiverse/quarkiverse/wiki#documenting-your-extension +# categories: +# - "miscellaneous" +# status: "preview" diff --git a/modules/pathit-security-properties/runtime/src/main/resources/application.properties b/modules/pathit-security-properties/runtime/src/main/resources/application.properties new file mode 100644 index 0000000..640b7b0 --- /dev/null +++ b/modules/pathit-security-properties/runtime/src/main/resources/application.properties @@ -0,0 +1,4 @@ +quarkus.security.users.embedded.enabled=true +quarkus.security.users.embedded.plain-text=true +quarkus.security.users.embedded.users.admin=${pathit.admin-password} +quarkus.security.users.embedded.roles.admin=pathit diff --git a/modules/pathit-storage-postgres/deployment/pom.xml b/modules/pathit-storage-postgres/deployment/pom.xml new file mode 100644 index 0000000..8590912 --- /dev/null +++ b/modules/pathit-storage-postgres/deployment/pom.xml @@ -0,0 +1,75 @@ + + + 4.0.0 + + pathit-storage-postgres-deployment + Pathit Storage Postgres - Deployment + + fr.codeanddata.pathit + pathit-storage-postgres-parent + 1.0-SNAPSHOT + ../pom.xml + + + + + io.quarkus + quarkus-arc-deployment + + + io.quarkus + quarkus-hibernate-reactive-panache-deployment + + + io.quarkus + quarkus-reactive-pg-client-deployment + + + + + io.quarkus + quarkus-flyway-deployment + + + io.quarkus + quarkus-jdbc-postgresql-deployment + + + fr.codeanddata.pathit + pathit-core-deployment + + + fr.codeanddata.pathit + pathit-storage-postgres + ${project.version} + + + io.quarkus + quarkus-junit5-internal + test + + + + + + + maven-compiler-plugin + + + default-compile + + + + io.quarkus + quarkus-extension-processor + ${quarkus.version} + + + + + + + + + diff --git a/modules/pathit-storage-postgres/deployment/src/main/java/fr/codeanddata/pathit/storage/postgres/deployment/PathitStoragePostgresProcessor.java b/modules/pathit-storage-postgres/deployment/src/main/java/fr/codeanddata/pathit/storage/postgres/deployment/PathitStoragePostgresProcessor.java new file mode 100644 index 0000000..8659b0c --- /dev/null +++ b/modules/pathit-storage-postgres/deployment/src/main/java/fr/codeanddata/pathit/storage/postgres/deployment/PathitStoragePostgresProcessor.java @@ -0,0 +1,37 @@ +package fr.codeanddata.pathit.storage.postgres.deployment; + +import fr.codeanddata.pathit.core.mappers.PathMapMapper; +import fr.codeanddata.pathit.storage.postgres.mappers.PathMapEntityMapper; +import fr.codeanddata.pathit.storage.postgres.mappers.PathMapEntityMapperImpl; +import fr.codeanddata.pathit.storage.postgres.repository.PathMapJpaRepository; +import io.quarkus.arc.deployment.AdditionalBeanBuildItem; +import io.quarkus.deployment.annotations.BuildProducer; +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; +import io.quarkus.deployment.builditem.IndexDependencyBuildItem; + +class PathitStoragePostgresProcessor { + + private static final String FEATURE = "pathit-storage-postgres"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } + + @BuildStep + IndexDependencyBuildItem index() { + return new IndexDependencyBuildItem("fr.codeanddata.pathit.storage.postgres", FEATURE); + } + + @BuildStep + void addRestEndpoints(BuildProducer additionalBeans) { + additionalBeans.produce(AdditionalBeanBuildItem.unremovableOf(PathMapJpaRepository.class)); + } + + @BuildStep + AdditionalBeanBuildItem indexMapper() { + return new AdditionalBeanBuildItem(PathMapEntityMapperImpl.class); + } + +} diff --git a/modules/pathit-storage-postgres/deployment/src/test/java/fr/codeanddata/pathit/storage/postgres/test/PathitStoragePostgresDevModeTest.java b/modules/pathit-storage-postgres/deployment/src/test/java/fr/codeanddata/pathit/storage/postgres/test/PathitStoragePostgresDevModeTest.java new file mode 100644 index 0000000..80d9965 --- /dev/null +++ b/modules/pathit-storage-postgres/deployment/src/test/java/fr/codeanddata/pathit/storage/postgres/test/PathitStoragePostgresDevModeTest.java @@ -0,0 +1,23 @@ +package fr.codeanddata.pathit.storage.postgres.test; + +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.RegisterExtension; + +import io.quarkus.test.QuarkusDevModeTest; + +public class PathitStoragePostgresDevModeTest { + + // Start hot reload (DevMode) test with your extension loaded + @RegisterExtension + static final QuarkusDevModeTest devModeTest = new QuarkusDevModeTest() + .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)); + + @Test + public void writeYourOwnDevModeTest() { + // Write your dev mode tests here - see the testing extension guide https://quarkus.io/guides/writing-extensions#testing-hot-reload for more information + Assertions.assertTrue(true, "Add dev mode assertions to " + getClass().getName()); + } +} diff --git a/modules/pathit-storage-postgres/deployment/src/test/java/fr/codeanddata/pathit/storage/postgres/test/PathitStoragePostgresTest.java b/modules/pathit-storage-postgres/deployment/src/test/java/fr/codeanddata/pathit/storage/postgres/test/PathitStoragePostgresTest.java new file mode 100644 index 0000000..eaf13a9 --- /dev/null +++ b/modules/pathit-storage-postgres/deployment/src/test/java/fr/codeanddata/pathit/storage/postgres/test/PathitStoragePostgresTest.java @@ -0,0 +1,23 @@ +package fr.codeanddata.pathit.storage.postgres.test; + +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.RegisterExtension; + +import io.quarkus.test.QuarkusUnitTest; + +public class PathitStoragePostgresTest { + + // Start unit test with your extension loaded + @RegisterExtension + static final QuarkusUnitTest unitTest = new QuarkusUnitTest() + .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)); + + @Test + public void writeYourOwnUnitTest() { + // Write your unit tests here - see the testing extension guide https://quarkus.io/guides/writing-extensions#testing-extensions for more information + Assertions.assertTrue(true, "Add some assertions to " + getClass().getName()); + } +} diff --git a/modules/pathit-storage-postgres/integration-tests/pom.xml b/modules/pathit-storage-postgres/integration-tests/pom.xml new file mode 100644 index 0000000..2b7a5e9 --- /dev/null +++ b/modules/pathit-storage-postgres/integration-tests/pom.xml @@ -0,0 +1,97 @@ + + + 4.0.0 + + + fr.codeanddata.pathit + pathit-storage-postgres-parent + 1.0.0-SNAPSHOT + + pathit-storage-postgres-integration-tests + Pathit Storage Postgres - Integration Tests + + + true + + + + + io.quarkus + quarkus-rest + + + fr.codeanddata.pathit + pathit-storage-postgres + ${project.version} + + + io.quarkus + quarkus-junit5 + test + + + io.rest-assured + rest-assured + test + + + + + + + io.quarkus + quarkus-maven-plugin + + + + build + + + + + + maven-failsafe-plugin + + + + integration-test + verify + + + + + + ${project.build.directory}/${project.build.finalName}-runner + org.jboss.logmanager.LogManager + ${maven.home} + + + + + + + + + native-image + + + native + + + + + + maven-surefire-plugin + + ${native.surefire.skip} + + + + + + false + true + + + + diff --git a/modules/pathit-storage-postgres/integration-tests/src/main/java/fr/codeanddata/pathit/storage/postgres/it/PathitStoragePostgresResource.java b/modules/pathit-storage-postgres/integration-tests/src/main/java/fr/codeanddata/pathit/storage/postgres/it/PathitStoragePostgresResource.java new file mode 100644 index 0000000..311e085 --- /dev/null +++ b/modules/pathit-storage-postgres/integration-tests/src/main/java/fr/codeanddata/pathit/storage/postgres/it/PathitStoragePostgresResource.java @@ -0,0 +1,32 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package fr.codeanddata.pathit.storage.postgres.it; + +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; + +@Path("/pathit-storage-postgres") +@ApplicationScoped +public class PathitStoragePostgresResource { + // add some rest methods here + + @GET + public String hello() { + return "Hello pathit-storage-postgres"; + } +} diff --git a/modules/pathit-storage-postgres/integration-tests/src/main/resources/application.properties b/modules/pathit-storage-postgres/integration-tests/src/main/resources/application.properties new file mode 100644 index 0000000..e69de29 diff --git a/modules/pathit-storage-postgres/integration-tests/src/test/java/fr/codeanddata/pathit/storage/postgres/it/PathitStoragePostgresResourceIT.java b/modules/pathit-storage-postgres/integration-tests/src/test/java/fr/codeanddata/pathit/storage/postgres/it/PathitStoragePostgresResourceIT.java new file mode 100644 index 0000000..e4de551 --- /dev/null +++ b/modules/pathit-storage-postgres/integration-tests/src/test/java/fr/codeanddata/pathit/storage/postgres/it/PathitStoragePostgresResourceIT.java @@ -0,0 +1,7 @@ +package fr.codeanddata.pathit.storage.postgres.it; + +import io.quarkus.test.junit.QuarkusIntegrationTest; + +@QuarkusIntegrationTest +public class PathitStoragePostgresResourceIT extends PathitStoragePostgresResourceTest { +} diff --git a/modules/pathit-storage-postgres/integration-tests/src/test/java/fr/codeanddata/pathit/storage/postgres/it/PathitStoragePostgresResourceTest.java b/modules/pathit-storage-postgres/integration-tests/src/test/java/fr/codeanddata/pathit/storage/postgres/it/PathitStoragePostgresResourceTest.java new file mode 100644 index 0000000..e4a8a51 --- /dev/null +++ b/modules/pathit-storage-postgres/integration-tests/src/test/java/fr/codeanddata/pathit/storage/postgres/it/PathitStoragePostgresResourceTest.java @@ -0,0 +1,21 @@ +package fr.codeanddata.pathit.storage.postgres.it; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.Matchers.is; + +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusTest; + +@QuarkusTest +public class PathitStoragePostgresResourceTest { + + @Test + public void testHelloEndpoint() { + given() + .when().get("/pathit-storage-postgres") + .then() + .statusCode(200) + .body(is("Hello pathit-storage-postgres")); + } +} diff --git a/modules/pathit-storage-postgres/pom.xml b/modules/pathit-storage-postgres/pom.xml new file mode 100644 index 0000000..9ef126b --- /dev/null +++ b/modules/pathit-storage-postgres/pom.xml @@ -0,0 +1,72 @@ + + + 4.0.0 + pathit-storage-postgres-parent + pom + Pathit Storage Postgres - Parent + + fr.codeanddata.pathit + pathit-pom + 1.0-SNAPSHOT + ../../pom.xml + + + + deployment + runtime + + + + + + io.quarkus + quarkus-bom + ${quarkus.version} + pom + import + + + + + + + + + io.quarkus + quarkus-maven-plugin + ${quarkus.version} + + + maven-surefire-plugin + ${surefire-plugin.version} + + + org.jboss.logmanager.LogManager + ${maven.home} + ${settings.localRepository} + + + + + maven-failsafe-plugin + ${failsafe-plugin.version} + + + org.jboss.logmanager.LogManager + ${maven.home} + ${settings.localRepository} + + + + + maven-compiler-plugin + ${compiler-plugin.version} + + true + + + + + + diff --git a/modules/pathit-storage-postgres/runtime/pom.xml b/modules/pathit-storage-postgres/runtime/pom.xml new file mode 100644 index 0000000..1bc9d7b --- /dev/null +++ b/modules/pathit-storage-postgres/runtime/pom.xml @@ -0,0 +1,107 @@ + + + 4.0.0 + + pathit-storage-postgres + Pathit Storage Postgres - Runtime + + fr.codeanddata.pathit + pathit-storage-postgres-parent + 1.0-SNAPSHOT + ../pom.xml + + + + + io.quarkus + quarkus-arc + + + io.quarkus + quarkus-hibernate-reactive-panache + + + io.quarkus + quarkus-reactive-pg-client + + + + + io.quarkus + quarkus-flyway + + + io.quarkus + quarkus-jdbc-postgresql + + + org.flywaydb + flyway-database-postgresql + + + + fr.codeanddata.pathit + pathit-core + + + org.projectlombok + lombok + ${lombok.version} + provided + + + org.mapstruct + mapstruct + ${mapstruct.version} + + + + + + + io.quarkus + quarkus-extension-maven-plugin + ${quarkus.version} + + + compile + + extension-descriptor + + + ${project.groupId}:${project.artifactId}-deployment:${project.version} + + + + + + maven-compiler-plugin + + + default-compile + + + + org.projectlombok + lombok + ${lombok.version} + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + + + io.quarkus + quarkus-extension-processor + ${quarkus.version} + + + + + + + + + diff --git a/modules/pathit-storage-postgres/runtime/src/main/java/fr/codeanddata/pathit/storage/postgres/entity/PathMapEntity.java b/modules/pathit-storage-postgres/runtime/src/main/java/fr/codeanddata/pathit/storage/postgres/entity/PathMapEntity.java new file mode 100644 index 0000000..994d7bd --- /dev/null +++ b/modules/pathit-storage-postgres/runtime/src/main/java/fr/codeanddata/pathit/storage/postgres/entity/PathMapEntity.java @@ -0,0 +1,28 @@ +package fr.codeanddata.pathit.storage.postgres.entity; + +import io.quarkus.hibernate.reactive.panache.PanacheEntity; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.Table; +import lombok.*; + +import java.time.LocalDateTime; + +@Entity(name = "PathMap") +@Table(name = "path_map") +@Getter +@Setter +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class PathMapEntity extends PanacheEntity { + + @Column(name="hash", unique = true) + String hash; + + @Column(name = "destination") + String destination; + + @Column(name = "creation_date") + LocalDateTime creationDate; +} diff --git a/modules/pathit-storage-postgres/runtime/src/main/java/fr/codeanddata/pathit/storage/postgres/mappers/PathMapEntityMapper.java b/modules/pathit-storage-postgres/runtime/src/main/java/fr/codeanddata/pathit/storage/postgres/mappers/PathMapEntityMapper.java new file mode 100644 index 0000000..19b629e --- /dev/null +++ b/modules/pathit-storage-postgres/runtime/src/main/java/fr/codeanddata/pathit/storage/postgres/mappers/PathMapEntityMapper.java @@ -0,0 +1,12 @@ +package fr.codeanddata.pathit.storage.postgres.mappers; + +import fr.codeanddata.pathit.core.models.PathMap; +import fr.codeanddata.pathit.storage.postgres.entity.PathMapEntity; +import org.mapstruct.Mapper; +import org.mapstruct.MappingConstants; + +@Mapper(componentModel = MappingConstants.ComponentModel.CDI) +public interface PathMapEntityMapper { + PathMap toModel(PathMapEntity pathMapEntity); + PathMapEntity toEntity(PathMap model); +} diff --git a/modules/pathit-storage-postgres/runtime/src/main/java/fr/codeanddata/pathit/storage/postgres/repository/PathMapJpaRepository.java b/modules/pathit-storage-postgres/runtime/src/main/java/fr/codeanddata/pathit/storage/postgres/repository/PathMapJpaRepository.java new file mode 100644 index 0000000..dacae35 --- /dev/null +++ b/modules/pathit-storage-postgres/runtime/src/main/java/fr/codeanddata/pathit/storage/postgres/repository/PathMapJpaRepository.java @@ -0,0 +1,34 @@ +package fr.codeanddata.pathit.storage.postgres.repository; + +import fr.codeanddata.pathit.core.PathMapRepository; +import fr.codeanddata.pathit.core.models.PathMap; +import fr.codeanddata.pathit.storage.postgres.entity.PathMapEntity; +import fr.codeanddata.pathit.storage.postgres.mappers.PathMapEntityMapper; +import io.quarkus.hibernate.reactive.panache.PanacheRepository; +import io.quarkus.hibernate.reactive.panache.common.WithSession; +import io.quarkus.hibernate.reactive.panache.common.WithTransaction; +import io.smallrye.mutiny.Uni; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; + +@ApplicationScoped +public class PathMapJpaRepository implements PathMapRepository, PanacheRepository { + + @Inject + PathMapEntityMapper mapper; + + @WithTransaction + public Uni create(PathMap pathMap) { + final PathMapEntity entity = mapper.toEntity(pathMap); + return entity.persist() + .map(o -> (PathMapEntity) o) + .map(mapper::toModel); + } + + @WithSession + public Uni getByHash(String hash) { + return find("hash = ?1", hash) + .singleResult() + .map(e -> mapper.toModel(e)); + } +} diff --git a/modules/pathit-storage-postgres/runtime/src/main/resources/META-INF/beans.xml b/modules/pathit-storage-postgres/runtime/src/main/resources/META-INF/beans.xml new file mode 100644 index 0000000..e69de29 diff --git a/modules/pathit-storage-postgres/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/modules/pathit-storage-postgres/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 0000000..c871a1d --- /dev/null +++ b/modules/pathit-storage-postgres/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,9 @@ +name: Pathit Storage Postgres +#description: Do something useful. +metadata: +# keywords: +# - pathit-storage-postgres +# guide: ... # To create and publish this guide, see https://github.com/quarkiverse/quarkiverse/wiki#documenting-your-extension +# categories: +# - "miscellaneous" +# status: "preview" diff --git a/modules/pathit-storage-postgres/runtime/src/main/resources/application.properties b/modules/pathit-storage-postgres/runtime/src/main/resources/application.properties new file mode 100644 index 0000000..6eebebc --- /dev/null +++ b/modules/pathit-storage-postgres/runtime/src/main/resources/application.properties @@ -0,0 +1,11 @@ +quarkus.datasource.db-kind=postgresql + +quarkus.flyway.enabled=true +quarkus.flyway.active=false +quarkus.flyway.migrate-at-start=true +quarkus.flyway.baseline-on-migrate=true +quarkus.flyway.baseline-version=0.9 +quarkus.flyway.baseline-description=Initial version + +quarkus.native.resources.includes=src/main/resources/db/migration/** + diff --git a/modules/pathit-storage-postgres/runtime/src/main/resources/db/migration/V1.0.0__Base.sql b/modules/pathit-storage-postgres/runtime/src/main/resources/db/migration/V1.0.0__Base.sql new file mode 100644 index 0000000..8bc94d7 --- /dev/null +++ b/modules/pathit-storage-postgres/runtime/src/main/resources/db/migration/V1.0.0__Base.sql @@ -0,0 +1,11 @@ +create sequence path_map_SEQ start with 1 increment by 50; + +create table path_map +( + id bigint not null, + creation_date timestamp(6), + destination varchar(255), + hash varchar(255) unique, + primary key (id) +); + diff --git a/mvnw b/mvnw new file mode 100755 index 0000000..5e9618c --- /dev/null +++ b/mvnw @@ -0,0 +1,332 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.3.2 +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ]; then + + if [ -f /usr/local/etc/mavenrc ]; then + . /usr/local/etc/mavenrc + fi + + if [ -f /etc/mavenrc ]; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ]; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false +darwin=false +mingw=false +case "$(uname)" in +CYGWIN*) cygwin=true ;; +MINGW*) mingw=true ;; +Darwin*) + darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + JAVA_HOME="$(/usr/libexec/java_home)" + export JAVA_HOME + else + JAVA_HOME="/Library/Java/Home" + export JAVA_HOME + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ]; then + if [ -r /etc/gentoo-release ]; then + JAVA_HOME=$(java-config --jre-home) + fi +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin; then + [ -n "$JAVA_HOME" ] \ + && JAVA_HOME=$(cygpath --unix "$JAVA_HOME") + [ -n "$CLASSPATH" ] \ + && CLASSPATH=$(cygpath --path --unix "$CLASSPATH") +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw; then + [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] \ + && JAVA_HOME="$( + cd "$JAVA_HOME" || ( + echo "cannot cd into $JAVA_HOME." >&2 + exit 1 + ) + pwd + )" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="$(which javac)" + if [ -n "$javaExecutable" ] && ! [ "$(expr "$javaExecutable" : '\([^ ]*\)')" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=$(which readlink) + if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then + if $darwin; then + javaHome="$(dirname "$javaExecutable")" + javaExecutable="$(cd "$javaHome" && pwd -P)/javac" + else + javaExecutable="$(readlink -f "$javaExecutable")" + fi + javaHome="$(dirname "$javaExecutable")" + javaHome=$(expr "$javaHome" : '\(.*\)/bin') + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ]; then + if [ -n "$JAVA_HOME" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="$( + \unset -f command 2>/dev/null + \command -v java + )" + fi +fi + +if [ ! -x "$JAVACMD" ]; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ]; then + echo "Warning: JAVA_HOME environment variable is not set." >&2 +fi + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + if [ -z "$1" ]; then + echo "Path not specified to find_maven_basedir" >&2 + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ]; do + if [ -d "$wdir"/.mvn ]; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=$( + cd "$wdir/.." || exit 1 + pwd + ) + fi + # end of workaround + done + printf '%s' "$( + cd "$basedir" || exit 1 + pwd + )" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + # Remove \r in case we run on Windows within Git Bash + # and check out the repository with auto CRLF management + # enabled. Otherwise, we may read lines that are delimited with + # \r\n and produce $'-Xarg\r' rather than -Xarg due to word + # splitting rules. + tr -s '\r\n' ' ' <"$1" + fi +} + +log() { + if [ "$MVNW_VERBOSE" = true ]; then + printf '%s\n' "$1" + fi +} + +BASE_DIR=$(find_maven_basedir "$(dirname "$0")") +if [ -z "$BASE_DIR" ]; then + exit 1 +fi + +MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +export MAVEN_PROJECTBASEDIR +log "$MAVEN_PROJECTBASEDIR" + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" +if [ -r "$wrapperJarPath" ]; then + log "Found $wrapperJarPath" +else + log "Couldn't find $wrapperJarPath, downloading it ..." + + if [ -n "$MVNW_REPOURL" ]; then + wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar" + else + wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar" + fi + while IFS="=" read -r key value; do + # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' ) + safeValue=$(echo "$value" | tr -d '\r') + case "$key" in wrapperUrl) + wrapperUrl="$safeValue" + break + ;; + esac + done <"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" + log "Downloading from: $wrapperUrl" + + if $cygwin; then + wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") + fi + + if command -v wget >/dev/null; then + log "Found wget ... using wget" + [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet" + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + else + wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + fi + elif command -v curl >/dev/null; then + log "Found curl ... using curl" + [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent" + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" + else + curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" + fi + else + log "Falling back to using Java to download" + javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java" + javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaSource=$(cygpath --path --windows "$javaSource") + javaClass=$(cygpath --path --windows "$javaClass") + fi + if [ -e "$javaSource" ]; then + if [ ! -e "$javaClass" ]; then + log " - Compiling MavenWrapperDownloader.java ..." + ("$JAVA_HOME/bin/javac" "$javaSource") + fi + if [ -e "$javaClass" ]; then + log " - Running MavenWrapperDownloader.java ..." + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath" + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +# If specified, validate the SHA-256 sum of the Maven wrapper jar file +wrapperSha256Sum="" +while IFS="=" read -r key value; do + case "$key" in wrapperSha256Sum) + wrapperSha256Sum=$value + break + ;; + esac +done <"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" +if [ -n "$wrapperSha256Sum" ]; then + wrapperSha256Result=false + if command -v sha256sum >/dev/null; then + if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c >/dev/null 2>&1; then + wrapperSha256Result=true + fi + elif command -v shasum >/dev/null; then + if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c >/dev/null 2>&1; then + wrapperSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 + echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + fi + if [ $wrapperSha256Result = false ]; then + echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2 + echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2 + echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2 + exit 1 + fi +fi + +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$JAVA_HOME" ] \ + && JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") + [ -n "$CLASSPATH" ] \ + && CLASSPATH=$(cygpath --path --windows "$CLASSPATH") + [ -n "$MAVEN_PROJECTBASEDIR" ] \ + && MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +# shellcheck disable=SC2086 # safe args +exec "$JAVACMD" \ + $MAVEN_OPTS \ + $MAVEN_DEBUG_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 0000000..4136715 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,206 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.3.2 +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. >&2 +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. >&2 +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. >&2 +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. >&2 +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar" + +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %WRAPPER_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file +SET WRAPPER_SHA_256_SUM="" +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B +) +IF NOT %WRAPPER_SHA_256_SUM%=="" ( + powershell -Command "&{"^ + "Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash;"^ + "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ + "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ + " Write-Error 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ + " Write-Error 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ + " Write-Error 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ + " exit 1;"^ + "}"^ + "}" + if ERRORLEVEL 1 goto error +) + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% ^ + %JVM_CONFIG_MAVEN_PROPS% ^ + %MAVEN_OPTS% ^ + %MAVEN_DEBUG_OPTS% ^ + -classpath %WRAPPER_JAR% ^ + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%"=="on" pause + +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% + +cmd /C exit /B %ERROR_CODE% diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..db47c55 --- /dev/null +++ b/pom.xml @@ -0,0 +1,108 @@ + + + 4.0.0 + fr.codeanddata.pathit + pathit-pom + 1.0-SNAPSHOT + + pom + + + ./modules/pathit-core + ./modules/pathit-storage-postgres + ./modules/pathit-security-properties + + + + 3.14.0 + 21 + UTF-8 + UTF-8 + quarkus-bom + io.quarkus.platform + ${quarkus.version} + true + 3.5.3 + + 1.18.34 + 1.6.2 + 1.0-SNAPSHOT + 3.25.4 + + + + + + ${quarkus.platform.group-id} + ${quarkus.platform.artifact-id} + ${quarkus.platform.version} + pom + import + + + + fr.codeanddata.pathit + pathit-core + ${pathit.version} + + + fr.codeanddata.pathit + pathit-core-deployment + ${pathit.version} + + + fr.codeanddata.pathit + pathit-storage-postgres + ${pathit.version} + + + fr.codeanddata.pathit + pathit-storage-postgres-deployment + ${pathit.version} + + + fr.codeanddata.pathit + pathit-security-properties + ${pathit.version} + + + fr.codeanddata.pathit + pathit-security-properties-deployment + ${pathit.version} + + + + + + + native + + + native + + + + false + true + + + + + + + gitea + https://gitea.tech.codeanddata.fr/api/packages/${env.MAVEN_REPO_OWNER}/maven + + + + + gitea + https://gitea.tech.codeanddata.fr/api/packages/${env.MAVEN_REPO_OWNER}/maven + + + gitea + https://gitea.tech.codeanddata.fr/api/packages/${env.MAVEN_REPO_OWNER}/maven + + +