<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.kill-bill.testing</groupId>
    <artifactId>testing-mysql-server</artifactId>
    <version>1.0.2</version>
    <packaging>jar</packaging>

    <name>testing-mysql-server</name>
    <description>Embedded MySQL server for use in tests</description>
    <url>https://github.com/killbill/testing-mysql-server</url>
    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>pierre</id>
            <name>Pierre-Alexandre Meyer</name>
            <email>pierre@mouraf.org</email>
        </developer>
        <developer>
            <id>stephane</id>
            <name>Stephane Brossier</name>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git://github.com:killbill/testing-mysql-server.git</connection>
        <developerConnection>scm:git:git@github.com:killbill/testing-mysql-server.git</developerConnection>
        <url>https://github.com/killbill/testing-mysql-server/tree/main</url>
        <tag>testing-mysql-server-1.0.2</tag>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <reload4j.version>1.2.24</reload4j.version>
        <release.auto-version-submodules>true</release.auto-version-submodules>
        <release.preparation-goals>clean verify</release.preparation-goals>
        <release.push-changes>true</release.push-changes>
        <release.release-profiles>sonatype-oss-release</release.release-profiles>
        <release.tag-name-format>@{project.artifactId}-@{project.version}</release.tag-name-format>
        <repository.release.id>sonatype-nexus-staging</repository.release.id>
        <repository.release.name>Nexus Release Repository</repository.release.name>
        <repository.release.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</repository.release.url>
        <repository.snapshot.id>sonatype-nexus-snapshots</repository.snapshot.id>
        <repository.snapshot.name>Sonatype Nexus Snapshots</repository.snapshot.name>
        <repository.snapshot.url>https://oss.sonatype.org/content/repositories/snapshots/</repository.snapshot.url>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.mysql</groupId>
            <artifactId>mysql-connector-j</artifactId>
            <version>8.0.31</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>concurrent</artifactId>
            <version>219</version>
        </dependency>

        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>units</artifactId>
            <version>1.8</version>
        </dependency>

        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>command</artifactId>
            <version>0.3</version>
        </dependency>

        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <version>5.0.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.36</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>1.7.36</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>7.6.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>

        <extensions>
            <extension>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-provider-gitexe</artifactId>
                <version>1.13.0</version>
            </extension>
            <extension>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-manager-plexus</artifactId>
                <version>1.13.0</version>
            </extension>
        </extensions>

        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>1.6.0</version>
                    <executions>
                        <execution>
                            <phase>generate-resources</phase>
                            <goals>
                                <goal>exec</goal>
                            </goals>
                            <configuration>
                                <executable>${basedir}/repack-mysql.sh</executable>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.6.1</version>
                    <configuration>
                        <source>11</source>
                        <target>11</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.0.0-M6</version>
                    <configuration>
                        <releaseProfiles>sonatype-oss-release</releaseProfiles>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <mavenExecutorId>forked-path</mavenExecutorId>
                        <pushChanges>true</pushChanges>
                        <localCheckout>true</localCheckout>
                        <preparationGoals>clean verify</preparationGoals>
                        <tagNameFormat>${release.tag-name-format}</tagNameFormat>
                        <useReleaseProfile>false</useReleaseProfile>
                        <goals>deploy</goals>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                            <configuration>
                                <gpgArguments>
                                    <arg>--pinentry-mode</arg>
                                    <arg>loopback</arg>
                                </gpgArguments>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.4.1</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                            <configuration>
                                <quiet>true</quiet>
                                <source>11</source>
                                <release>11</release>
                                <encoding>UTF-8</encoding>
                                <maxmemory>1024m</maxmemory>
                                <additionalOptions>-Xdoclint:none</additionalOptions>
                            </configuration>
                        </execution>
                    </executions>
                    <configuration>
                        <quiet>true</quiet>
                        <source>11</source>
                        <release>11</release>
                        <encoding>UTF-8</encoding>
                        <maxmemory>1024m</maxmemory>
                        <additionalOptions>-Xdoclint:none</additionalOptions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M7</version>
                    <configuration>
                        <argLine>-Xmx1024m --illegal-access=permit</argLine>
                        <runOrder>random</runOrder>
                        <skipTests>false</skipTests>
                        <useManifestOnlyJar>false</useManifestOnlyJar>
                        <trimStackTrace>false</trimStackTrace>
                        <systemPropertyVariables>
                            <user.timezone>GMT</user.timezone>
                            <org.slf4j.simpleLogger.showDateTime>true</org.slf4j.simpleLogger.showDateTime>
                            <org.slf4j.simpleLogger.dateTimeFormat>yyyy-MM-dd'T'HH:mm:ss.SSSZ
                            </org.slf4j.simpleLogger.dateTimeFormat>
                            <killbill.test.use.connection.pool>false</killbill.test.use.connection.pool>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.13</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh-releases</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
                        <keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        <stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.2.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                                <goal>test-jar-no-fork</goal>
                            </goals>
                            <phase>package</phase>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <resources>
            <resource>
                <directory>${project.build.directory}/generated-resources</directory>
            </resource>
        </resources>
    </build>

    <distributionManagement>
        <repository>
            <id>${repository.release.id}</id>
            <name>${repository.release.name}</name>
            <url>${repository.release.url}</url>
        </repository>
        <snapshotRepository>
            <id>${repository.snapshot.id}</id>
            <name>${repository.snapshot.name}</name>
            <url>${repository.snapshot.url}</url>
        </snapshotRepository>
    </distributionManagement>
    <profiles>
        <profile>
            <id>sonatype-oss-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <!-- Sonatype requires a Javadoc jar -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <skipTests>true</skipTests>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
