Skip to content

Commit 947066f

Browse files
author
Dennis Labordus
authored
Merge pull request #77 from com-pas/develop
New Release with refactoring
2 parents e297ad9 + cb92e82 commit 947066f

File tree

22 files changed

+72
-84
lines changed

22 files changed

+72
-84
lines changed

.github/workflows/build-project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Set up JDK 1.11
18-
uses: actions/[email protected].0
18+
uses: actions/[email protected].1
1919
with:
2020
distribution: 'zulu'
2121
java-version: '11'
2222
- name: Create custom Maven Settings.xml
23-
uses: whelk-io/maven-settings-xml-action@v18
23+
uses: whelk-io/maven-settings-xml-action@v20
2424
with:
2525
output_file: custom_maven_settings.xml
2626
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'

.github/workflows/release-project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222
# Extra the tagname form the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
2323
run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})"
2424
- name: Set up JDK 1.11
25-
uses: actions/[email protected].0
25+
uses: actions/[email protected].1
2626
with:
2727
distribution: 'zulu'
2828
java-version: '11'
2929
- name: Create custom Maven Settings.xml
30-
uses: whelk-io/maven-settings-xml-action@v18
30+
uses: whelk-io/maven-settings-xml-action@v20
3131
with:
3232
output_file: custom_maven_settings.xml
3333
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'

.github/workflows/sonarcloud-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
with:
1616
fetch-depth: 0
1717
- name: Set up JDK 1.11
18-
uses: actions/[email protected].0
18+
uses: actions/[email protected].1
1919
with:
2020
distribution: 'zulu'
2121
java-version: '11'
@@ -32,7 +32,7 @@ jobs:
3232
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3333
restore-keys: ${{ runner.os }}-m2
3434
- name: Create custom Maven Settings.xml
35-
uses: whelk-io/maven-settings-xml-action@v18
35+
uses: whelk-io/maven-settings-xml-action@v20
3636
with:
3737
output_file: custom_maven_settings.xml
3838
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'

rest-commons/pom.xml renamed to jaxrs-commons/pom.xml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ SPDX-License-Identifier: Apache-2.0
1414
<version>local-SNAPSHOT</version>
1515
</parent>
1616

17-
<artifactId>rest-commons</artifactId>
17+
<artifactId>jaxrs-commons</artifactId>
1818
<packaging>jar</packaging>
1919

2020
<dependencies>
@@ -74,13 +74,4 @@ SPDX-License-Identifier: Apache-2.0
7474
<scope>test</scope>
7575
</dependency>
7676
</dependencies>
77-
78-
<build>
79-
<plugins>
80-
<plugin>
81-
<groupId>org.jboss.jandex</groupId>
82-
<artifactId>jandex-maven-plugin</artifactId>
83-
</plugin>
84-
</plugins>
85-
</build>
8677
</project>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// SPDX-FileCopyrightText: 2021 Alliander N.V.
2+
//
3+
// SPDX-License-Identifier: Apache-2.0
4+
package org.lfenergy.compas.core.jaxrs;
5+
6+
public class JaxrsConstants {
7+
JaxrsConstants() {
8+
throw new UnsupportedOperationException("JaxrsConstants class");
9+
}
10+
11+
public static final String COMPAS_COMMONS_V1_NS_URI = "https://www.lfenergy.org/compas/commons/v1";
12+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// SPDX-FileCopyrightText: 2021 Alliander N.V.
22
//
33
// SPDX-License-Identifier: Apache-2.0
4-
package org.lfenergy.compas.core.rest.exception;
4+
package org.lfenergy.compas.core.jaxrs.exception;
55

66
import org.lfenergy.compas.core.commons.exception.CompasException;
7-
import org.lfenergy.compas.core.rest.model.ErrorResponse;
7+
import org.lfenergy.compas.core.jaxrs.model.ErrorResponse;
88
import org.slf4j.Logger;
99
import org.slf4j.LoggerFactory;
1010

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// SPDX-FileCopyrightText: 2021 Alliander N.V.
22
//
33
// SPDX-License-Identifier: Apache-2.0
4-
package org.lfenergy.compas.core.rest.exception;
4+
package org.lfenergy.compas.core.jaxrs.exception;
55

6-
import org.lfenergy.compas.core.rest.model.ErrorResponse;
6+
import org.lfenergy.compas.core.jaxrs.model.ErrorResponse;
77
import org.slf4j.Logger;
88
import org.slf4j.LoggerFactory;
99

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// SPDX-FileCopyrightText: 2021 Alliander N.V.
22
//
33
// SPDX-License-Identifier: Apache-2.0
4-
package org.lfenergy.compas.core.rest.exception;
4+
package org.lfenergy.compas.core.jaxrs.exception;
55

6-
import org.lfenergy.compas.core.rest.model.ErrorResponse;
6+
import org.lfenergy.compas.core.jaxrs.model.ErrorResponse;
77
import org.slf4j.Logger;
88
import org.slf4j.LoggerFactory;
99

rest-commons/src/main/java/org/lfenergy/compas/core/rest/model/ErrorMessage.java renamed to jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/ErrorMessage.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
// SPDX-FileCopyrightText: 2021 Alliander N.V.
22
//
33
// SPDX-License-Identifier: Apache-2.0
4-
package org.lfenergy.compas.core.rest.model;
4+
package org.lfenergy.compas.core.jaxrs.model;
55

66
import javax.xml.bind.annotation.XmlAccessType;
77
import javax.xml.bind.annotation.XmlAccessorType;
88
import javax.xml.bind.annotation.XmlElement;
99

10-
import static org.lfenergy.compas.core.rest.RestConstants.COMPAS_REST_V1_NS_URI;
10+
import static org.lfenergy.compas.core.jaxrs.JaxrsConstants.COMPAS_COMMONS_V1_NS_URI;
1111

1212
@XmlAccessorType(XmlAccessType.FIELD)
1313
public class ErrorMessage {
14-
@XmlElement(name = "Code", namespace = COMPAS_REST_V1_NS_URI, required = true)
14+
@XmlElement(name = "Code", namespace = COMPAS_COMMONS_V1_NS_URI, required = true)
1515
private String code;
16-
@XmlElement(name = "Message", namespace = COMPAS_REST_V1_NS_URI, required = true)
16+
@XmlElement(name = "Message", namespace = COMPAS_COMMONS_V1_NS_URI, required = true)
1717
private String message;
18-
@XmlElement(name = "Property", namespace = COMPAS_REST_V1_NS_URI, required = true)
18+
@XmlElement(name = "Property", namespace = COMPAS_COMMONS_V1_NS_URI, required = true)
1919
private String property;
2020

2121
public ErrorMessage() {

rest-commons/src/main/java/org/lfenergy/compas/core/rest/model/ErrorResponse.java renamed to jaxrs-commons/src/main/java/org/lfenergy/compas/core/jaxrs/model/ErrorResponse.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-FileCopyrightText: 2021 Alliander N.V.
22
//
33
// SPDX-License-Identifier: Apache-2.0
4-
package org.lfenergy.compas.core.rest.model;
4+
package org.lfenergy.compas.core.jaxrs.model;
55

66
import javax.xml.bind.annotation.XmlAccessType;
77
import javax.xml.bind.annotation.XmlAccessorType;
@@ -10,12 +10,12 @@
1010
import java.util.ArrayList;
1111
import java.util.List;
1212

13-
import static org.lfenergy.compas.core.rest.RestConstants.COMPAS_REST_V1_NS_URI;
13+
import static org.lfenergy.compas.core.jaxrs.JaxrsConstants.COMPAS_COMMONS_V1_NS_URI;
1414

15-
@XmlRootElement(name = "ErrorResponse", namespace = COMPAS_REST_V1_NS_URI)
15+
@XmlRootElement(name = "ErrorResponse", namespace = COMPAS_COMMONS_V1_NS_URI)
1616
@XmlAccessorType(XmlAccessType.FIELD)
1717
public class ErrorResponse {
18-
@XmlElement(name = "ErrorMessage", namespace = COMPAS_REST_V1_NS_URI, required = true)
18+
@XmlElement(name = "ErrorMessage", namespace = COMPAS_COMMONS_V1_NS_URI, required = true)
1919
private List<ErrorMessage> errorMessages = new ArrayList<>();
2020

2121
public void setErrorMessages(List<ErrorMessage> errorMessages) {

0 commit comments

Comments
 (0)