From 44a14998e6fac992d40689138693fa97ab751c21 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 13 Sep 2021 15:13:23 +0000 Subject: [PATCH 01/11] Bump junit.jupiter.version from 5.7.2 to 5.8.0 Bumps `junit.jupiter.version` from 5.7.2 to 5.8.0. Updates `junit-jupiter-api` from 5.7.2 to 5.8.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.7.2...r5.8.0) Updates `junit-jupiter-engine` from 5.7.2 to 5.8.0 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.7.2...r5.8.0) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e4819c1..236c234 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ SPDX-License-Identifier: Apache-2.0 1.7.32 2.12.5 2.3.3 - 5.7.2 + 5.8.0 3.12.4 0.9.1 From 57776fa2d0fa71fb61bed546dbd147c1e934656f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Sep 2021 15:15:34 +0000 Subject: [PATCH 02/11] Bump junit.jupiter.version from 5.8.0 to 5.8.1 Bumps `junit.jupiter.version` from 5.8.0 to 5.8.1. Updates `junit-jupiter-api` from 5.8.0 to 5.8.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.8.0...r5.8.1) Updates `junit-jupiter-engine` from 5.8.0 to 5.8.1 - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.8.0...r5.8.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-api dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 236c234..cec01a7 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ SPDX-License-Identifier: Apache-2.0 1.7.32 2.12.5 2.3.3 - 5.8.0 + 5.8.1 3.12.4 0.9.1 From f0522272a78652c082d3e820b9bd7a1d99bbc5fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Sep 2021 15:16:42 +0000 Subject: [PATCH 03/11] Bump resteasy-core from 4.7.1.Final to 4.7.2.Final Bumps [resteasy-core](https://github.com/resteasy/Resteasy) from 4.7.1.Final to 4.7.2.Final. - [Release notes](https://github.com/resteasy/Resteasy/releases) - [Commits](https://github.com/resteasy/Resteasy/compare/4.7.1.Final...4.7.2.Final) --- updated-dependencies: - dependency-name: org.jboss.resteasy:resteasy-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 236c234..4014521 100644 --- a/pom.xml +++ b/pom.xml @@ -119,7 +119,7 @@ SPDX-License-Identifier: Apache-2.0 org.jboss.resteasy resteasy-core - 4.7.1.Final + 4.7.2.Final test From db6c815668153a71d96df5cde7a2e5a1e1f59a44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Sep 2021 15:17:29 +0000 Subject: [PATCH 04/11] Bump actions/setup-java from 2.3.0 to 2.3.1 Bumps [actions/setup-java](https://github.com/actions/setup-java) from 2.3.0 to 2.3.1. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v2.3.0...v2.3.1) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/build-project.yml | 2 +- .github/workflows/release-project.yml | 2 +- .github/workflows/sonarcloud-analysis.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-project.yml b/.github/workflows/build-project.yml index 34b8858..8e00dc7 100644 --- a/.github/workflows/build-project.yml +++ b/.github/workflows/build-project.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up JDK 1.11 - uses: actions/setup-java@v2.3.0 + uses: actions/setup-java@v2.3.1 with: distribution: 'zulu' java-version: '11' diff --git a/.github/workflows/release-project.yml b/.github/workflows/release-project.yml index bac04a9..324b205 100644 --- a/.github/workflows/release-project.yml +++ b/.github/workflows/release-project.yml @@ -22,7 +22,7 @@ jobs: # Extra the tagname form the git reference, value of GITHUB_REF will be something like refs/tags/. run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})" - name: Set up JDK 1.11 - uses: actions/setup-java@v2.3.0 + uses: actions/setup-java@v2.3.1 with: distribution: 'zulu' java-version: '11' diff --git a/.github/workflows/sonarcloud-analysis.yml b/.github/workflows/sonarcloud-analysis.yml index 3e8cb31..fe85960 100644 --- a/.github/workflows/sonarcloud-analysis.yml +++ b/.github/workflows/sonarcloud-analysis.yml @@ -15,7 +15,7 @@ jobs: with: fetch-depth: 0 - name: Set up JDK 1.11 - uses: actions/setup-java@v2.3.0 + uses: actions/setup-java@v2.3.1 with: distribution: 'zulu' java-version: '11' From 9b1192562ad520c4224efb644c57dd63a1f51cd2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Oct 2021 15:15:27 +0000 Subject: [PATCH 05/11] Bump jackson.version from 2.12.5 to 2.13.0 Bumps `jackson.version` from 2.12.5 to 2.13.0. Updates `jackson-databind` from 2.12.5 to 2.13.0 - [Release notes](https://github.com/FasterXML/jackson/releases) - [Commits](https://github.com/FasterXML/jackson/commits) Updates `jackson-dataformat-yaml` from 2.12.5 to 2.13.0 - [Release notes](https://github.com/FasterXML/jackson-dataformats-text/releases) - [Commits](https://github.com/FasterXML/jackson-dataformats-text/compare/jackson-dataformats-text-2.12.5...jackson-dataformats-text-2.13.0) --- updated-dependencies: - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 116a60e..59e21d3 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ SPDX-License-Identifier: Apache-2.0 0.0.4 1.7.32 - 2.12.5 + 2.13.0 2.3.3 5.8.1 3.12.4 From 2c6eb3e966487980677e9556a783a92889a4b413 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Oct 2021 15:17:35 +0000 Subject: [PATCH 06/11] Bump whelk-io/maven-settings-xml-action from 18 to 20 Bumps [whelk-io/maven-settings-xml-action](https://github.com/whelk-io/maven-settings-xml-action) from 18 to 20. - [Release notes](https://github.com/whelk-io/maven-settings-xml-action/releases) - [Commits](https://github.com/whelk-io/maven-settings-xml-action/compare/v18...v20) --- updated-dependencies: - dependency-name: whelk-io/maven-settings-xml-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build-project.yml | 2 +- .github/workflows/release-project.yml | 2 +- .github/workflows/sonarcloud-analysis.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-project.yml b/.github/workflows/build-project.yml index 8e00dc7..1bdae63 100644 --- a/.github/workflows/build-project.yml +++ b/.github/workflows/build-project.yml @@ -20,7 +20,7 @@ jobs: distribution: 'zulu' java-version: '11' - name: Create custom Maven Settings.xml - uses: whelk-io/maven-settings-xml-action@v18 + uses: whelk-io/maven-settings-xml-action@v20 with: output_file: custom_maven_settings.xml servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]' diff --git a/.github/workflows/release-project.yml b/.github/workflows/release-project.yml index 324b205..bab7b66 100644 --- a/.github/workflows/release-project.yml +++ b/.github/workflows/release-project.yml @@ -27,7 +27,7 @@ jobs: distribution: 'zulu' java-version: '11' - name: Create custom Maven Settings.xml - uses: whelk-io/maven-settings-xml-action@v18 + uses: whelk-io/maven-settings-xml-action@v20 with: output_file: custom_maven_settings.xml servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]' diff --git a/.github/workflows/sonarcloud-analysis.yml b/.github/workflows/sonarcloud-analysis.yml index fe85960..f56affe 100644 --- a/.github/workflows/sonarcloud-analysis.yml +++ b/.github/workflows/sonarcloud-analysis.yml @@ -32,7 +32,7 @@ jobs: key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} restore-keys: ${{ runner.os }}-m2 - name: Create custom Maven Settings.xml - uses: whelk-io/maven-settings-xml-action@v18 + uses: whelk-io/maven-settings-xml-action@v20 with: output_file: custom_maven_settings.xml servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]' From 87335553d1494d6028ff97f576841d7c626b5d6f Mon Sep 17 00:00:00 2001 From: Dennis Labordus Date: Mon, 4 Oct 2021 16:03:55 +0200 Subject: [PATCH 07/11] Replace jandex with a beans.xml to start scanning for beans. Signed-off-by: Dennis Labordus --- pom.xml | 14 -------------- rest-commons/pom.xml | 9 --------- rest-commons/src/main/resources/META-INF/beans.xml | 11 +++++++++++ 3 files changed, 11 insertions(+), 23 deletions(-) create mode 100644 rest-commons/src/main/resources/META-INF/beans.xml diff --git a/pom.xml b/pom.xml index 59e21d3..7a72235 100644 --- a/pom.xml +++ b/pom.xml @@ -214,20 +214,6 @@ SPDX-License-Identifier: Apache-2.0 maven-jar-plugin 3.2.0 - - - org.jboss.jandex - jandex-maven-plugin - 1.1.1 - - - make-index - - jandex - - - - diff --git a/rest-commons/pom.xml b/rest-commons/pom.xml index 0807a64..d0f2d48 100644 --- a/rest-commons/pom.xml +++ b/rest-commons/pom.xml @@ -74,13 +74,4 @@ SPDX-License-Identifier: Apache-2.0 test - - - - - org.jboss.jandex - jandex-maven-plugin - - - diff --git a/rest-commons/src/main/resources/META-INF/beans.xml b/rest-commons/src/main/resources/META-INF/beans.xml new file mode 100644 index 0000000..ee36e38 --- /dev/null +++ b/rest-commons/src/main/resources/META-INF/beans.xml @@ -0,0 +1,11 @@ + + + + \ No newline at end of file From 56323945152abec03cc16722e835b25e7ad5e727 Mon Sep 17 00:00:00 2001 From: Dennis Labordus Date: Mon, 4 Oct 2021 16:05:36 +0200 Subject: [PATCH 08/11] Replace jandex with a beans.xml to start scanning for beans. Signed-off-by: Dennis Labordus --- rest-commons/src/main/resources/META-INF/beans.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest-commons/src/main/resources/META-INF/beans.xml b/rest-commons/src/main/resources/META-INF/beans.xml index ee36e38..c634391 100644 --- a/rest-commons/src/main/resources/META-INF/beans.xml +++ b/rest-commons/src/main/resources/META-INF/beans.xml @@ -8,4 +8,4 @@ SPDX-License-Identifier: Apache-2.0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd" bean-discovery-mode="annotated" version="2.0"> - \ No newline at end of file + From ce00f131d474e2b80dac947df0d1270c3c75ed7e Mon Sep 17 00:00:00 2001 From: Dennis Labordus Date: Mon, 4 Oct 2021 16:06:29 +0200 Subject: [PATCH 09/11] Replace jandex with a beans.xml to start scanning for beans. Signed-off-by: Dennis Labordus --- rest-commons/src/main/resources/META-INF/beans.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest-commons/src/main/resources/META-INF/beans.xml b/rest-commons/src/main/resources/META-INF/beans.xml index c634391..93bd9da 100644 --- a/rest-commons/src/main/resources/META-INF/beans.xml +++ b/rest-commons/src/main/resources/META-INF/beans.xml @@ -1,6 +1,6 @@ From d0d893c3c89ffb6b6ad7ed43530547fcb4c7b920 Mon Sep 17 00:00:00 2001 From: Dennis Labordus Date: Tue, 5 Oct 2021 07:39:18 +0200 Subject: [PATCH 10/11] Rename module to jaxrs-common. Signed-off-by: Dennis Labordus --- {rest-commons => jaxrs-commons}/pom.xml | 2 +- .../lfenergy/compas/core/jaxrs/JaxrsConstants.java | 12 ++++++++++++ .../jaxrs}/exception/CompasExceptionHandler.java | 4 ++-- .../ConstraintViolationExceptionHandler.java | 4 ++-- .../jaxrs}/exception/GenericExceptionHandler.java | 4 ++-- .../compas/core/jaxrs}/model/ErrorMessage.java | 10 +++++----- .../compas/core/jaxrs}/model/ErrorResponse.java | 8 ++++---- .../compas/core/jaxrs/model/package-info.java | 10 ++++++++++ .../src/main/resources/META-INF/beans.xml | 0 .../compas/core/jaxrs/JaxrsConstantsTest.java | 6 +++--- .../jaxrs}/exception/CompasExceptionHandlerTest.java | 4 ++-- .../ConstraintViolationExceptionHandlerTest.java | 4 ++-- .../exception/GenericExceptionHandlerTest.java | 6 +++--- .../compas/core/jaxrs}/model/AbstractPojoTester.java | 2 +- .../compas/core/jaxrs}/model/ErrorMessageTest.java | 2 +- .../compas/core/jaxrs}/model/ErrorResponseTest.java | 2 +- pom.xml | 2 +- .../org/lfenergy/compas/core/rest/RestConstants.java | 12 ------------ .../compas/core/rest/model/package-info.java | 10 ---------- 19 files changed, 52 insertions(+), 52 deletions(-) rename {rest-commons => jaxrs-commons}/pom.xml (98%) create mode 100644 jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/JaxrsConstants.java rename {rest-commons/src/main/java/org/lfenergy/compas/core/rest => jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs}/exception/CompasExceptionHandler.java (88%) rename {rest-commons/src/main/java/org/lfenergy/compas/core/rest => jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs}/exception/ConstraintViolationExceptionHandler.java (91%) rename {rest-commons/src/main/java/org/lfenergy/compas/core/rest => jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs}/exception/GenericExceptionHandler.java (89%) rename {rest-commons/src/main/java/org/lfenergy/compas/core/rest => jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs}/model/ErrorMessage.java (75%) rename {rest-commons/src/main/java/org/lfenergy/compas/core/rest => jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs}/model/ErrorResponse.java (76%) create mode 100644 jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/package-info.java rename {rest-commons => jaxrs-commons}/src/main/resources/META-INF/beans.xml (100%) rename rest-commons/src/test/java/org/lfenergy/compas/core/rest/RestConstantsTest.java => jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/JaxrsConstantsTest.java (66%) rename {rest-commons/src/test/java/org/lfenergy/compas/core/rest => jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs}/exception/CompasExceptionHandlerTest.java (91%) rename {rest-commons/src/test/java/org/lfenergy/compas/core/rest => jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs}/exception/ConstraintViolationExceptionHandlerTest.java (96%) rename {rest-commons/src/test/java/org/lfenergy/compas/core/rest => jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs}/exception/GenericExceptionHandlerTest.java (84%) rename {rest-commons/src/test/java/org/lfenergy/compas/core/rest => jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs}/model/AbstractPojoTester.java (96%) rename {rest-commons/src/test/java/org/lfenergy/compas/core/rest => jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs}/model/ErrorMessageTest.java (96%) rename {rest-commons/src/test/java/org/lfenergy/compas/core/rest => jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs}/model/ErrorResponseTest.java (97%) delete mode 100644 rest-commons/src/main/java/org/lfenergy/compas/core/rest/RestConstants.java delete mode 100644 rest-commons/src/main/java/org/lfenergy/compas/core/rest/model/package-info.java diff --git a/rest-commons/pom.xml b/jaxrs-commons/pom.xml similarity index 98% rename from rest-commons/pom.xml rename to jaxrs-commons/pom.xml index d0f2d48..c4bc9c5 100644 --- a/rest-commons/pom.xml +++ b/jaxrs-commons/pom.xml @@ -14,7 +14,7 @@ SPDX-License-Identifier: Apache-2.0 local-SNAPSHOT - rest-commons + jaxrs-commons jar diff --git a/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/JaxrsConstants.java b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/JaxrsConstants.java new file mode 100644 index 0000000..5a39b16 --- /dev/null +++ b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/JaxrsConstants.java @@ -0,0 +1,12 @@ +// SPDX-FileCopyrightText: 2021 Alliander N.V. +// +// SPDX-License-Identifier: Apache-2.0 +package org.lfenergy.compas.core.jaxrs; + +public class JaxrsConstants { + JaxrsConstants() { + throw new UnsupportedOperationException("JaxrsConstants class"); + } + + public static final String COMPAS_COMMONS_V1_NS_URI = "https://www.lfenergy.org/compas/commons/v1"; +} diff --git a/rest-commons/src/main/java/org/lfenergy/compas/core/rest/exception/CompasExceptionHandler.java b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/exception/CompasExceptionHandler.java similarity index 88% rename from rest-commons/src/main/java/org/lfenergy/compas/core/rest/exception/CompasExceptionHandler.java rename to jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/exception/CompasExceptionHandler.java index bbe87ba..08581fb 100644 --- a/rest-commons/src/main/java/org/lfenergy/compas/core/rest/exception/CompasExceptionHandler.java +++ b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/exception/CompasExceptionHandler.java @@ -1,10 +1,10 @@ // SPDX-FileCopyrightText: 2021 Alliander N.V. // // SPDX-License-Identifier: Apache-2.0 -package org.lfenergy.compas.core.rest.exception; +package org.lfenergy.compas.core.jaxrs.exception; import org.lfenergy.compas.core.commons.exception.CompasException; -import org.lfenergy.compas.core.rest.model.ErrorResponse; +import org.lfenergy.compas.core.jaxrs.model.ErrorResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/rest-commons/src/main/java/org/lfenergy/compas/core/rest/exception/ConstraintViolationExceptionHandler.java b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/exception/ConstraintViolationExceptionHandler.java similarity index 91% rename from rest-commons/src/main/java/org/lfenergy/compas/core/rest/exception/ConstraintViolationExceptionHandler.java rename to jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/exception/ConstraintViolationExceptionHandler.java index 6499712..53b9d52 100644 --- a/rest-commons/src/main/java/org/lfenergy/compas/core/rest/exception/ConstraintViolationExceptionHandler.java +++ b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/exception/ConstraintViolationExceptionHandler.java @@ -1,9 +1,9 @@ // SPDX-FileCopyrightText: 2021 Alliander N.V. // // SPDX-License-Identifier: Apache-2.0 -package org.lfenergy.compas.core.rest.exception; +package org.lfenergy.compas.core.jaxrs.exception; -import org.lfenergy.compas.core.rest.model.ErrorResponse; +import org.lfenergy.compas.core.jaxrs.model.ErrorResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/rest-commons/src/main/java/org/lfenergy/compas/core/rest/exception/GenericExceptionHandler.java b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/exception/GenericExceptionHandler.java similarity index 89% rename from rest-commons/src/main/java/org/lfenergy/compas/core/rest/exception/GenericExceptionHandler.java rename to jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/exception/GenericExceptionHandler.java index 47eef3d..ed2367e 100644 --- a/rest-commons/src/main/java/org/lfenergy/compas/core/rest/exception/GenericExceptionHandler.java +++ b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/exception/GenericExceptionHandler.java @@ -1,9 +1,9 @@ // SPDX-FileCopyrightText: 2021 Alliander N.V. // // SPDX-License-Identifier: Apache-2.0 -package org.lfenergy.compas.core.rest.exception; +package org.lfenergy.compas.core.jaxrs.exception; -import org.lfenergy.compas.core.rest.model.ErrorResponse; +import org.lfenergy.compas.core.jaxrs.model.ErrorResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/rest-commons/src/main/java/org/lfenergy/compas/core/rest/model/ErrorMessage.java b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/ErrorMessage.java similarity index 75% rename from rest-commons/src/main/java/org/lfenergy/compas/core/rest/model/ErrorMessage.java rename to jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/ErrorMessage.java index 1ddc577..c23a0ed 100644 --- a/rest-commons/src/main/java/org/lfenergy/compas/core/rest/model/ErrorMessage.java +++ b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/ErrorMessage.java @@ -1,21 +1,21 @@ // SPDX-FileCopyrightText: 2021 Alliander N.V. // // SPDX-License-Identifier: Apache-2.0 -package org.lfenergy.compas.core.rest.model; +package org.lfenergy.compas.core.jaxrs.model; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; -import static org.lfenergy.compas.core.rest.RestConstants.COMPAS_REST_V1_NS_URI; +import static org.lfenergy.compas.core.jaxrs.JaxrsConstants.COMPAS_COMMONS_V1_NS_URI; @XmlAccessorType(XmlAccessType.FIELD) public class ErrorMessage { - @XmlElement(name = "Code", namespace = COMPAS_REST_V1_NS_URI, required = true) + @XmlElement(name = "Code", namespace = COMPAS_COMMONS_V1_NS_URI, required = true) private String code; - @XmlElement(name = "Message", namespace = COMPAS_REST_V1_NS_URI, required = true) + @XmlElement(name = "Message", namespace = COMPAS_COMMONS_V1_NS_URI, required = true) private String message; - @XmlElement(name = "Property", namespace = COMPAS_REST_V1_NS_URI, required = true) + @XmlElement(name = "Property", namespace = COMPAS_COMMONS_V1_NS_URI, required = true) private String property; public ErrorMessage() { diff --git a/rest-commons/src/main/java/org/lfenergy/compas/core/rest/model/ErrorResponse.java b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/ErrorResponse.java similarity index 76% rename from rest-commons/src/main/java/org/lfenergy/compas/core/rest/model/ErrorResponse.java rename to jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/ErrorResponse.java index 6194c22..8220666 100644 --- a/rest-commons/src/main/java/org/lfenergy/compas/core/rest/model/ErrorResponse.java +++ b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/ErrorResponse.java @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2021 Alliander N.V. // // SPDX-License-Identifier: Apache-2.0 -package org.lfenergy.compas.core.rest.model; +package org.lfenergy.compas.core.jaxrs.model; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -10,12 +10,12 @@ import java.util.ArrayList; import java.util.List; -import static org.lfenergy.compas.core.rest.RestConstants.COMPAS_REST_V1_NS_URI; +import static org.lfenergy.compas.core.jaxrs.JaxrsConstants.COMPAS_COMMONS_V1_NS_URI; -@XmlRootElement(name = "ErrorResponse", namespace = COMPAS_REST_V1_NS_URI) +@XmlRootElement(name = "ErrorResponse", namespace = COMPAS_COMMONS_V1_NS_URI) @XmlAccessorType(XmlAccessType.FIELD) public class ErrorResponse { - @XmlElement(name = "ErrorMessage", namespace = COMPAS_REST_V1_NS_URI, required = true) + @XmlElement(name = "ErrorMessage", namespace = COMPAS_COMMONS_V1_NS_URI, required = true) private List errorMessages = new ArrayList<>(); public void setErrorMessages(List errorMessages) { diff --git a/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/package-info.java b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/package-info.java new file mode 100644 index 0000000..60fa864 --- /dev/null +++ b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/package-info.java @@ -0,0 +1,10 @@ +// SPDX-FileCopyrightText: 2021 Alliander N.V. +// +// SPDX-License-Identifier: Apache-2.0 +@XmlSchema(xmlns = {@XmlNs(prefix = "jaxrs-commons", namespaceURI = COMPAS_COMMONS_V1_NS_URI)}) +package org.lfenergy.compas.core.jaxrs.model; + +import javax.xml.bind.annotation.XmlNs; +import javax.xml.bind.annotation.XmlSchema; + +import static org.lfenergy.compas.core.jaxrs.JaxrsConstants.COMPAS_COMMONS_V1_NS_URI; diff --git a/rest-commons/src/main/resources/META-INF/beans.xml b/jaxrs-commons/src/main/resources/META-INF/beans.xml similarity index 100% rename from rest-commons/src/main/resources/META-INF/beans.xml rename to jaxrs-commons/src/main/resources/META-INF/beans.xml diff --git a/rest-commons/src/test/java/org/lfenergy/compas/core/rest/RestConstantsTest.java b/jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/JaxrsConstantsTest.java similarity index 66% rename from rest-commons/src/test/java/org/lfenergy/compas/core/rest/RestConstantsTest.java rename to jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/JaxrsConstantsTest.java index e31ca3e..a9b835d 100644 --- a/rest-commons/src/test/java/org/lfenergy/compas/core/rest/RestConstantsTest.java +++ b/jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/JaxrsConstantsTest.java @@ -1,15 +1,15 @@ // SPDX-FileCopyrightText: 2021 Alliander N.V. // // SPDX-License-Identifier: Apache-2.0 -package org.lfenergy.compas.core.rest; +package org.lfenergy.compas.core.jaxrs; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertThrows; -class RestConstantsTest { +class JaxrsConstantsTest { @Test void constructor_WhenConstructorCalled_ThenShouldThrowExceptionCauseForbidden() { - assertThrows(UnsupportedOperationException.class, RestConstants::new); + assertThrows(UnsupportedOperationException.class, JaxrsConstants::new); } } \ No newline at end of file diff --git a/rest-commons/src/test/java/org/lfenergy/compas/core/rest/exception/CompasExceptionHandlerTest.java b/jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/exception/CompasExceptionHandlerTest.java similarity index 91% rename from rest-commons/src/test/java/org/lfenergy/compas/core/rest/exception/CompasExceptionHandlerTest.java rename to jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/exception/CompasExceptionHandlerTest.java index 9932439..d611db3 100644 --- a/rest-commons/src/test/java/org/lfenergy/compas/core/rest/exception/CompasExceptionHandlerTest.java +++ b/jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/exception/CompasExceptionHandlerTest.java @@ -1,11 +1,11 @@ // SPDX-FileCopyrightText: 2021 Alliander N.V. // // SPDX-License-Identifier: Apache-2.0 -package org.lfenergy.compas.core.rest.exception; +package org.lfenergy.compas.core.jaxrs.exception; import org.junit.jupiter.api.Test; import org.lfenergy.compas.core.commons.exception.CompasException; -import org.lfenergy.compas.core.rest.model.ErrorResponse; +import org.lfenergy.compas.core.jaxrs.model.ErrorResponse; import static javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/rest-commons/src/test/java/org/lfenergy/compas/core/rest/exception/ConstraintViolationExceptionHandlerTest.java b/jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/exception/ConstraintViolationExceptionHandlerTest.java similarity index 96% rename from rest-commons/src/test/java/org/lfenergy/compas/core/rest/exception/ConstraintViolationExceptionHandlerTest.java rename to jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/exception/ConstraintViolationExceptionHandlerTest.java index e1e93a3..f589375 100644 --- a/rest-commons/src/test/java/org/lfenergy/compas/core/rest/exception/ConstraintViolationExceptionHandlerTest.java +++ b/jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/exception/ConstraintViolationExceptionHandlerTest.java @@ -1,11 +1,11 @@ // SPDX-FileCopyrightText: 2021 Alliander N.V. // // SPDX-License-Identifier: Apache-2.0 -package org.lfenergy.compas.core.rest.exception; +package org.lfenergy.compas.core.jaxrs.exception; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; -import org.lfenergy.compas.core.rest.model.ErrorResponse; +import org.lfenergy.compas.core.jaxrs.model.ErrorResponse; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; diff --git a/rest-commons/src/test/java/org/lfenergy/compas/core/rest/exception/GenericExceptionHandlerTest.java b/jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/exception/GenericExceptionHandlerTest.java similarity index 84% rename from rest-commons/src/test/java/org/lfenergy/compas/core/rest/exception/GenericExceptionHandlerTest.java rename to jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/exception/GenericExceptionHandlerTest.java index a15c8de..78ac52d 100644 --- a/rest-commons/src/test/java/org/lfenergy/compas/core/rest/exception/GenericExceptionHandlerTest.java +++ b/jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/exception/GenericExceptionHandlerTest.java @@ -1,16 +1,16 @@ // SPDX-FileCopyrightText: 2021 Alliander N.V. // // SPDX-License-Identifier: Apache-2.0 -package org.lfenergy.compas.core.rest.exception; +package org.lfenergy.compas.core.jaxrs.exception; import org.junit.jupiter.api.Test; -import org.lfenergy.compas.core.rest.model.ErrorResponse; +import org.lfenergy.compas.core.jaxrs.model.ErrorResponse; import static javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import static org.lfenergy.compas.core.commons.exception.CompasErrorCode.UNKNOWN_EXCEPTION_ERROR; -import static org.lfenergy.compas.core.rest.exception.GenericExceptionHandler.ERROR_MESSAGE; +import static org.lfenergy.compas.core.jaxrs.exception.GenericExceptionHandler.ERROR_MESSAGE; class GenericExceptionHandlerTest { @Test diff --git a/rest-commons/src/test/java/org/lfenergy/compas/core/rest/model/AbstractPojoTester.java b/jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/model/AbstractPojoTester.java similarity index 96% rename from rest-commons/src/test/java/org/lfenergy/compas/core/rest/model/AbstractPojoTester.java rename to jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/model/AbstractPojoTester.java index 9b85356..70db967 100644 --- a/rest-commons/src/test/java/org/lfenergy/compas/core/rest/model/AbstractPojoTester.java +++ b/jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/model/AbstractPojoTester.java @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2021 Alliander N.V. // // SPDX-License-Identifier: Apache-2.0 -package org.lfenergy.compas.core.rest.model; +package org.lfenergy.compas.core.jaxrs.model; import com.openpojo.reflection.impl.PojoClassFactory; import com.openpojo.validation.ValidatorBuilder; diff --git a/rest-commons/src/test/java/org/lfenergy/compas/core/rest/model/ErrorMessageTest.java b/jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/model/ErrorMessageTest.java similarity index 96% rename from rest-commons/src/test/java/org/lfenergy/compas/core/rest/model/ErrorMessageTest.java rename to jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/model/ErrorMessageTest.java index 565c3ec..0e6f318 100644 --- a/rest-commons/src/test/java/org/lfenergy/compas/core/rest/model/ErrorMessageTest.java +++ b/jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/model/ErrorMessageTest.java @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2021 Alliander N.V. // // SPDX-License-Identifier: Apache-2.0 -package org.lfenergy.compas.core.rest.model; +package org.lfenergy.compas.core.jaxrs.model; import org.junit.jupiter.api.Test; diff --git a/rest-commons/src/test/java/org/lfenergy/compas/core/rest/model/ErrorResponseTest.java b/jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/model/ErrorResponseTest.java similarity index 97% rename from rest-commons/src/test/java/org/lfenergy/compas/core/rest/model/ErrorResponseTest.java rename to jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/model/ErrorResponseTest.java index d0157d9..4c2b3d3 100644 --- a/rest-commons/src/test/java/org/lfenergy/compas/core/rest/model/ErrorResponseTest.java +++ b/jaxrs-commons/src/test/java/org/lfenergy/compas/core/jaxrs/model/ErrorResponseTest.java @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2021 Alliander N.V. // // SPDX-License-Identifier: Apache-2.0 -package org.lfenergy.compas.core.rest.model; +package org.lfenergy.compas.core.jaxrs.model; import org.junit.jupiter.api.Test; diff --git a/pom.xml b/pom.xml index 7a72235..90bd401 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ SPDX-License-Identifier: Apache-2.0 commons - rest-commons + jaxrs-commons scl-extension scl2003 scl2007b diff --git a/rest-commons/src/main/java/org/lfenergy/compas/core/rest/RestConstants.java b/rest-commons/src/main/java/org/lfenergy/compas/core/rest/RestConstants.java deleted file mode 100644 index 79ea714..0000000 --- a/rest-commons/src/main/java/org/lfenergy/compas/core/rest/RestConstants.java +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-FileCopyrightText: 2021 Alliander N.V. -// -// SPDX-License-Identifier: Apache-2.0 -package org.lfenergy.compas.core.rest; - -public class RestConstants { - RestConstants() { - throw new UnsupportedOperationException("RestConstants class"); - } - - public static final String COMPAS_REST_V1_NS_URI = "https://www.lfenergy.org/compas/rest/v1"; -} diff --git a/rest-commons/src/main/java/org/lfenergy/compas/core/rest/model/package-info.java b/rest-commons/src/main/java/org/lfenergy/compas/core/rest/model/package-info.java deleted file mode 100644 index 8751e2e..0000000 --- a/rest-commons/src/main/java/org/lfenergy/compas/core/rest/model/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-FileCopyrightText: 2021 Alliander N.V. -// -// SPDX-License-Identifier: Apache-2.0 -@XmlSchema(xmlns = {@XmlNs(prefix = "rest-commons", namespaceURI = COMPAS_REST_V1_NS_URI)}) -package org.lfenergy.compas.core.rest.model; - -import javax.xml.bind.annotation.XmlNs; -import javax.xml.bind.annotation.XmlSchema; - -import static org.lfenergy.compas.core.rest.RestConstants.COMPAS_REST_V1_NS_URI; From e4f66fe593db80b6936036856ec8ade521ed3724 Mon Sep 17 00:00:00 2001 From: Dennis Labordus Date: Tue, 5 Oct 2021 07:49:27 +0200 Subject: [PATCH 11/11] Rename module to jaxrs-common. Signed-off-by: Dennis Labordus --- .../java/org/lfenergy/compas/core/jaxrs/model/package-info.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/package-info.java b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/package-info.java index 60fa864..03344b7 100644 --- a/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/package-info.java +++ b/jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/package-info.java @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2021 Alliander N.V. // // SPDX-License-Identifier: Apache-2.0 -@XmlSchema(xmlns = {@XmlNs(prefix = "jaxrs-commons", namespaceURI = COMPAS_COMMONS_V1_NS_URI)}) +@XmlSchema(xmlns = {@XmlNs(prefix = "compas-commons", namespaceURI = COMPAS_COMMONS_V1_NS_URI)}) package org.lfenergy.compas.core.jaxrs.model; import javax.xml.bind.annotation.XmlNs;