<?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">
    <!--
      TIPS:

      - Use "mvn versions:display-dependency-updates" to see what dependencies
        have updates available.

      - Use "mvn versions:display-plugin-updates" to see whan plugins have
        updates available.

      - use "mvn clean install site site:stage -DstagingDirectory=$dir%"
        to stage the site with modules to a given direcotry.
    -->
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>de.weltraumschaf</groupId>
        <artifactId>organization</artifactId>
        <version>1.0.5</version>
    </parent>

    <groupId>de.weltraumschaf.commons</groupId>
    <artifactId>reactor</artifactId>
    <version>1.1.0</version>
    <packaging>pom</packaging>

    <name>Commons</name>
    <description>
        Common Utility Classes for Java.
    </description>
    <url>http://weltraumschaf.github.com/${github.name}/</url>

    <properties>
        <ci.jobName>Commons</ci.jobName>
        <github.name>commons</github.name>
        <maven.pmd.rulesetfiles>${project.basedir}/src/main/config/pmd.xml</maven.pmd.rulesetfiles>
        <maven.pmd.cpd-excludes>${project.basedir}/src/main/config/exclude-cpd.properties</maven.pmd.cpd-excludes>
        <maven.pmd.pmd-excludes>${project.basedir}/src/main/config/exclude-pmd.properties</maven.pmd.pmd-excludes>
        <maven.findbugs.excludefilterfile>${project.basedir}/src/main/config/findbugs-exclude.xml</maven.findbugs.excludefilterfile>
        <maven.findbugs.includefilterfile>${project.basedir}/src/main/config/findbugs-include.xml</maven.findbugs.includefilterfile>
    </properties>

    <prerequisites>
        <maven>${maven.version}</maven>
    </prerequisites>

    <scm>
        <connection>scm:git:git://github.com/Weltraumschaf/commons.git</connection>
        <developerConnection>scm:git:git@github.com:Weltraumschaf/commons.git</developerConnection>
        <url>https://github.com/Weltraumschaf/commons.git</url>
        <tag>1.1.0</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/Weltraumschaf/commons/issues</url>
    </issueManagement>

    <distributionManagement>
        <site>
            <id>github-project-site</id>
            <url>gitsite:git@github.com/Weltraumschaf/commons.git</url>
        </site>
    </distributionManagement>

    <ciManagement>
        <system>jenkins</system>
        <url>https://ci.weltraumschaf.de/job/Commons/</url>
    </ciManagement>

    <modules>
        <module>commons-application</module>
        <module>commons-concurrent</module>
        <module>commons-experimental</module>
        <module>commons-guava</module>
        <module>commons-shell</module>
        <module>commons-string</module>
        <module>commons-swing</module>
        <module>commons-system</module>
        <module>commons-testing</module>
        <module>commons-time</module>
        <module>commons-validate</module>
        <module>commons-jcommander</module>
        <module>commons-config</module>
    </modules>

    <dependencies>
        <dependency>
            <!-- http://findbugs.sourceforge.net/manual/annotations.html -->
            <groupId>net.sourceforge.findbugs</groupId>
            <artifactId>annotations</artifactId>
            <version>1.3.2</version>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>2.12</version>
                    <dependencies>
                        <dependency>
                            <groupId>de.weltraumschaf</groupId>
                            <artifactId>java-build-tools</artifactId>
                            <version>1.0.0</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <configLocation>de/weltraumschaf/javabuildtools/checkstyle-ruleset.xml</configLocation>
                        <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
                        <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
                        <logViolationsToConsole>true</logViolationsToConsole>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        <linkXRef>false</linkXRef>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>3.0.1</version>
                    <configuration>
                        <linkXRef>false</linkXRef>
                        <includeTests>true</includeTests>
                        <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
                        <minimumTokens>100</minimumTokens>
                        <targetJdk>${project.build.targetJdk}</targetJdk>
                    </configuration>
                    <executions>
                        <execution>
                            <id>check</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <configuration>
                                <excludeFromFailureFile>${maven.pmd.pmd-excludes}</excludeFromFailureFile>
                                <failOnViolation>false</failOnViolation>
                            </configuration>
                        </execution>
                        <execution>
                            <id>cpd-check</id>
                            <goals>
                                <goal>cpd-check</goal>
                            </goals>
                            <configuration>
                                <excludeFromFailureFile>${maven.pmd.cpd-excludes}</excludeFromFailureFile>
                                <failOnViolation>false</failOnViolation>
                                <excludes>
                                    <exclude>**/*Test.java</exclude>
                                </excludes>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <effort>Max</effort>
                        <threshold>Default</threshold>
                        <xmlOutput>true</xmlOutput>
                        <findbugsXmlOutput>true</findbugsXmlOutput>
                        <excludeFilterFile>${maven.findbugs.excludefilterfile}</excludeFilterFile>
                        <includeFilterFile>${maven.findbugs.includefilterfile}</includeFilterFile>
                        <!-- Optional directory to put findbugs xdoc xml report -->
                        <xmlOutputDirectory>target/site</xmlOutputDirectory>
                        <xmlOutput>true</xmlOutput>
                        <threshold>Low</threshold>
                        <effort>Max</effort>
                        <debug>false</debug>
                        <relaxed>false</relaxed>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.doxia</groupId>
                            <artifactId>doxia-module-markdown</artifactId>
                            <version>1.5</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <siteDirectory>${project.parent.basedir}/src/site</siteDirectory>
                    </configuration>
                </plugin>
<!--                <plugin>
                    <groupId>org.jasig.maven</groupId>
                    <artifactId>sass-maven-plugin</artifactId>
                    <version>1.1.1</version>
                </plugin>-->
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <!-- http://wiki.netbeans.org/MavenCodeCoverage -->
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/ExitCodeImpl.class</exclude>
                        <exclude>**/ApplicationException.class</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <!--http://tech-mind.blogspot.de/2009/01/configure-site-plugin-for-maven-multi.html-->
                <!--<inherited>false</inherited>-->
                <executions>
                    <execution>
                        <id>attach-descriptor</id>
                        <goals>
                            <goal>attach-descriptor</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <siteDirectory>${project.basedir}/src/site</siteDirectory>
                    <reportPlugins>
                        <plugin>
                            <artifactId>maven-jxr-plugin</artifactId>
                            <configuration>
                                <aggregate>true</aggregate>
                                <linkJavadoc>true</linkJavadoc>
                                <javadocDir>${project.reporting.outputDirectory}/apidocs</javadocDir>
                            </configuration>
                            <reportSets>
                                <reportSet>
                                    <id>main</id>
                                    <reports>
                                        <report>jxr</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>

                        <plugin>
                            <artifactId>maven-javadoc-plugin</artifactId>
                            <configuration>
                                <bottom>
                                    Copyright &amp;copy; 2012 &lt;a href="http://www.weltraumschaf.de/" target="_blank"&gt;
                                    Sven Strittmatter&lt;/a&gt;. All Rights Reserved.
                                </bottom>
                                <doctitle>${project.name} - ${project.version}</doctitle>
                                <windowtitle>${project.name} - ${project.version}</windowtitle>
                                <show>private</show>
                                <charset>${build.sourceEncoding}</charset>
                                <docencoding>${build.sourceEncoding}</docencoding>
                                <source>${source.version}</source>
                                <links>
                                    <link>http://docs.oracle.com/javase/6/docs/api/</link>
                                    <!-- test dependencies -->
                                    <link>http://junit.sourceforge.net/javadoc/</link>
                                    <link>http://docs.mockito.googlecode.com/hg/latest/</link>
                                </links>
                            </configuration>
                            <reportSets>
                                <reportSet>
                                    <id>default</id>
                                    <reports>
                                        <report>javadoc</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>

                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>versions-maven-plugin</artifactId>
                            <reportSets>
                                <reportSet>
                                    <reports>
                                        <report>dependency-updates-report</report>
                                        <report>plugin-updates-report</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>

                        <plugin>
                            <artifactId>maven-changelog-plugin</artifactId>
                        </plugin>

                        <plugin>
                            <artifactId>maven-plugin-plugin</artifactId>
                        </plugin>

                        <plugin>
                            <artifactId>maven-project-info-reports-plugin</artifactId>
                            <reportSets>
                                <reportSet>
                                    <reports>
                                        <report>index</report>
                                        <report>project-team</report>
                                        <report>license</report>
                                        <report>dependencies</report>
                                        <report>dependency-convergence</report>
                                        <report>plugin-management</report>
                                        <report>cim</report>
                                        <report>issue-tracking</report>
                                        <report>scm</report>
                                        <report>summary</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>

                        <plugin>
                            <groupId>org.jacoco</groupId>
                            <artifactId>jacoco-maven-plugin</artifactId>
                        </plugin>

                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>findbugs-maven-plugin</artifactId>
                        </plugin>

                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>javancss-maven-plugin</artifactId>
                        </plugin>

                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>jdepend-maven-plugin</artifactId>
                        </plugin>

                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>taglist-maven-plugin</artifactId>
                            <configuration>
                                <tagListOptions>
                                    <tagClasses>
                                        <tagClass>
                                            <displayName>This may be considered.</displayName>
                                            <tags>
                                                <tag>
                                                    <matchString>xxx</matchString>
                                                    <matchType>ignoreCase</matchType>
                                                </tag>
                                            </tags>
                                        </tagClass>
                                        <tagClass>
                                            <displayName>Things to do</displayName>
                                            <tags>
                                                <tag>
                                                    <matchString>todo</matchString>
                                                    <matchType>ignoreCase</matchType>
                                                </tag>
                                            </tags>
                                        </tagClass>
                                        <tagClass>
                                            <displayName>Bugs to fix</displayName>
                                            <tags>
                                                <tag>
                                                    <matchString>fixme</matchString>
                                                    <matchType>ignoreCase</matchType>
                                                </tag>
                                            </tags>
                                        </tagClass>
                                    </tagClasses>
                                </tagListOptions>
                            </configuration>
                        </plugin>
                    </reportPlugins>
                </configuration>
            </plugin>

            <!--<plugin>-->
                <!-- https://groups.google.com/forum/m/#!topic/sass-lang/YPHqCcc_l8Y -->
<!--                <groupId>org.jasig.maven</groupId>
                <artifactId>sass-maven-plugin</artifactId>
                <configuration>
                    <baseOutputDirectory>${basedir}/src/site/resources/css</baseOutputDirectory>
                    <buildDirectory>${project.build.directory}</buildDirectory>
                    <sassSourceDirectory>${basedir}/src/site/resources/sass</sassSourceDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>sassProcessSource</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>update-stylesheets</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>-->

            <!--            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <configuration>
                    <header>LICENSE</header>
                    <properties>
                        <year>2013</year>
                        <email>weltraumschaf(at)googlemail(dot)com</email>
                    </properties>
                    <encoding>UTF-8</encoding>
                    <useDefaultExcludes>true</useDefaultExcludes>
                    <strictCheck>true</strictCheck>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                        <css>SLASHSTAR_STYLE</css>
                    </mapping>
                    <excludes>
                        <exclude>.gitignore</exclude>
                        <exclude>LICENSE</exclude>
                        <exclude>**/*.md</exclude>
                        <exclude>.idea/**</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <phase>install</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>-->
        </plugins>
    </build>
</project>
