<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.noodlesandwich</groupId>
    <artifactId>rekord-parent</artifactId>
    <version>0.3</version>
    <packaging>pom</packaging>

    <name>Rekord Parent</name>
    <description>Records in Java. Useful as a replacement for Java beans/value objects/type-safe maps that requires less code.</description>
    <url>https://github.com/SamirTalwar/Rekord</url>

    <properties>
        <dependencies.pcollections.version>2.1.2</dependencies.pcollections.version>
        <dependencies.hamcrest.version>1.3</dependencies.hamcrest.version>
        <dependencies.guava.version>17.0</dependencies.guava.version>
        <dependencies.jackson.version>2.4.1</dependencies.jackson.version>
        <dependencies.junit.version>4.11</dependencies.junit.version>
        <dependencies.xml-matchers.version>1.0-RC1</dependencies.xml-matchers.version>
        <dependencies.jsonassert.version>1.2.3</dependencies.jsonassert.version>

        <checkstyle.configuration>build/checkstyle.xml</checkstyle.configuration>
        <checkstyle.suppressions>build/checkstyle-suppressions.xml</checkstyle.suppressions>
    </properties>

    <modules>
        <module>core</module>
        <module>test-support</module>
        <module>keys</module>
        <module>validation</module>
        <module>all</module>

        <module>jackson</module>
    </modules>

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

    <licenses>
        <license>
            <name>The MIT License (MIT)</name>
            <url>http://samirtalwar.mit-license.org/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:SamirTalwar/Rekord.git</connection>
        <developerConnection>scm:git:git@github.com:SamirTalwar/Rekord.git</developerConnection>
        <url>git@github.com:SamirTalwar/Rekord.git</url>
        <tag>HEAD</tag>
    </scm>

    <distributionManagement>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Staging Repository</name>
            <url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <developers>
        <developer>
            <id>SamirTalwar</id>
            <name>Samir Talwar</name>
            <email>samir@noodlesandwich.com</email>
        </developer>
    </developers>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <compilerArgument>-Xlint:all</compilerArgument>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                    <xmlOutput>true</xmlOutput>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.12.1</version>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <configLocation>${checkstyle.configuration}</configLocation>
                            <suppressionsLocation>${checkstyle.suppressions}</suppressionsLocation>
                            <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
                            <encoding>UTF-8</encoding>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </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-release-plugin</artifactId>
                        <version>2.4.1</version>
                        <configuration>
                            <tagNameFormat>v@{project.version}</tagNameFormat>
                            <mavenExecutorId>forked-path</mavenExecutorId>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
