<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>de.adorsys.opba</groupId>
        <artifactId>sandboxes</artifactId>
        <version>0.30.0.1</version>
    </parent>

    <artifactId>hbci-sandbox</artifactId>
    <name>opba-protocols/sandboxes/hbci-sandbox</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-protocols/hbci-sandbox -->
      <main.basedir>${project.parent.parent.parent.basedir}</main.basedir>
    </properties>

    <dependencies>
        <!-- Flowable BPMN to serve HBCI dialog-->
        <dependency>
            <groupId>de.adorsys.opba</groupId>
            <artifactId>protocol-bpmn-shared</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- javadoc -->
        <dependency>
            <groupId>javax.interceptor</groupId>
            <artifactId>javax.interceptor-api</artifactId>
            <version>${javax.interceptor.api.version}</version>
        </dependency>
        <!-- end javadoc -->

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>${jetbrains.annotations.version}</version>
        </dependency>

        <!-- Spring -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
        </dependency>

        <!-- Liquibase for payment processing tables -->
        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
        </dependency>
        <!-- H2 for in-memory -->
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!-- Postgres for debugging -->
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>

        <!-- HBCI adapter start -->
        <dependency>
            <groupId>de.adorsys.multibanking</groupId>
            <artifactId>onlinebanking-hbci4java</artifactId>
            <version>${multibanking.version}</version>
        </dependency>
        <dependency>
            <groupId>org.iban4j</groupId>
            <artifactId>iban4j</artifactId>
            <version>${iban.4j.version}</version>
        </dependency>
        <!-- HBCI adapter end -->

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

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.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.protocol.sandbox.hbci.HbciServerApplication</mainClass>
                    <skip>false</skip>
                    <classifier>exec</classifier>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-remote-resources-plugin</artifactId>
                <version>${maven-remote-resources-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>bundle</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <excludeScope>test</excludeScope>
                    <includes>
                        <include>*.yml</include>
                        <include>*.sql</include>
                        <include>*.properties</include>
                        <include>*.keystore</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven.dependency.plugin.version}</version>
                <executions>
                    <execution>
                        <id>analyze</id>
                        <goals>
                            <goal>analyze-only</goal>
                        </goals>
                        <configuration>
                            <failOnWarning>false</failOnWarning>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Explicitly forcing spring-boot-configuration-processor to apply because we do not inherit from Spring parent-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <annotationProcessorPaths>
                        <annotationProcessorPath>
                            <groupId>org.springframework.boot</groupId>
                            <artifactId>spring-boot-configuration-processor</artifactId>
                            <version>${spring-boot.version}</version>
                        </annotationProcessorPath>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

