<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2021 Johan Haleby
  ~
  ~ 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>module-dsl</artifactId>
        <groupId>org.occurrent</groupId>
        <version>0.14.9</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>module-dsl-blocking</artifactId>

    <dependencies>
        <dependency>
            <groupId>org.occurrent</groupId>
            <artifactId>application-service-blocking</artifactId>
            <version>0.14.9</version>
        </dependency>
        <dependency>
            <groupId>org.occurrent</groupId>
            <artifactId>catchup-subscription</artifactId>
            <version>0.14.9</version>
        </dependency>
        <dependency>
            <groupId>org.occurrent</groupId>
            <artifactId>subscription-dsl-blocking</artifactId>
            <version>0.14.9</version>
        </dependency>
        <dependency>
            <groupId>org.occurrent</groupId>
            <artifactId>eventstore-api-blocking</artifactId>
            <version>0.14.9</version>
        </dependency>

        <!-- Kotlin -->
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk8</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-reflect</artifactId>
            <version>${kotlin.version}</version>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>org.occurrent</groupId>
            <artifactId>test-support</artifactId>
            <version>0.14.9</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.occurrent</groupId>
            <artifactId>cloudevent-converter-generic</artifactId>
            <version>0.14.9</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.occurrent</groupId>
            <artifactId>eventstore-inmemory</artifactId>
            <version>0.14.9</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.occurrent</groupId>
            <artifactId>subscription-inmemory</artifactId>
            <version>0.14.9</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.occurrent</groupId>
            <artifactId>command-composition</artifactId>
            <version>0.14.9</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility-kotlin</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>


    <build>
        <sourceDirectory>src/main/kotlin</sourceDirectory>
        <testSourceDirectory>src/test/kotlin</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <source>src/main/java</source>
                                <source>src/main/kotlin</source>
                                <source>src/main/resources</source>
                            </sourceDirs>
                        </configuration>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <source>src/test/java</source>
                                <source>src/test/kotlin</source>
                                <source>src/test/resources</source>
                            </sourceDirs>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <args>
                        <arg>-Xjsr305=strict</arg>
                    </args>
                    <jvmTarget>1.8</jvmTarget>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jetbrains.dokka</groupId>
                        <artifactId>dokka-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>