<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2018-2020 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.10</version>
		<relativePath>../pom.xml</relativePath>
	</parent>

	<properties>
		<ruleset.basedir>../..</ruleset.basedir>
		<ci.build.number>&#8203;</ci.build.number>
	</properties>

	<modelVersion>4.0.0</modelVersion>

	<artifactId>cms-standalone-service</artifactId>


	<dependencies>
		<!-- project dependencies -->
		<dependency>
			<groupId>de.adorsys.psd2</groupId>
			<artifactId>consent-management-lib</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>de.adorsys.psd2</groupId>
			<artifactId>consent-xs2a-web</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>de.adorsys.psd2</groupId>
			<artifactId>consent-psu-web</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>de.adorsys.psd2</groupId>
			<artifactId>consent-aspsp-web</artifactId>
			<version>${project.version}</version>
		</dependency>

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

		<dependency>
			<groupId>de.adorsys.psd2</groupId>
			<artifactId>cms-db-schema</artifactId>
			<version>${project.version}</version>
		</dependency>

        <dependency>
            <groupId>de.adorsys.psd2</groupId>
            <artifactId>cms-scheduler-service</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>de.adorsys.psd2</groupId>
            <artifactId>cms-payment-support-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>de.adorsys.psd2</groupId>
            <artifactId>event-service-xs2a-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>de.adorsys.psd2</groupId>
            <artifactId>event-service-aspsp-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>de.adorsys.psd2</groupId>
            <artifactId>event-service-persist-db-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>de.adorsys.psd2</groupId>
            <artifactId>event-service-db-report-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

		<!-- other dependencies -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
			<exclusions>
                <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-entitymanager</artifactId>
                </exclusion>
				<exclusion>
					<groupId>org.hibernate</groupId>
					<artifactId>hibernate-core</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>

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

		<dependency>
			<groupId>org.liquibase</groupId>
			<artifactId>liquibase-core</artifactId>
		</dependency>

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

		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<scope>runtime</scope>
			<optional>true</optional>
		</dependency>

        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
        </dependency>

        <dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- test dependencies -->
        <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>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>de.adorsys.psd2</groupId>
            <artifactId>json-reader</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
	</dependencies>

	<build>
		<finalName>consent-management</finalName>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<version>${spring-boot.version}</version>
				<configuration>
					<includeSystemScope>true</includeSystemScope>
				</configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>build-info</id>
                        <goals>
                            <goal>build-info</goal>
                        </goals>
                        <configuration>
                            <additionalProperties>
                                <java.version>${java.version}</java.version>
                                <build.number>${ci.build.number}</build.number>
                            </additionalProperties>
                        </configuration>
                    </execution>
                </executions>
			</plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <!-- Fix failsafe and spring-boot repackage not working together -->
                <configuration>
                    <classesDirectory>${project.build.directory}/${project.build.finalName}.jar.original</classesDirectory>
                </configuration>
            </plugin>
		</plugins>
	</build>
</project>
