Skip to content

Commit 0b243ce

Browse files
committed
tech(#566): RSR-1519 - update Maven dependencies
Signed-off-by: massifben <105049157+massifben@users.noreply.github.com>
1 parent d7b29eb commit 0b243ce

File tree

53 files changed

+771
-865
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+771
-865
lines changed

pom.xml

Lines changed: 62 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
<!-- SPDX-FileCopyrightText: 2022 2021 2020 RTE FRANCE -->
33
<!-- -->
44
<!-- SPDX-License-Identifier: Apache-2.0 -->
5-
<project xmlns="http://maven.apache.org/POM/4.0.0"
6-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<project xmlns="http://maven.apache.org/POM/4.0.0">
86
<modelVersion>4.0.0</modelVersion>
97
<groupId>org.lfenergy.compas</groupId>
108
<artifactId>compas-sct</artifactId>
@@ -32,107 +30,101 @@
3230
<java.version>21</java.version>
3331
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3432

35-
<!-- jacoco est utilisé par sonar pour afficher le rapport de couverture des tests -->
36-
<jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
37-
3833
<!-- compas -->
39-
<compas-core.version>0.21.0</compas-core.version>
34+
<compas-core.version>0.22.0</compas-core.version>
4035
<compas-scl-xsd.version>0.0.4</compas-scl-xsd.version>
4136

42-
<!-- maven -->
43-
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
44-
<maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
45-
<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
46-
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
47-
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
48-
<maven-dependency-plugin.version>3.6.1</maven-dependency-plugin.version>
37+
<!-- xml -->
38+
<jakarta.xml.bind-api.version>4.0.4</jakarta.xml.bind-api.version>
39+
<jaxb-runtime.version>4.0.6</jaxb-runtime.version>
40+
<jaxb2-maven-plugin.version>3.3.0</jaxb2-maven-plugin.version>
4941

50-
<jaxb2-maven-plugin.version>3.1.0</jaxb2-maven-plugin.version>
42+
<!-- json -->
43+
<jackson-databind.version>2.21.0</jackson-databind.version>
44+
45+
<!-- maven -->
46+
<maven-surefire-plugin.version>3.5.4</maven-surefire-plugin.version>
47+
<maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
48+
<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
49+
<maven-jar-plugin.version>3.5.0</maven-jar-plugin.version>
50+
<maven-compiler-plugin.version>3.14.1</maven-compiler-plugin.version>
51+
<maven-dependency-plugin.version>3.9.0</maven-dependency-plugin.version>
5152

52-
<junit-version>5.9.0</junit-version>
53-
<logback-classic.version>1.5.6</logback-classic.version>
54-
<assertj.version>3.22.0</assertj.version>
55-
<lombok.version>1.18.30</lombok.version>
56-
<mockito.version>5.5.0</mockito.version>
57-
<jackson-databind.version>2.13.4.1</jackson-databind.version>
53+
<!-- tests -->
54+
<junit-version>5.14.2</junit-version>
55+
<assertj.version>3.27.7</assertj.version>
56+
<mockito.version>5.21.0</mockito.version>
57+
<jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
5858

5959
<!-- utils -->
60-
<commons-beanutils.version>1.9.4</commons-beanutils.version>
60+
<lombok.version>1.18.42</lombok.version>
61+
<slf4j-api.version>2.0.17</slf4j-api.version>
62+
<commons-lang3.version>3.20.0</commons-lang3.version>
63+
<commons-beanutils.version>1.11.0</commons-beanutils.version>
6164
</properties>
6265

63-
<dependencies>
64-
<dependency>
65-
<groupId>ch.qos.logback</groupId>
66-
<artifactId>logback-classic</artifactId>
67-
</dependency>
68-
</dependencies>
6966
<dependencyManagement>
7067
<dependencies>
68+
7169
<dependency>
72-
<groupId>org.projectlombok</groupId>
73-
<artifactId>lombok</artifactId>
74-
<version>${lombok.version}</version>
70+
<groupId>org.lfenergy.compas.core</groupId>
71+
<artifactId>scl-extension</artifactId>
72+
<version>${compas-core.version}</version>
7573
</dependency>
7674
<dependency>
77-
<groupId>org.junit.jupiter</groupId>
78-
<artifactId>junit-jupiter-api</artifactId>
79-
<version>${junit-version}</version>
80-
<scope>test</scope>
75+
<groupId>org.lfenergy.compas.xsd</groupId>
76+
<artifactId>compas-scl-xsd</artifactId>
77+
<version>${compas-scl-xsd.version}</version>
8178
</dependency>
8279
<dependency>
83-
<groupId>org.junit.jupiter</groupId>
84-
<artifactId>junit-jupiter-engine</artifactId>
85-
<version>${junit-version}</version>
86-
<scope>test</scope>
80+
<groupId>org.glassfish.jaxb</groupId>
81+
<artifactId>jaxb-runtime</artifactId>
82+
<version>${jaxb-runtime.version}</version>
83+
</dependency>
84+
<dependency>
85+
<groupId>jakarta.xml.bind</groupId>
86+
<artifactId>jakarta.xml.bind-api</artifactId>
87+
<version>${jakarta.xml.bind-api.version}</version>
88+
</dependency>
89+
<dependency>
90+
<groupId>com.fasterxml.jackson.core</groupId>
91+
<artifactId>jackson-databind</artifactId>
92+
<version>${jackson-databind.version}</version>
8793
</dependency>
8894
<dependency>
8995
<groupId>org.junit.jupiter</groupId>
90-
<artifactId>junit-jupiter-params</artifactId>
96+
<artifactId>junit-jupiter</artifactId>
9197
<version>${junit-version}</version>
92-
<scope>test</scope>
9398
</dependency>
9499
<dependency>
95-
<groupId>org.mockito</groupId>
96-
<artifactId>mockito-core</artifactId>
97-
<version>${mockito.version}</version>
98-
<scope>test</scope>
100+
<groupId>org.assertj</groupId>
101+
<artifactId>assertj-core</artifactId>
102+
<version>${assertj.version}</version>
99103
</dependency>
100104
<dependency>
101105
<groupId>org.mockito</groupId>
102106
<artifactId>mockito-junit-jupiter</artifactId>
103107
<version>${mockito.version}</version>
104-
<scope>test</scope>
105108
</dependency>
106109
<dependency>
107-
<groupId>org.lfenergy.compas.core</groupId>
108-
<artifactId>scl-extension</artifactId>
109-
<version>${compas-core.version}</version>
110-
</dependency>
111-
<dependency>
112-
<groupId>org.lfenergy.compas.xsd</groupId>
113-
<artifactId>compas-scl-xsd</artifactId>
114-
<version>${compas-scl-xsd.version}</version>
115-
</dependency>
116-
<dependency>
117-
<groupId>org.lfenergy.compas.core</groupId>
118-
<artifactId>commons</artifactId>
119-
<version>${compas-core.version}</version>
120-
<scope>test</scope>
110+
<groupId>org.projectlombok</groupId>
111+
<artifactId>lombok</artifactId>
112+
<version>${lombok.version}</version>
121113
</dependency>
122114
<dependency>
123-
<groupId>ch.qos.logback</groupId>
124-
<artifactId>logback-classic</artifactId>
125-
<version>${logback-classic.version}</version>
115+
<groupId>org.slf4j</groupId>
116+
<artifactId>slf4j-api</artifactId>
117+
<version>${slf4j-api.version}</version>
126118
</dependency>
127119
<dependency>
128-
<groupId>org.assertj</groupId>
129-
<artifactId>assertj-core</artifactId>
130-
<version>${assertj.version}</version>
120+
<groupId>org.apache.commons</groupId>
121+
<artifactId>commons-lang3</artifactId>
122+
<version>${commons-lang3.version}</version>
131123
</dependency>
132124
<dependency>
133-
<groupId>com.fasterxml.jackson.core</groupId>
134-
<artifactId>jackson-databind</artifactId>
135-
<version>${jackson-databind.version}</version>
125+
<groupId>commons-beanutils</groupId>
126+
<artifactId>commons-beanutils</artifactId>
127+
<version>${commons-beanutils.version}</version>
136128
</dependency>
137129
</dependencies>
138130
</dependencyManagement>
@@ -150,6 +142,7 @@
150142
<artifactId>maven-compiler-plugin</artifactId>
151143
<version>${maven-compiler-plugin.version}</version>
152144
<configuration>
145+
<release>${java.version}</release>
153146
<source>${java.version}</source>
154147
<target>${java.version}</target>
155148
</configuration>

sct-app/pom.xml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
<!-- SPDX-FileCopyrightText: 2021 RTE FRANCE -->
33
<!-- -->
44
<!-- SPDX-License-Identifier: Apache-2.0 -->
5-
<project xmlns="http://maven.apache.org/POM/4.0.0"
6-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
7-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<project xmlns="http://maven.apache.org/POM/4.0.0">
86
<modelVersion>4.0.0</modelVersion>
97

108
<parent>
@@ -14,7 +12,6 @@
1412
</parent>
1513

1614
<artifactId>sct-app</artifactId>
17-
<version>local-SNAPSHOT</version>
1815
<name>SCT-APP</name>
1916

2017
<dependencies>
@@ -37,30 +34,23 @@
3734
</dependency>
3835
<dependency>
3936
<groupId>org.junit.jupiter</groupId>
40-
<artifactId>junit-jupiter-api</artifactId>
41-
<scope>test</scope>
42-
</dependency>
43-
<dependency>
44-
<groupId>org.junit.jupiter</groupId>
45-
<artifactId>junit-jupiter-engine</artifactId>
37+
<artifactId>junit-jupiter</artifactId>
4638
<scope>test</scope>
4739
</dependency>
4840
<dependency>
4941
<groupId>org.assertj</groupId>
5042
<artifactId>assertj-core</artifactId>
43+
<scope>test</scope>
5144
</dependency>
5245
<dependency>
53-
<groupId>org.mockito</groupId>
54-
<artifactId>mockito-core</artifactId>
46+
<groupId>commons-beanutils</groupId>
47+
<artifactId>commons-beanutils</artifactId>
48+
<scope>test</scope>
5549
</dependency>
5650
<dependency>
5751
<groupId>org.mockito</groupId>
5852
<artifactId>mockito-junit-jupiter</artifactId>
59-
</dependency>
60-
<dependency>
61-
<groupId>commons-beanutils</groupId>
62-
<artifactId>commons-beanutils</artifactId>
63-
<version>${commons-beanutils.version}</version>
53+
<scope>test</scope>
6454
</dependency>
6555
</dependencies>
6656

sct-app/src/test/java/org.lfenergy.compas.sct.app/SclAutomationServiceIntegrationTest.java

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import java.util.UUID;
2727

2828
import static org.assertj.core.api.Assertions.*;
29-
import static org.lfenergy.compas.sct.commons.testhelpers.SclTestMarshaller.assertIsMarshallable;
29+
import static org.lfenergy.compas.sct.commons.testhelpers.SclTestMarshaller.assertSclValidateXsd;
3030

3131
class SclAutomationServiceIntegrationTest {
3232

@@ -54,8 +54,8 @@ void setUp() {
5454
@Test
5555
void createSCD_should_return_generatedSCD() {
5656
// Given
57-
SCL ssd = SclTestMarshaller.getSCLFromFile("/scd-ied-dtt-com-import-stds/scd.xml");
58-
SCL std = SclTestMarshaller.getSCLFromFile("/scd-ied-dtt-com-import-stds/std.xml");
57+
SCL ssd = SclTestMarshaller.getSCLFromResource("scd-ied-dtt-com-import-stds/scd.xml");
58+
SCL std = SclTestMarshaller.getSCLFromResource("scd-ied-dtt-com-import-stds/std.xml");
5959
// When
6060
SCL scd = sclAutomationService.createSCD(ssd, headerDTO, List.of(std));
6161
// Then
@@ -65,7 +65,7 @@ void createSCD_should_return_generatedSCD() {
6565
assertThat(scd.getIED()).hasSize(1);
6666
assertThat(scd.getDataTypeTemplates()).isNotNull();
6767
assertThat(scd.getCommunication().getSubNetwork()).hasSize(2);
68-
assertIsMarshallable(scd);
68+
assertSclValidateXsd(scd);
6969
}
7070

7171
@Test
@@ -76,17 +76,17 @@ void createSCD_WithHItem_should_return_generatedSCD() {
7676
historyItem.setWho("me");
7777
historyItem.setWhy("because");
7878
headerDTO.getHistoryItems().add(historyItem);
79-
SCL ssd = SclTestMarshaller.getSCLFromFile("/scd-substation-import-ssd/ssd.xml");
80-
SCL std1 = SclTestMarshaller.getSCLFromFile("/std_1.xml");
81-
SCL std2 = SclTestMarshaller.getSCLFromFile("/std_2.xml");
82-
SCL std3 = SclTestMarshaller.getSCLFromFile("/std_3.xml");
79+
SCL ssd = SclTestMarshaller.getSCLFromResource("scd-substation-import-ssd/ssd.xml");
80+
SCL std1 = SclTestMarshaller.getSCLFromResource("std_1.xml");
81+
SCL std2 = SclTestMarshaller.getSCLFromResource("std_2.xml");
82+
SCL std3 = SclTestMarshaller.getSCLFromResource("std_3.xml");
8383
// When
8484
SCL scd = sclAutomationService.createSCD(ssd, headerDTO, List.of(std1, std2, std3));
8585
// Then
8686
assertThat(scd.getHeader().getId()).isNotNull();
8787
assertThat(scd.getHeader().getHistory().getHitem()).hasSize(1);
8888
assertThat(scd.getSubstation()).hasSize(1);
89-
assertIsMarshallable(scd);
89+
assertSclValidateXsd(scd);
9090
}
9191

9292
@Test
@@ -101,23 +101,23 @@ void createSCD_WithManyHItem_should_return_generatedSCD() {
101101
historyItemBis.setWho("me bis");
102102
historyItemBis.setWhy("because bis");
103103
headerDTO.getHistoryItems().addAll(Arrays.asList(historyItem, historyItemBis));
104-
SCL ssd = SclTestMarshaller.getSCLFromFile("/scd-substation-import-ssd/ssd.xml");
105-
SCL std1 = SclTestMarshaller.getSCLFromFile("/std_1.xml");
106-
SCL std2 = SclTestMarshaller.getSCLFromFile("/std_2.xml");
107-
SCL std3 = SclTestMarshaller.getSCLFromFile("/std_3.xml");
104+
SCL ssd = SclTestMarshaller.getSCLFromResource("scd-substation-import-ssd/ssd.xml");
105+
SCL std1 = SclTestMarshaller.getSCLFromResource("std_1.xml");
106+
SCL std2 = SclTestMarshaller.getSCLFromResource("std_2.xml");
107+
SCL std3 = SclTestMarshaller.getSCLFromResource("std_3.xml");
108108
// When
109109
SCL scd = sclAutomationService.createSCD(ssd, headerDTO, List.of(std1, std2, std3));
110110
// Then
111111
assertThat(scd.getHeader().getId()).isNotNull();
112112
assertThat(scd.getHeader().getHistory().getHitem()).hasSize(1);
113113
assertThat(scd.getHeader().getHistory().getHitem().getFirst().getWhat()).isEqualTo("what");
114-
assertIsMarshallable(scd);
114+
assertSclValidateXsd(scd);
115115
}
116116

117117
@Test
118118
void createSCD_whenSSDWithoutSubstation_shouldThrowException() {
119119
// Given
120-
SCL ssd = SclTestMarshaller.getSCLFromFile("/scd-substation-import-ssd/ssd_without_substations.xml");
120+
SCL ssd = SclTestMarshaller.getSCLFromResource("scd-substation-import-ssd/ssd_without_substations.xml");
121121
// When & Then
122122
List<SCL> stdListEmpty = List.of();
123123
assertThatThrownBy(() -> sclAutomationService.createSCD(ssd, headerDTO, stdListEmpty))
@@ -132,7 +132,7 @@ void createSCD_whenSSDIsNull_shouldThrowException() {
132132
historyItem.setWho("me");
133133
historyItem.setWhy("because");
134134
headerDTO.getHistoryItems().add(historyItem);
135-
SCL std1 = SclTestMarshaller.getSCLFromFile("/std_1.xml");
135+
SCL std1 = SclTestMarshaller.getSCLFromResource("std_1.xml");
136136
List<SCL> stdList = List.of(std1);
137137

138138
// When & Then
@@ -143,8 +143,8 @@ void createSCD_whenSSDIsNull_shouldThrowException() {
143143
@Test
144144
void createSCD_whenheaderDTOIsNull_shouldThrowException() {
145145
// Given
146-
SCL ssd = SclTestMarshaller.getSCLFromFile("/scd-substation-import-ssd/ssd.xml");
147-
SCL std1 = SclTestMarshaller.getSCLFromFile("/std_1.xml");
146+
SCL ssd = SclTestMarshaller.getSCLFromResource("scd-substation-import-ssd/ssd.xml");
147+
SCL std1 = SclTestMarshaller.getSCLFromResource("std_1.xml");
148148
List<SCL> stdList = List.of(std1);
149149

150150
// When & Then
@@ -155,8 +155,8 @@ void createSCD_whenheaderDTOIsNull_shouldThrowException() {
155155
@Test
156156
void createSCD_should_delete_ControlBlocks_DataSet_and_ExtRef_src_attributes() {
157157
// Given
158-
SCL ssd = SclTestMarshaller.getSCLFromFile("/scd-ied-dtt-com-import-stds/ssd.xml");
159-
SCL std = SclTestMarshaller.getSCLFromFile("/scl-remove-controlBlocks-dataSet-extRefSrc/scl-with-control-blocks.xml");
158+
SCL ssd = SclTestMarshaller.getSCLFromResource("scd-ied-dtt-com-import-stds/ssd.xml");
159+
SCL std = SclTestMarshaller.getSCLFromResource("scl-remove-controlBlocks-dataSet-extRefSrc/scl-with-control-blocks.xml");
160160
// When
161161
SCL scd = sclAutomationService.createSCD(ssd, headerDTO, List.of(std));
162162
// Then
@@ -170,7 +170,7 @@ void createSCD_should_delete_ControlBlocks_DataSet_and_ExtRef_src_attributes() {
170170
assertThat(ln0.getDataSet()).isEmpty();
171171
assertThat(ln0.getInputs().getExtRef()).hasSize(2);
172172
assertThat(ln0.getInputs().getExtRef().getFirst().isSetSrcLDInst()).isFalse();
173-
assertIsMarshallable(scd);
173+
assertSclValidateXsd(scd);
174174
}
175175

176176
}

sct-app/src/test/java/org.lfenergy.compas.sct.app/SclAutomationServiceTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
import static org.assertj.core.api.Assertions.assertThat;
2828
import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy;
29-
import static org.lfenergy.compas.sct.commons.testhelpers.SclTestMarshaller.assertIsMarshallable;
29+
import static org.lfenergy.compas.sct.commons.testhelpers.SclTestMarshaller.assertSclValidateXsd;
3030
import static org.mockito.ArgumentMatchers.any;
3131
import static org.mockito.ArgumentMatchers.anyString;
3232
import static org.mockito.Mockito.*;
@@ -79,7 +79,7 @@ void createSCD_without_headerHistory_should_return_generatedSCD() throws Invocat
7979
assertThat(scd.getCommunication()).isNull();
8080
assertThat(scd.getSubstation()).isEmpty();
8181
assertThat(scd.getIED()).isEmpty();
82-
assertIsMarshallable(scd);
82+
assertSclValidateXsd(scd);
8383
verify(sclEditor, times(1)).initScl(headerDTO.getId(), headerDTO.getVersion(), headerDTO.getRevision());
8484
verify(sclEditor, times(0)).addHistoryItem(any(SCL.class), anyString(), anyString(), anyString());
8585
verify(substationEditor, times(1)).addSubstation(any(SCL.class), any(SCL.class));
@@ -108,7 +108,7 @@ void createSCD_with_headerHistory_should_return_generatedSCD() throws Invocation
108108
assertThat(scd.getCommunication()).isNull();
109109
assertThat(scd.getSubstation()).isEmpty();
110110
assertThat(scd.getIED()).isEmpty();
111-
assertIsMarshallable(scd);
111+
assertSclValidateXsd(scd);
112112
verify(sclEditor, times(1)).initScl(headerDTO.getId(), headerDTO.getVersion(), headerDTO.getRevision());
113113
verify(sclEditor, times(1)).addHistoryItem(any(SCL.class), eq(historyItem.getWho()), eq(historyItem.getWhat()), eq(historyItem.getWhy()));
114114
verify(substationEditor, times(1)).addSubstation(any(SCL.class), any(SCL.class));

0 commit comments

Comments
 (0)