<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>xs2a-protocol-tests</artifactId>
        <version>0.30.0.1</version>
    </parent>

    <!-- BDD Tests for protocol running on top of Wiremock-based response-request fixtures -->
    <artifactId>xs2a-bdd-wiremock</artifactId>
    <name>opba-protocols/xs2a-protocol-tests/xs2a-bdd-wiremock</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/xs2a-protocol-tests/xs2a-bdd-wiremock -->
        <main.basedir>${project.parent.parent.parent.basedir}</main.basedir>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>

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

        <dependency>
            <groupId>de.adorsys.opba</groupId>
            <artifactId>xs2a-bdd-tests-common</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>

        <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>com.github.tomakehurst</groupId>
            <artifactId>wiremock</artifactId>
            <version>${wiremock.version}</version>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>postgresql</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${testcontainers.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.artifactId}-${project.version}</finalName>
        <plugins>
            <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>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-remote-resources-plugin</artifactId>
                <version>${maven-remote-resources-plugin.version}</version>
                <configuration>
                    <resourceBundles>
                        <resourceBundle>de.adorsys.opba:xs2a-bdd-tests-common:${project.version}</resourceBundle>
                    </resourceBundles>
                    <includes>
                        <include>mockedsandbox/**/*.*</include>
                        <include>**/*.yml</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>process</goal>
                            <goal>bundle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

