<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>de.adorsys.opba</groupId>
        <artifactId>open-banking-gateway</artifactId>
        <version>0.20.0.2</version>
    </parent>

    <artifactId>opba-embedded-starter</artifactId>
    <name>opba-embedded-starter</name>

    <properties>
      <!-- Hard reference to root directory. Used to reference pmd and checkstyle files from root.
      Change this if depth changes. Current: /open-banking-gateway/opba-embedded-starter -->
      <main.basedir>${project.parent.basedir}</main.basedir>
    </properties>

    <dependencies>
        <dependency>
            <groupId>de.adorsys.opba</groupId>
            <artifactId>opba-db</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>de.adorsys.opba</groupId>
            <artifactId>opba-banking-rest-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>de.adorsys.opba</groupId>
            <artifactId>opba-banking-rest-impl</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>de.adorsys.opba</groupId>
            <artifactId>opba-auth-rest-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>de.adorsys.opba</groupId>
            <artifactId>opba-auth-rest-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>de.adorsys.opba</groupId>
            <artifactId>opba-consent-rest-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>de.adorsys.opba</groupId>
            <artifactId>opba-consent-rest-impl</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>de.adorsys.opba</groupId>
            <artifactId>opba-banking-protocol-facade</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Protocols -->
        <dependency>
            <groupId>de.adorsys.opba</groupId>
            <artifactId>xs2a-protocol</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>de.adorsys.opba</groupId>
            <artifactId>hbci-protocol</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>de.adorsys.opba</groupId>
            <artifactId>xs2a-sandbox-protocol</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- DB Access -->
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-ui</artifactId>
            <version>${springdoc-openapi-ui.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.parent.artifactId}-${project.version}</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${spring-boot.version}</version>
                <configuration>
                    <mainClass>de.adorsys.opba.starter.OpenBankingEmbeddedApplication</mainClass>
                    <skip>false</skip>
                    <classifier>exec</classifier>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <version>${commit-id.version}</version>
                <executions>
                    <execution>
                        <id>get-the-git-infos</id>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                        <phase>initialize</phase>
                    </execution>
                </executions>
                <configuration>
                    <failOnNoGitDirectory>false</failOnNoGitDirectory>
                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
                    <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
                    <includeOnlyProperties>
                        <includeOnlyProperty>^git.build.time$</includeOnlyProperty>
                        <includeOnlyProperty>^git.commit.id.full$</includeOnlyProperty>
                    </includeOnlyProperties>
                    <commitIdGenerationMode>full</commitIdGenerationMode>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
