Skip to content

Commit

Permalink
🎉 dms-service copy from internal
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhir committed Jan 7, 2025
1 parent 65ac2e4 commit a51e128
Show file tree
Hide file tree
Showing 37 changed files with 1,132 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dms-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# For documentation see https://jboss-container-images.github.io/openjdk/
FROM registry.access.redhat.com/ubi9/openjdk-21-runtime

# Copy runnable jar to deployments
COPY target/*.jar /deployments/application.jar
11 changes: 11 additions & 0 deletions dms-service/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# SWIM DMS-Service

SWIM service for transferring files into DMS when notified from dispatch-service (Kafka)

## Architecture

```mermaid
flowchart LR
Kafka --> DMS-Service
DMS-Service --> DMS-REST-EAI
```
379 changes: 379 additions & 0 deletions dms-service/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,379 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.5</version>
<relativePath/>
</parent>

<groupId>de.muenchen.swim</groupId>
<artifactId>dms-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>dms-service</name>
<description>SWIM service for transferring files into DMS when notified from dispatch-service (Kafka)</description>

<properties>
<!-- Compilation -->
<java.version>21</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>${java.version}</maven.compiler.release>

<!-- Core Frameworks -->
<spring-cloud-dependencies.version>2023.0.3</spring-cloud-dependencies.version> <!-- Must match the chosen Spring Boot version -->
<refarch-dms-integration-fabasoft-rest-api.version>1.3.1</refarch-dms-integration-fabasoft-rest-api.version>

<!-- Logging -->
<logstash-logback-encoder.version>8.0</logstash-logback-encoder.version>

<!-- Linting & Formatting -->
<spotless-maven-plugin.version>2.28.0</spotless-maven-plugin.version>
<itm-java-codeformat.version>1.0.10</itm-java-codeformat.version>
<pmd-maven-plugin.version>3.26.0</pmd-maven-plugin.version>
<spotbugs-maven-plugin.version>4.8.6.6</spotbugs-maven-plugin.version>
<spotbugs-annotations.version>4.8.6</spotbugs-annotations.version>
<findsecbugs-plugin.version>1.13.0</findsecbugs-plugin.version>

<!-- Testing -->
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
<argLine /> <!-- Must be empty, definition needed for integration of Jacoco and Surefire via @{argLine} lazy property evaluation -->

<!-- Utility -->
<commons-collections4.version>4.4</commons-collections4.version>
<commons-csv.version>1.12.0</commons-csv.version>
<commons-io.version>2.18.0</commons-io.version>
<commons-lang3.version>3.17.0</commons-lang3.version>
<commons-text.version>1.12.0</commons-text.version>
<commons-validator.version>1.9.0</commons-validator.version>
<mapstruct.version>1.6.3</mapstruct.version>
<refarch-tools.version>1.1.0</refarch-tools.version>

<!-- Additional required dependencies -->
<lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version> <!-- Needed to make MapStruct and Lombok work together -->
</properties>


<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from Spring Cloud -->
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud-dependencies.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>


<dependencies>

<!-- Spring Boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-kafka</artifactId>
</dependency>

<!-- json etc. -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
</dependency>

<!-- Other -->
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<version>${spotbugs-annotations.version}</version>
</dependency>
<dependency>
<groupId>de.muenchen.refarch</groupId>
<artifactId>refarch-dms-integration-fabasoft-rest-api</artifactId>
<version>${refarch-dms-integration-fabasoft-rest-api.version}</version>
</dependency>

<!-- Validation -->
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>

<!-- Testing -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-testcontainers</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>

<!-- Logging -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-tracing-bridge-brave</artifactId>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>${logstash-logback-encoder.version}</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>

<!-- apache commons -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>${commons-collections4.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>${commons-csv.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>${commons-text.version}</version>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>${commons-validator.version}</version>
</dependency>

<!-- Configuration Processor -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>

</dependencies>


<scm>
<connection>scm:git:${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git</connection>
<developerConnection>scm:git:${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git</developerConnection>
</scm>


<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>${lombok-mapstruct-binding.version}</version>
</path>
</annotationProcessorPaths>
<compilerArgs>
<compilerArg>
-Amapstruct.defaultComponentModel=spring
</compilerArg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>@{argLine} -Dfile.encoding=${project.build.sourceEncoding}</argLine>
</configuration>
</plugin>

<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Codeformatter Spotless -->
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugin.version}</version>
<dependencies>
<dependency>
<groupId>de.muenchen.oss</groupId>
<artifactId>itm-java-codeformat</artifactId>
<version>${itm-java-codeformat.version}</version>
</dependency>
</dependencies>
<configuration>
<java>
<includes>
<include>src/main/java/**/*.java</include> <!-- Check application code -->
<include>src/test/java/**/*.java</include> <!-- Check application tests code -->
</includes>
<eclipse>
<file>itm-java-codeformat/java_codestyle_formatter.xml</file>
</eclipse>
<trimTrailingWhitespace />
<endWithNewline />
</java>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>${pmd-maven-plugin.version}</version>
<configuration>
<minimumTokens>100</minimumTokens>
<targetJdk>${java.version}</targetJdk>
<printFailingErrors>true</printFailingErrors>
<linkXRef>false</linkXRef>
<includeTests>true</includeTests>
<excludeRoots>
<excludeRoot>target/generated-sources</excludeRoot>
<excludeRoot>target/generated-test-sources</excludeRoot>
</excludeRoots>
<rulesets>
<ruleset>refarch-pmd-ruleset.xml</ruleset>
</rulesets>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
<goal>cpd-check</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>de.muenchen.refarch.tools</groupId>
<artifactId>refarch-pmd</artifactId>
<version>${refarch-tools.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${spotbugs-maven-plugin.version}</version>
<configuration>
<effort>Max</effort>
<excludeFilterFile>spotbugs-exclude-rules.xml</excludeFilterFile>
<plugins>
<plugin>
<groupId>com.h3xstream.findsecbugs</groupId>
<artifactId>findsecbugs-plugin</artifactId>
<version>${findsecbugs-plugin.version}</version>
</plugin>
</plugins>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit a51e128

Please sign in to comment.