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

    <groupId>foundation.fluent.api</groupId>
    <artifactId>fluent-api-end-check</artifactId>
    <version>1.19</version>
    <modelVersion>4.0.0</modelVersion>

    <name>Fluent API sentence end check.</name>
    <description>
        Module provides annotation based Java language extensions, that helps identifying missing methods needed to end
        a chain (sentence) using fluent API already at compile time.
    </description>

    <url>https://github.com/c0stra/fluent-api-end-check/wiki/fluent-api-end-check</url>

    <licenses>
        <license>
            <name>New BSD License</name>
            <url>http://www.opensource.org/licenses/bsd-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Ondrej Fischer</name>
            <email>ondrej.fischer@gmail.com</email>
            <url>http://github.com/c0stra</url>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/c0stra/fluent-api-end-check.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/c0stra/fluent-api-end-check.git</developerConnection>
        <url>https://github.com/c0stra/fluent-api-end-check</url>
      <tag>fluent-api-end-check-1.19</tag>
  </scm>

    <properties>
        <java.version>1.8</java.version>
        <compiler.plugin.version>3.7.0</compiler.plugin.version>
        <testng.version>6.14.3</testng.version>
        <mockito.version>2.18.3</mockito.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.sun</groupId>
            <artifactId>tools</artifactId>
            <scope>system</scope>
            <systemPath>${java.home}/../lib/tools.jar</systemPath>
            <version>${java.version}</version>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>${testng.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${compiler.plugin.version}</version>
                <configuration>
                    <compilerArgument>-proc:none</compilerArgument>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</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-javadoc-plugin</artifactId>
                <version>3.0.1</version>
                <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>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <goals>deploy</goals>
                    <releaseProfiles>!testEvidence</releaseProfiles>
                </configuration>
            </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>
                    <keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
                    <stagingProgressTimeoutMinutes>15</stagingProgressTimeoutMinutes>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.0</version>
                <configuration>
                    <systemPropertyVariables>
                        <project.name>${project.name}</project.name>
                        <project.version>${project.version}</project.version>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>testEvidence</id>
            <activation><activeByDefault>true</activeByDefault></activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-scm-plugin</artifactId>
                        <version>1.10.0</version>
                        <executions>
                            <execution>
                                <id>commit test report</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>add</goal>
                                    <goal>checkin</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <includes>reports/TEST-REPORT-${project.version}.md</includes>
                            <pushChanges>true</pushChanges>
                            <message>Test report for release ${project.version}</message>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
