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

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>com.github.tony19</groupId>
    <artifactId>loggly-client</artifactId>
    <version>1.0.3</version>
    <name>loggly-client</name>
    <description>A Java REST client for Loggly</description>

    <url>http://github.com/tony19/loggly-client</url>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/tony19/loggly-client</url>
        <connection>scm:git@github.com:tony19/loggly-client.git</connection>
        <developerConnection>scm:git:git@github.com:tony19/loggly-client.git</developerConnection>
    </scm>
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/tony19/loggly-client/issues</url>
    </issueManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- redirect test output to a file in order to reduce noise -->
        <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
    </properties>

    <developers>
        <developer>
            <id>tony19</id>
            <name>Tony Trinh</name>
            <email>tony19@gmail.com</email>
            <url>http://tony19.github.com</url>
        </developer>
    </developers>

    <dependencies>
        <dependency>
            <groupId>com.jakewharton.timber</groupId>
            <artifactId>timber</artifactId>
            <version>2.5.1</version>
        </dependency>
        <dependency>
            <groupId>com.squareup.retrofit</groupId>
            <artifactId>retrofit</artifactId>
            <version>1.9.0</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>1.9.5</version>
            <scope>test</scope>
        </dependency>
    </dependencies>


    <build>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.5.1</version>
                    <configuration>
                        <showDeprecation>true</showDeprecation>
                        <showWarnings>true</showWarnings>
                        <source>1.5</source>
                        <target>1.5</target>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.14.1</version>
                    <configuration>

                        <forkCount>2</forkCount>
                        <reuseForks>true</reuseForks>
                        <parallel>classes</parallel>

                        <reportFormat>plain</reportFormat>
                        <trimStackTrace>false</trimStackTrace>

                        <excludes>
                            <!-- Ignore performance tests. They're run as part of the 'perf' profile. -->
                            <exclude>**/*PerfTest.java</exclude>

                            <!--  Disable fragile network tests to be refactored later -->
                            <exclude>**/net/*.java</exclude>
                        </excludes>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>
                    <timestampFormat>{0,date,d-MMM-yyyy HH:mm:ss Z}</timestampFormat>
                    <items>
                        <item>timestamp</item>
                    </items>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Implementation-Build>${buildNumber}</Implementation-Build>
                            <Implementation-Timestamp>${timestamp}</Implementation-Timestamp>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>testSkip</id>
            <properties>
                <maven.test.skip>true</maven.test.skip>
            </properties>
        </profile>

        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</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>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <!--
                    To disable debug compilation, debug must be "true" AND
                    debuglevel must be "none".
                    http://jira.codehaus.org/browse/MCOMPILER-114
                -->
                <maven.compiler.debug>true</maven.compiler.debug>
                <maven.compiler.debuglevel>none</maven.compiler.debuglevel>
            </properties>
        </profile>

        <profile>
            <id>debug</id>
            <properties>
                <maven.compiler.debug>true</maven.compiler.debug>
                <maven.compiler.debuglevel>lines,vars,source</maven.compiler.debuglevel>
            </properties>
        </profile>

        <profile>
            <id>analyze</id>

            <build>
                <plugins>
                    <!-- Cobertura (code coverage tool) -->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>cobertura-maven-plugin</artifactId>
                        <version>2.6</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>cobertura</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-site-plugin</artifactId>
                        <version>3.4</version>
                        <configuration>
                            <reportPlugins>
                                <!-- Cobertura (code coverage tool) -->
                                <plugin>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>cobertura-maven-plugin</artifactId>
                                    <configuration>
                                        <formats>
                                            <format>html</format>
                                            <format>xml</format>
                                        </formats>
                                    </configuration>
                                </plugin>

                                <!-- JXR (source code reference generator) -->
                                <plugin>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-jxr-plugin</artifactId>
                                    <version>2.3</version>
                                </plugin>

                                <!-- FindBugs (static code analysis tool) -->
                                <plugin>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>findbugs-maven-plugin</artifactId>
                                    <version>3.0.0</version>
                                    <configuration>
                                        <threshold>Low</threshold>
                                        <effort>Max</effort>
                                    </configuration>
                                </plugin>

                                <!-- PMD (static code analysis tool) -->
                                <plugin>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-pmd-plugin</artifactId>
                                    <version>3.4</version>
                                    <configuration>
                                        <linkXref>true</linkXref>
                                        <sourceEncoding>utf-8</sourceEncoding>
                                        <minimumTokens>100</minimumTokens>
                                        <targetJdk>1.5</targetJdk>
                                    </configuration>
                                </plugin>

                            </reportPlugins>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.3</version>
            </plugin>
        </plugins>
    </reporting>
</project>