<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~  This file is part of the tock-bot-open-data distribution.
  ~  (https://github.com/theopenconversationkit/tock-bot-open-data)
  ~  Copyright (c) 2017 VSCT.
  ~
  ~  This program is free software: you can redistribute it and/or modify
  ~  it under the terms of the GNU Affero General Public License as published by
  ~  the Free Software Foundation, either version 3 of the License, or
  ~  (at your option) any later version.
  ~
  ~   This program is distributed in the hope that it will be useful,
  ~   but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~   GNU Affero General Public License for more details.
  ~
  ~   You should have received a copy of the GNU Affero General Public License
  ~   along with this program.  If not, see <http://www.gnu.org/licenses />.
  -->

<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>

    <groupId>ai.tock</groupId>
    <artifactId>tock-bot-open-data</artifactId>
    <version>23.3.2</version>
    <name>Tock Bot Open Data</name>
    <description>A example of bot built with Tock using open data APIs</description>
    <url>https://github.com/theopenconversationkit/tock-bot-open-data</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
        <testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>

        <kotlin>1.9.0</kotlin>
        <tock>23.3.2</tock>
        <byte-buddy>1.14.5</byte-buddy>
        <junit-jupiter>5.9.2</junit-jupiter>
        <mockk>1.13.5</mockk>

        <plugin.surefire>3.0.0-M7</plugin.surefire>
        <plugin.source>3.2.1</plugin.source>
        <plugin.release>3.0.0-M6</plugin.release>
        <plugin.gpg>3.0.1</plugin.gpg>
        <plugin.nexus-staging>1.6.13</plugin.nexus-staging>
        <plugin.dokka.version>1.8.20</plugin.dokka.version>

        <kotlin.compiler.jvmTarget>11</kotlin.compiler.jvmTarget>
    </properties>

    <dependencies>
        <dependency>
            <groupId>ai.tock</groupId>
            <artifactId>bot-toolkit</artifactId>
            <version>${tock}</version>
        </dependency>

        <dependency>
            <groupId>ai.tock</groupId>
            <artifactId>bot-test</artifactId>
            <version>${tock}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit-jupiter}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit-jupiter}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit-jupiter}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-test</artifactId>
            <version>${kotlin}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.mockk</groupId>
            <artifactId>mockk-jvm</artifactId>
            <version>${mockk}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy</artifactId>
                <version>${byte-buddy}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <sourceDirectory>${sourceDirectory}</sourceDirectory>
        <testSourceDirectory>${testSourceDirectory}</testSourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin}</version>

                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>

                    <execution>
                        <id>test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${plugin.surefire}</version>
                <configuration>
                    <includes>
                        <include>**/*Test.*</include>
                        <include>**/*Spec.*</include>
                        <include>**/*Fix.*</include>
                    </includes>
                    <excludes>
                        <exclude>**/*IntegrationTest.*</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${plugin.source}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${plugin.release}</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <releaseProfiles>deploy</releaseProfiles>
                    <tagNameFormat>bot-open-data-@{project.version}</tagNameFormat>
                    <preparationGoals>clean package dokka:javadocJar verify</preparationGoals>
                    <goals>package dokka:javadocJar deploy</goals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${plugin.nexus-staging}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${plugin.gpg}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.dokka</groupId>
                <artifactId>dokka-maven-plugin</artifactId>
                <version>${plugin.dokka.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>dokka</goal>
                            <goal>javadoc</goal>
                            <goal>javadocJar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>maven-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <layout>default</layout>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <inceptionYear>2017</inceptionYear>
    <organization>
        <name>theopenconversationkit</name>
    </organization>
    <developers>
        <developer>
            <id>jburet_vsct</id>
            <name>Julien Buret</name>
            <email>jburet@voyages-sncf.com</email>
            <organization>theopenconversationkit</organization>
            <organizationUrl>https://www.voyages-sncf.com/</organizationUrl>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>GNU Affero General Public License (AGPL) version 3.0</name>
            <url>https://www.gnu.org/licenses/agpl.txt</url>
            <distribution>repo</distribution>
            <comments />
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:theopenconversationkit/tock-bot-open-data.git</connection>
        <developerConnection>scm:git:git@github.com:theopenconversationkit/tock-bot-open-data.git
        </developerConnection>
        <url>git@github.com:theopenconversationkit/tock-bot-open-data.git</url>
        <tag>bot-open-data-23.3.2</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>build</id>
            <activation>
                <property>
                    <name>!deploy</name>
                </property>
            </activation>
            <properties>
                <gpg.skip>true</gpg.skip>
            </properties>
        </profile>
        <profile>
            <id>deploy</id>
            <activation>
                <property>
                    <name>deploy</name>
                </property>
            </activation>
            <properties>
                <gpg.skip>false</gpg.skip>
            </properties>
        </profile>
    </profiles>

</project>
