<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>
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>

    <prerequisites>
        <maven>3.1.1</maven>
    </prerequisites>

    <groupId>com.omertron</groupId>
    <artifactId>API-OMDB</artifactId>
    <version>1.5</version>
    <packaging>jar</packaging>

    <name>API-Open Movie Database</name>
    <description>API for the omdbapi.com website</description>
    <url>https://github.com/Omertron/api-omdb</url>
    <inceptionYear>2013</inceptionYear>

    <developers>
        <developer>
            <name>Stuart Boston</name>
            <email>omertron@gmail.com</email>
            <id>omertron</id>
            <url>http://omertron.com</url>
            <timezone>0</timezone>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>GNU General Public License v3+</name>
            <url>http://www.gnu.org/licenses/gpl-3.0-standalone.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>scm:git:git@github.com:Omertron/api-omdb.git</url>
        <connection>scm:git:git@github.com:Omertron/api-omdb.git</connection>
        <developerConnection>scm:git:git@github.com:Omertron/api-omdb.git</developerConnection>
    </scm>

    <distributionManagement>
        <site>
            <id>github-project-site</id>
            <name>GitHub Project Pages</name>
            <url>gitsite:git@github.com/Omertron/api-omdb.git</url>
        </site>
    </distributionManagement>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/Omertron/api-omdb/issues</url>
    </issueManagement>

    <ciManagement>
        <system>Jenkins CI</system>
        <url>http://jenkins.omertron.com/job/API-OMDB/</url>
    </ciManagement>

    <properties>
        <skipTests>false</skipTests>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <distribution.format>zip</distribution.format>
        <version.jackson>2.8.7</version.jackson>
        <version.slf4j>1.7.24</version.slf4j>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
        <timestamp>${maven.build.timestamp}</timestamp>
        <maven.build.timestamp.format>yyyy-MM-dd-HHmm</maven.build.timestamp.format>
    </properties>

    <dependencies>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.10</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.4</version>
        </dependency>
        <!--TESTING-->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <!--JSON-->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${version.jackson}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>${version.jackson}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${version.jackson}</version>
        </dependency>
        <!--LOGGING-->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${version.slf4j}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jdk14</artifactId>
            <version>${version.slf4j}</version>
            <scope>test</scope>
        </dependency>
        <!--COMMON HTTP TOOLS-->
        <dependency>
            <groupId>org.yamj</groupId>
            <artifactId>api-common</artifactId>
            <version>2.1</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <finalName>${project.artifactId}-${project.version}-${timestamp}-${git.commit.id.abbrev}</finalName>

        <resources>
            <resource>
                <directory>src/main/resources/</directory>
                <filtering>true</filtering>
                <includes>
                    <include>version.txt</include>
                </includes>
            </resource>
        </resources>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.5.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.5</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.19.1</version>
                </plugin>
                <plugin>
                    <groupId>pl.project13.maven</groupId>
                    <artifactId>git-commit-id-plugin</artifactId>
                    <version>2.2.4</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
                    <dateFormat>yyyy-MM-dd HH:mm:ss z</dateFormat>
                    <abbrevLength>7</abbrevLength>
                    <injectAllReactorProjects>true</injectAllReactorProjects>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Specification-Title>${project.name}</Specification-Title>
                            <Specification-Version>${project.version}</Specification-Version>
                            <Implementation-Version>${buildNumber}</Implementation-Version>
                            <Implementation-Title>${timestamp}</Implementation-Title>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- To skip tests by default -->
                    <skipTests>${skipTests}</skipTests>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>distro-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/resources/bin.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <failOnError>true</failOnError>
                    <verbose>true</verbose>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <reportPlugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-project-info-reports-plugin</artifactId>
                            <reports>
                                <report>index</report>
                                <report>scm</report>
                                <report>issue-tracking</report>
                                <report>help</report>
                                <report>dependency-convergence</report>
                                <report>summary</report>
                                <report>dependency-management</report>
                                <report>dependencies</report>
                                <report>license</report>
                                <report>modules</report>
                            </reports>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                        </plugin>
                    </reportPlugins>
                </configuration>
            </plugin>

        </plugins>

        <extensions>
            <extension>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-provider-gitexe</artifactId>
                <version>1.9.4</version>
            </extension>
            <extension>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-manager-plexus</artifactId>
                <version>1.9.4</version>
            </extension>
            <extension>
                <groupId>org.kathrynhuxtable.maven.wagon</groupId>
                <artifactId>wagon-gitsite</artifactId>
                <version>0.3.1</version>
            </extension>
        </extensions>

    </build>

</project>
