<?xml version="1.0" encoding="UTF-8"?>
<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>org.panteleyev</groupId>
    <artifactId>java-api-for-mysql</artifactId>
    <version>1.5.1</version>
    <packaging>jar</packaging>
    <name>${project.groupId}:${project.artifactId}</name>
    <description>Annotation based Java API for MySQL database.</description>
    <url>https://github.com/petr-panteleyev/java-api-for-mysql</url>
    <licenses>
        <license>
            <name>The 2-Clause BSD License</name>
            <url>https://opensource.org/licenses/BSD-2-Clause</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Petr Panteleyev</name>
            <email>petr@panteleyev.org</email>
            <organization>panteleyev.org</organization>
            <organizationUrl>https://github.com/petr-panteleyev</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git://github.com/petr-panteleyev/java-api-for-mysql.git</connection>
        <developerConnection>scm:git:ssh://github.com:petr-panteleyev/java-api-for-mysql.git</developerConnection>
        <url>https://github.com/petr-panteleyev/java-api-for-mysql/tree/master</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.release>16</maven.compiler.release>
        <mysqlConnectorVersion>8.0.23</mysqlConnectorVersion>
        <gsonVersion>2.8.6</gsonVersion>
        <mockitoVersion>3.2.0</mockitoVersion>
        <testNgVersion>7.3.0</testNgVersion>
        <!-- Plugins -->
        <mavenToolchainPluginVersion>3.0.0</mavenToolchainPluginVersion>
        <mavenCompilerPluginVersion>3.8.1</mavenCompilerPluginVersion>
        <mavenSurefirePluginVersion>3.0.0-M5</mavenSurefirePluginVersion>
        <mavenSourcePluginVersion>3.2.0</mavenSourcePluginVersion>
        <mavenJavadocPluginVersion>3.2.0</mavenJavadocPluginVersion>
        <mavenGpgPluginVersion>1.6</mavenGpgPluginVersion>
        <nexusStagingMavenPlugin>1.6.8</nexusStagingMavenPlugin>
        <!-- Test properties -->
        <test.mysql.host>localhost</test.mysql.host>
        <test.mysql.port>3306</test.mysql.port>
        <test.mysql.database>TestDB</test.mysql.database>
        <test.mysql.user>_define_mysql_user_</test.mysql.user>
        <test.mysql.password>_define_mysql_user_</test.mysql.password>
    </properties>

    <dependencies>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>${mysqlConnectorVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>${testNgVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockitoVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>${gsonVersion}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${mavenCompilerPluginVersion}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${mavenSourcePluginVersion}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${mavenSurefirePluginVersion}</version>
                <configuration>
                    <argLine>
                        -Dmysql.host=${test.mysql.host}
                        -Dmysql.port=${test.mysql.port}
                        -Dmysql.user=${test.mysql.user}
                        -Dmysql.password=${test.mysql.password}
                        -Dmysql.database=${test.mysql.database}
                    </argLine>
                    <suiteXmlFiles>
                        <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${mavenJavadocPluginVersion}</version>
                <configuration>
                    <notimestamp>true</notimestamp>
                    <author>false</author>
                    <bottom><![CDATA[Copyright &copy; 2018, 2021, Petr Panteleyev]]></bottom>
                    <additionalOptions>-html5 --release ${maven.compiler.release}</additionalOptions>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${mavenGpgPluginVersion}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${nexusStagingMavenPlugin}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
