<?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>io.appform.testcontainer</groupId>
    <artifactId>junit-testcontainer</artifactId>
    <version>1.0.4</version>
    <packaging>pom</packaging>
    <name>Embedded Testcontainers</name>
    <description>Embedded testcontainers for data stores</description>
    <url>https://github.com/appform-io/junit-testcontainer</url>

    <modules>
        <module>junit-testcontainer-aerospike</module>
        <module>junit-testcontainer-elasticsearch</module>
        <module>junit-testcontainer-rabbitmq</module>
        <module>junit-testcontainer-commons</module>
        <module>junit-testcontainer-demo</module>
    </modules>

    <scm>
        <connection>scm:git:https://github.com/appform-io/junit-testcontainer.git</connection>
        <developerConnection>scm:git:https://github.com/appform-io/junit-testcontainer.git</developerConnection>
        <tag>HEAD</tag>
        <url>https://github.com/appform-io/junit-testcontainer.git</url>
    </scm>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>santanusinha</id>
            <name>Santanu Sinha</name>
            <email>santanu.sinha@gmail.com</email>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
        <developer>
            <id>jitendradhawan</id>
            <name>Jitendra Dhawan</name>
            <email>jitendhawan.iitd@gmail.com</email>
            <roles>
                <role>owner</role>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/appform-io/junit-testcontainer/issues</url>
    </issueManagement>

    <ciManagement>
        <system>Travis CI</system>
        <url>https://travis-ci.org/appform-io/junit-testcontainer</url>
    </ciManagement>

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


    <properties>
        <testcontainers.version>1.9.1</testcontainers.version>
        <lombok.version>1.16.16</lombok.version>
        <slf4j.version>1.7.21</slf4j.version>
        <aerospike.version>4.4.2</aerospike.version>
        <dropwizard.guicey.version>4.2.1</dropwizard.guicey.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers</artifactId>
                <version>${testcontainers.version}</version>
            </dependency>

            <dependency>
                <groupId>ru.vyarus</groupId>
                <artifactId>dropwizard-guicey</artifactId>
                <version>${dropwizard.guicey.version}</version>
            </dependency>

            <!-- Annotation Based Tools -->

            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <!-- Aerospike -->

            <dependency>
                <groupId>com.aerospike</groupId>
                <artifactId>aerospike-client</artifactId>
                <version>${aerospike.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.7</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>release</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <useAgent>true</useAgent>
                                    <executable>gpg2</executable>
                                    <!-- Run something like 'gpg2 -ab out' to cache the creds
                                     on agent before running if needed -->
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
