Skip to content

Commit a9d10ef

Browse files
author
Dennis Labordus
authored
Merge pull request #113 from com-pas/develop
New release of the CoMPAS Core
2 parents b1dc75d + 22451e1 commit a9d10ef

File tree

10 files changed

+272
-86
lines changed

10 files changed

+272
-86
lines changed

.github/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SPDX-FileCopyrightText: 2022 Alliander N.V.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
changelog:
6+
exclude:
7+
labels:
8+
- wontfix
9+
- duplicate
10+
- invalid
11+
categories:
12+
- title: New Features
13+
labels:
14+
- enhancement
15+
- title: Bugfixes
16+
labels:
17+
- bug
18+
- title: Tooling changes
19+
labels:
20+
- tooling
21+
- title: Dependency updates
22+
labels:
23+
- dependencies
24+
- title: Other Changes
25+
labels:
26+
- "*"

.github/workflows/automate-projects.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44

55
name: Add issues and pull request to project boards
66

7-
on: [ issues, pull_request ]
7+
on: [ issues, pull_request, pull_request_target ]
88

99
jobs:
1010
github-actions-automate-projects:
1111
runs-on: ubuntu-latest
12+
13+
if: ${{ (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }}
1214
steps:
1315
- name: add-new-issues-to-repository-based-project-column
1416
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
@@ -19,7 +21,7 @@ jobs:
1921
GITHUB_PROJECT_COLUMN_NAME: To do
2022
- name: add-new-pull-request-to-repository-based-project-column
2123
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
22-
if: github.event_name == 'pull_request' && github.event.action == 'opened'
24+
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action == 'opened'
2325
env:
2426
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2527
GITHUB_PROJECT_URL: https://github.com/com-pas/compas-core/projects/2
@@ -33,7 +35,7 @@ jobs:
3335
GITHUB_PROJECT_COLUMN_NAME: To do
3436
- name: add-new-pull-request-to-organization-based-project-column
3537
uses: docker://takanabe/github-actions-automate-projects:v0.0.1
36-
if: github.event_name == 'pull_request' && github.event.action == 'opened'
38+
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.action == 'opened'
3739
env:
3840
GITHUB_TOKEN: ${{ secrets.ORG_GITHUB_ACTION_SECRET }}
3941
GITHUB_PROJECT_URL: https://github.com/orgs/com-pas/projects/2

.github/workflows/build-project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v2
2424
- name: Set up JDK 1.11
25-
uses: actions/setup-java@v2.4.0
25+
uses: actions/setup-java@v2.5.0
2626
with:
2727
distribution: 'zulu'
2828
java-version: '11'

.github/workflows/release-project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ 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/setup-java@v2.4.0
25+
uses: actions/setup-java@v2.5.0
2626
with:
2727
distribution: 'zulu'
2828
java-version: '11'

.github/workflows/sonarcloud-analysis.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,24 @@ on:
1212
branches:
1313
- 'main'
1414
- 'develop'
15+
pull_request_target:
16+
branches:
17+
- 'main'
18+
- 'develop'
1519

1620
jobs:
1721
build:
1822
name: Build
1923
runs-on: ubuntu-latest
24+
timeout-minutes: 15
25+
26+
if: ${{ (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }}
2027
steps:
2128
- uses: actions/checkout@v2
2229
with:
2330
fetch-depth: 0
2431
- name: Set up JDK 1.11
25-
uses: actions/setup-java@v2.4.0
32+
uses: actions/setup-java@v2.5.0
2633
with:
2734
distribution: 'zulu'
2835
java-version: '11'
@@ -52,4 +59,5 @@ jobs:
5259
-Dsonar.projectKey=com-pas_compas-core \
5360
-Dsonar.organization=com-pas \
5461
-Dsonar.host.url=https://sonarcloud.io \
62+
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }} \
5563
verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar

pom.xml

Lines changed: 13 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ SPDX-License-Identifier: Apache-2.0
2020
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2121

2222
<compas.scl.xsd.version>0.0.4</compas.scl.xsd.version>
23-
<slf4j.version>1.7.32</slf4j.version>
24-
<jackson.version>2.13.0</jackson.version>
25-
<jaxb.bind.version>2.3.3</jaxb.bind.version>
26-
<junit.jupiter.version>5.8.2</junit.jupiter.version>
27-
<mockito-junit-jupiter.version>4.1.0</mockito-junit-jupiter.version>
23+
<quarkus.platform.version>2.7.0.Final</quarkus.platform.version>
24+
<slf4j.version>1.7.35</slf4j.version>
25+
<jaxb.bind.version>2.3.6</jaxb.bind.version>
2826
<openpojo.version>0.9.1</openpojo.version>
2927
</properties>
3028

@@ -55,6 +53,14 @@ SPDX-License-Identifier: Apache-2.0
5553

5654
<dependencyManagement>
5755
<dependencies>
56+
<dependency>
57+
<groupId>io.quarkus</groupId>
58+
<artifactId>quarkus-universe-bom</artifactId>
59+
<version>${quarkus.platform.version}</version>
60+
<type>pom</type>
61+
<scope>import</scope>
62+
</dependency>
63+
5864
<dependency>
5965
<groupId>org.lfenergy.compas.core</groupId>
6066
<artifactId>commons</artifactId>
@@ -71,40 +77,6 @@ SPDX-License-Identifier: Apache-2.0
7177
<version>${compas.scl.xsd.version}</version>
7278
</dependency>
7379

74-
<dependency>
75-
<groupId>com.fasterxml.jackson.core</groupId>
76-
<artifactId>jackson-databind</artifactId>
77-
<version>${jackson.version}</version>
78-
</dependency>
79-
<dependency>
80-
<groupId>com.fasterxml.jackson.dataformat</groupId>
81-
<artifactId>jackson-dataformat-yaml</artifactId>
82-
<version>${jackson.version}</version>
83-
</dependency>
84-
85-
<dependency>
86-
<groupId>jakarta.validation</groupId>
87-
<artifactId>jakarta.validation-api</artifactId>
88-
<version>2.0.2</version>
89-
</dependency>
90-
<dependency>
91-
<groupId>org.hibernate.validator</groupId>
92-
<artifactId>hibernate-validator</artifactId>
93-
<version>6.2.0.Final</version>
94-
<scope>test</scope>
95-
</dependency>
96-
<dependency>
97-
<groupId>org.glassfish</groupId>
98-
<artifactId>jakarta.el</artifactId>
99-
<version>3.0.4</version>
100-
<scope>test</scope>
101-
</dependency>
102-
103-
<dependency>
104-
<groupId>jakarta.xml.bind</groupId>
105-
<artifactId>jakarta.xml.bind-api</artifactId>
106-
<version>${jaxb.bind.version}</version>
107-
</dependency>
10880
<dependency>
10981
<groupId>com.sun.xml.bind</groupId>
11082
<artifactId>jaxb-impl</artifactId>
@@ -116,12 +88,6 @@ SPDX-License-Identifier: Apache-2.0
11688
<artifactId>javax.ws.rs-api</artifactId>
11789
<version>2.1.1</version>
11890
</dependency>
119-
<dependency>
120-
<groupId>org.jboss.resteasy</groupId>
121-
<artifactId>resteasy-core</artifactId>
122-
<version>5.0.1.Final</version>
123-
<scope>test</scope>
124-
</dependency>
12591

12692
<dependency>
12793
<groupId>org.slf4j</groupId>
@@ -134,30 +100,12 @@ SPDX-License-Identifier: Apache-2.0
134100
<version>${slf4j.version}</version>
135101
</dependency>
136102

137-
<dependency>
138-
<groupId>org.junit.jupiter</groupId>
139-
<artifactId>junit-jupiter-api</artifactId>
140-
<version>${junit.jupiter.version}</version>
141-
<scope>test</scope>
142-
</dependency>
143-
<dependency>
144-
<groupId>org.junit.jupiter</groupId>
145-
<artifactId>junit-jupiter-engine</artifactId>
146-
<version>${junit.jupiter.version}</version>
147-
<scope>test</scope>
148-
</dependency>
149103
<dependency>
150104
<groupId>com.openpojo</groupId>
151105
<artifactId>openpojo</artifactId>
152106
<version>${openpojo.version}</version>
153107
<scope>test</scope>
154108
</dependency>
155-
<dependency>
156-
<groupId>org.mockito</groupId>
157-
<artifactId>mockito-junit-jupiter</artifactId>
158-
<version>${mockito-junit-jupiter.version}</version>
159-
<scope>test</scope>
160-
</dependency>
161109
</dependencies>
162110
</dependencyManagement>
163111

@@ -200,7 +148,7 @@ SPDX-License-Identifier: Apache-2.0
200148
<plugin>
201149
<groupId>org.apache.maven.plugins</groupId>
202150
<artifactId>maven-compiler-plugin</artifactId>
203-
<version>3.8.1</version>
151+
<version>3.9.0</version>
204152
</plugin>
205153

206154
<plugin>
@@ -212,7 +160,7 @@ SPDX-License-Identifier: Apache-2.0
212160
<plugin>
213161
<groupId>org.apache.maven.plugins</groupId>
214162
<artifactId>maven-jar-plugin</artifactId>
215-
<version>3.2.0</version>
163+
<version>3.2.2</version>
216164
</plugin>
217165
</plugins>
218166
</pluginManagement>

scl-extension/src/main/bindings/scl-extensions.xjb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SPDX-License-Identifier: Apache-2.0
88
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
99
version="2.1">
1010
<jxb:bindings schemaLocation="../resources/xsd/SCL_CoMPAS.xsd">
11-
<jxb:bindings node="//xs:simpleType[@name='tSclFileType']">
11+
<jxb:bindings node="//xs:simpleType[@name='tCompasSclFileType']">
1212
<jxb:typesafeEnumClass ref="org.lfenergy.compas.scl.extensions.model.SclFileType"/>
1313
</jxb:bindings>
1414
</jxb:bindings>

scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/commons/CompasExtensionsField.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@
55

66
/**
77
* The CoMPAS Extension fields that exists. The fieldName is the name how the element is used in the XML.
8+
* For a description of the fields, see the XSD.
89
*/
910
public enum CompasExtensionsField {
10-
/**
11-
* The name of the SCL XML File, will be used in the search and when SCL XML File is saved to the filesystem.
12-
*/
1311
SCL_NAME_EXTENSION("SclName"),
14-
/**
15-
* The type of SCL XML File it is, like IID, SCD and more. TSclFileType indicates which values are allowed.
16-
*/
17-
SCL_FILETYPE_EXTENSION("SclFileType");
12+
SCL_FILETYPE_EXTENSION("SclFileType"),
13+
FLOW("Flow"),
14+
CONNECTIVITY_NODE("ConnectivityNode"),
15+
BAY("Bay"),
16+
L_DEVICE("LDevice"),
17+
CRITERIA("Criteria"),
18+
ICD_HEADER("ICDHeader"),
19+
SYSTEM_VERSION("SystemVersion"),
20+
FUNCTION("Function");
1821

1922
private final String fieldName;
2023

scl-extension/src/main/java/org/lfenergy/compas/scl/extensions/model/SclFileType.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
import javax.xml.bind.annotation.XmlEnum;
77
import javax.xml.bind.annotation.XmlType;
88

9-
@XmlType(name = "tSclFileType", namespace = "https://www.lfenergy.org/compas/extension/v1")
9+
import static org.lfenergy.compas.scl.extensions.commons.CompasExtensionsConstants.COMPAS_EXTENSION_NS_URI;
10+
11+
@XmlType(name = "tCompasSclFileType", namespace = COMPAS_EXTENSION_NS_URI)
1012
@XmlEnum
1113
public enum SclFileType {
1214
SSD("Substation Specification Description"),

0 commit comments

Comments
 (0)