<?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>org.n52</groupId>
    <artifactId>parent</artifactId>
    <version>10</version>

    <packaging>pom</packaging>

    <modules>
        <module>checkstyle-configuration</module>
    </modules>

    <name>52°North Maven Parent Project</name>
    <description>52°North Maven Parent Project</description>
    <url>https://github.com/52North/maven-parents</url>

    <inceptionYear>2015</inceptionYear>

    <organization>
        <name>52°North Initiative for Geospatial Open Source Software GmbH</name>
        <url>http://52north.org</url>
    </organization>

    <developers>
        <developer>
            <id>autermann</id>
            <name>Christian Autermann</name>
            <email>c.autermann@52north.org</email>
            <organization>${project.organization.name}</organization>
            <organizationUrl>${project.organization.url}</organizationUrl>
            <timezone>GMT+1</timezone>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/52North/maven-parents</url>
        <connection>scm:git:https://github.com/52North/maven-parents.git</connection>
        <developerConnection>scm:git:https://github.com/52North/maven-parents.git</developerConnection>
        <tag>v10</tag>
    </scm>

    <issueManagement>
        <system>GitHub issues</system>
        <url>https://github.com/52North/maven-parents/issues?state=open</url>
    </issueManagement>

    <ciManagement>
        <system>Travis CI</system>
        <url>https://travis-ci.org/52North/maven-parents</url>
    </ciManagement>

    <distributionManagement>
        <repository>
            <id>sonatype-nexus-releases</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <licenses>
        <license>
            <name>The Apache Software 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>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <version.java>1.8</version.java>
    </properties>

    <build>
        <defaultGoal>install</defaultGoal>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <inherited>false</inherited>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>analyze-dependencies</id>
                        <goals>
                            <goal>analyze-only</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.github.dantwining.whitespace-maven-plugin</groupId>
                <artifactId>whitespace-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>trim</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.8</version>
                    <configuration>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <serverId>sonatype-nexus-snapshots</serverId>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                    <configuration>
                        <useAgent>true</useAgent>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <tagNameFormat>v@{project.version}</tagNameFormat>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <releaseProfiles>check,sign</releaseProfiles>
                        <localCheckout>true</localCheckout>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.groovy.maven</groupId>
                    <artifactId>gmaven-plugin</artifactId>
                    <version>1.0</version>
                </plugin>

                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>3.0</version>
                    <configuration>
                        <aggregate>true</aggregate>
                        <includes>
                            <include>**/*.java</include>
                            <include>**/*.xml</include>
                        </includes>
                        <strictCheck>true</strictCheck>
                        <mapping>
                            <java>SLASHSTAR_STYLE</java>
                        </mapping>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>pl.project13.maven</groupId>
                    <artifactId>git-commit-id-plugin</artifactId>
                    <version>2.2.3</version>
                    <configuration>
                        <dateFormat>yyyy-MM-dd HH:mm:ssZ</dateFormat>
                        <gitDescribe>
                            <skip>true</skip>
                        </gitDescribe>
                        <timestampFormat>{0,date,yyyy-MM-dd HH:mm:ss}</timestampFormat>
                        <failOnNoGitDirectory>false</failOnNoGitDirectory>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.jasig.maven</groupId>
                    <artifactId>maven-notice-plugin</artifactId>
                    <version>1.0.6.1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.7.0</version>
                    <configuration>
                        <compilerArgument>-Xlint:all</compilerArgument>
                        <showWarnings>true</showWarnings>
                        <showDeprecation>true</showDeprecation>
                        <compilerVersion>${version.java}</compilerVersion>
                        <source>${version.java}</source>
                        <target>${version.java}</target>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.0.2</version>
                    <configuration>
                        <ignoreNonCompile>true</ignoreNonCompile>
                        <failOnWarning>true</failOnWarning>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.4.1</version>
                    <configuration>
                        <rules>
                            <dependencyConvergence />
                            <reactorModuleConvergence />
                            <requireNoRepositories>
                                <banRepositories>true</banRepositories>
                                <banPluginRepositories>false</banPluginRepositories>
                                <allowSnapshotRepositories>false</allowSnapshotRepositories>
                                <allowSnapshotPluginRepositories>false</allowSnapshotPluginRepositories>
                                <allowedRepositories>
                                    <id>sonatype-nexus-snapshots</id>
                                </allowedRepositories>
                                <allowedPluginRepositories />
                            </requireNoRepositories>
                            <requireJavaVersion>
                                <version>[${version.java},)</version>
                            </requireJavaVersion>
                            <requirePluginVersions>
                                <banLatest>true</banLatest>
                                <banRelease>true</banRelease>
                                <banSnapshots>true</banSnapshots>
                                <phases>clean,deploy</phases>
                            </requirePluginVersions>
                        </rules>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.4</version>
                    <configuration>
                        <show>package</show>
                        <author>false</author>
                        <quiet>true</quiet>
                        <nohelp>true</nohelp>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.20.1</version>
                </plugin>

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

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </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-clean-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.6</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>

                <plugin>
                    <groupId>com.github.dantwining.whitespace-maven-plugin</groupId>
                    <artifactId>whitespace-maven-plugin</artifactId>
                    <version>1.0.4</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>3.0.5</version>
                    <configuration>
                        <!--<excludeFilterFile>etc/findbugs-exclude.xml</excludeFilterFile>-->
                        <!--<includeFilterFile>etc/findbugs-include.xml</includeFilterFile>-->
                        <!--<visitors></visitors>-->
                        <!--<omitVisitors></omitVisitors>-->
                        <!--<maxRank></maxRank>-->
                        <failOnError>true</failOnError>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>2.17</version>
                    <configuration>
                        <consoleOutput>true</consoleOutput>
                        <!--<logViolationsToConsole>true</logViolationsToConsole>-->
                        <failOnViolation>true</failOnViolation>
                        <violationSeverity>error</violationSeverity>
                        <excludes>${project.build.directory}/generated-sources/**/*.java</excludes>
                        <configLocation>checkstyle.xml</configLocation>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>8.0</version>
                        </dependency>
                        <dependency>
                            <groupId>org.n52</groupId>
                            <artifactId>checkstyle-configuration</artifactId>
                            <version>10</version>
                        </dependency>
                    </dependencies>
                </plugin>

            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>sign</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <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>
        <profile>
            <id>check</id>
            <activation>
                <property>
                    <name>env.CI</name>
                    <value>true</value>
                </property>
                <file>
                    <missing>.skip-check</missing>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>findbugs-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
