<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2018-2019 adorsys GmbH & Co KG
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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">
    <parent>
        <artifactId>consent-management</artifactId>
        <groupId>de.adorsys.psd2</groupId>
        <version>5.9</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>consent-management-lib</artifactId>

    <properties>
        <ruleset.basedir>../..</ruleset.basedir>
    </properties>

    <dependencies>

        <!-- project dependencies -->
        <dependency>
            <groupId>de.adorsys.psd2</groupId>
            <artifactId>consent-xs2a-api</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>de.adorsys.psd2</groupId>
            <artifactId>consent-aspsp-api</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>de.adorsys.psd2</groupId>
            <artifactId>aspsp-profile-api</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>de.adorsys.psd2</groupId>
            <artifactId>consent-psu-api</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>de.adorsys.psd2</groupId>
            <artifactId>xs2a-object-mapper</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>de.adorsys.psd2</groupId>
            <artifactId>xs2a-core-payments</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>de.adorsys.psd2</groupId>
            <artifactId>json-reader</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- spring dependencies -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-jpa</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.aspectj</groupId>
                    <artifactId>aspectjrt</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- other dependencies -->
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.mariadb.jdbc</groupId>
            <artifactId>mariadb-java-client</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-java8</artifactId>
        </dependency>

        <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>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <dependency>
            <groupId>com.nimbusds</groupId>
            <artifactId>nimbus-jose-jwt</artifactId>
        </dependency>

        <!-- test dependencies -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>

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

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

        <dependency>
            <groupId>com.tngtech.archunit</groupId>
            <artifactId>archunit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven-enforcer-plugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce-banned-dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>de.adorsys.psd2:consent-management</exclude>
                                        <exclude>de.adorsys.psd2:cms-db-schema</exclude>
                                        <exclude>de.adorsys.psd2:cms-standalone-service</exclude>
                                        <exclude>de.adorsys.psd2:consent-aspsp-web</exclude>
                                        <exclude>de.adorsys.psd2:consent-core-web</exclude>
                                        <exclude>de.adorsys.psd2:consent-xs2a-web</exclude>
                                        <exclude>de.adorsys.psd2:consent-psu-web</exclude>
                                        <exclude>de.adorsys.psd2:consent-psu-client</exclude>
                                        <exclude>de.adorsys.psd2:consent-management-lib</exclude>
                                        <exclude>de.adorsys.psd2:consent-management-remote</exclude>
                                        <exclude>de.adorsys.psd2:consent-api</exclude>
                                        <exclude>de.adorsys.psd2:consent-management-system</exclude>
                                        <exclude>de.adorsys.psd2:cms-client</exclude>
                                        <exclude>de.adorsys.psd2:xs2a-server-api</exclude>
                                        <exclude>de.adorsys.psd2:xs2a-impl</exclude>
                                        <exclude>de.adorsys.psd2:spi-api</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
