Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions monitor-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<properties>
<liquibase-hibernate-package>org.gridsuite.monitor.server</liquibase-hibernate-package>
<spring-cloud-aws-starter-s3>3.3.1</spring-cloud-aws-starter-s3>
<mapstruct.version>1.6.3</mapstruct.version>
<lombok-mapstruct-bindings.version>0.2.0</lombok-mapstruct-bindings.version>
</properties>

<build>
Expand All @@ -29,6 +31,28 @@
</classpathDependencyExcludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<parameters>${maven.compiler.parameters}</parameters>
<annotationProcessorPaths combine.children="append">
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>${lombok-mapstruct-bindings.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.gridsuite.monitor.worker.server.dto.parameters.securityanalysis.SecurityAnalysisInputData;
import org.gridsuite.monitor.worker.server.process.securityanalysis.SecurityAnalysisStepType;
import org.gridsuite.monitor.worker.server.clients.SecurityAnalysisRestClient;
import org.gridsuite.monitor.worker.server.report.MonitorWorkerServerReportResourceBundle;
import org.gridsuite.monitor.worker.server.services.SecurityAnalysisParametersService;
import org.springframework.stereotype.Component;

Expand Down Expand Up @@ -62,7 +61,6 @@ public void execute(ProcessStepExecutionContext<SecurityAnalysisConfig> context)
context.setResultInfos(resultInfos);
} catch (Exception e) {
reportNode.newReportNode()
.withResourceBundles(MonitorWorkerServerReportResourceBundle.BASE_NAME)
.withMessageTemplate("monitor.worker.server.securityanalysis.step.error")
.withUntypedValue("errorMessage", e.getMessage())
.withSeverity(TypedValue.ERROR_SEVERITY)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Copyright (c) 2026, RTE (http://www.rte-france.com)
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package org.gridsuite.monitor.worker.server.report;

import com.powsybl.commons.report.ReportResourceBundle;
import org.junit.jupiter.api.Test;

import java.util.ResourceBundle;
import java.util.ServiceLoader;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatNoException;

/**
* @author Antoine Bouhours <antoine.bouhours at rte-france.com>
*/
class MonitorWorkerServerReportResourceBundleTest {

@Test
void reportResourceBundleIsRegisteredViaAutoService() {
ServiceLoader<ReportResourceBundle> loader = ServiceLoader.load(ReportResourceBundle.class);

assertThat(loader).anyMatch(MonitorWorkerServerReportResourceBundle.class::isInstance);
}

@Test
void reportBundleIsFound() {
assertThatNoException().isThrownBy(() ->
ResourceBundle.getBundle(MonitorWorkerServerReportResourceBundle.BASE_NAME)
);
}
}
24 changes: 0 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
<gridsuite-dependencies.version>49.0.0</gridsuite-dependencies.version>
<sonar.organization>gridsuite</sonar.organization>
<sonar.projectKey>org.gridsuite:monitor-core</sonar.projectKey>
<mapstruct.version>1.6.3</mapstruct.version>
<lombok-mapstruct-bindings.version>0.2.0</lombok-mapstruct-bindings.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -85,28 +83,6 @@
</classpathDependencyExcludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<parameters>${maven.compiler.parameters}</parameters>
<annotationProcessorPaths combine.children="append">
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>${lombok-mapstruct-bindings.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
Loading