<!-- 
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses />.
-->
<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>fr.dudie</groupId>
    <artifactId>dudie-parent</artifactId>
    <version>1.3</version>
    <packaging>pom</packaging>

    <name>Dudie parent POM</name>
    <description>Parent POM for dudie projects</description>

    <url>https://github.com/kops/dudie-parent</url>

    <licenses>
        <license>
            <name>GNU General Public License, Version 3</name>
            <url>http://www.gnu.org/licenses/gpl.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>git@github.com:kops/dudie-parent.git</url>
        <connection>scm:git:git@github.com:kops/dudie-parent.git</connection>
        <developerConnection>scm:git:git@github.com:kops/dudie-parent.git</developerConnection>
    </scm>

    <issueManagement>
        <system>Github tracker</system>
        <url>https://github.com/kops/dudie-parent/issues</url>
    </issueManagement>

    <developers>
        <developer>
            <id>kops</id>
            <name>Jérémie Huchet</name>
            <properties>
                <contact>http://www.google.com/recaptcha/mailhide/d?k=01ZGpzgTpH16GtSj8NB93DsQ==&amp;c=WrY-DpDtsC0sd8emmUY07rAJ5IhIoRWnxieganlteL0=</contact>
            </properties>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
        <developer>
            <id>orgoz</id>
            <name>Olivier Boudet</name>
            <properties>
                <contact>http://www.google.com/recaptcha/mailhide/d?k=01ZGpzgTpH16GtSj8NB93DsQ==&amp;c=7bcMv951KPf73RPfdTZgbLRZbJvLfTOCFiCdA-kGkB8=</contact>
            </properties>
            <roles>
                <role>Developer</role>
            </roles>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <use.gpg.agent>true</use.gpg.agent>
    </properties>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.5</version>
                    <executions>
                        <execution>
                            <id>copy-resources</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${basedir}/target/classes/META-INF/maven/${project.groupId}/${project.artifactId}</outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>${basedir}</directory>
                                        <includes>
                                            <includes>LICENSE</includes>
                                            <includes>NOTICE</includes>
                                            <includes>README</includes>
                                        </includes>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.mycila.maven-license-plugin</groupId>
                    <artifactId>maven-license-plugin</artifactId>
                    <version>1.9.0</version>
                    <configuration>
                        <header>https://raw.github.com/kops/dudie-parent/master/etc/file-header-gpl.txt</header>
                        <properties>
                            <year>${project.inceptionYear}</year>
                            <owner>Dudie</owner>
                        </properties>
                        <quiet>false</quiet>
                        <failIfMissing>true</failIfMissing>
                        <aggregate>false</aggregate>
                        <includes>
                            <include>src/main/**</include>
                            <include>src/test/**</include>
                        </includes>
                        <excludes>
                            <exclude>LICENSE*</exclude>
                            <exclude>NOTICE*</exclude>
                            <exclude>README*</exclude>
                        </excludes>
                        <useDefaultExcludes>true</useDefaultExcludes>
                        <useDefaultMapping>true</useDefaultMapping>
                        <mapping>
                            <java>SLASHSTAR_STYLE</java>
                        </mapping>
                        <strictCheck>true</strictCheck>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.3.2</version>
                    <configuration>
                        <source>1.6</source>
                        <target>1.6</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.12</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.3.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.8</version>
                    <configuration>
                        <charset>UTF-8</charset>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <configLocation>https://raw.github.com/kops/dudie-parent/master/etc/dudie-checks.xml</configLocation>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.4</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>summary</report>
                            <report>project-team</report>
                            <report>issue-tracking</report>
                            <report>license</report>
                            <report>scm</report>
                            <report>distribution-management</report>
                            <report>dependencies</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <tagListOptions>
                        <tagClasses>
                            <tagClass>
                                <displayName>Todos</displayName>
                                <tags>
                                    <tag>
                                        <matchString>TODO</matchString>
                                        <matchType>exact</matchType>
                                    </tag>
                                    <tag>
                                        <matchString>TJHU</matchString>
                                        <matchType>exact</matchType>
                                    </tag>
                                    <tag>
                                        <matchString>TOBO</matchString>
                                        <matchType>exact</matchType>
                                    </tag>
                                </tags>
                            </tagClass>
                        </tagClasses>
                    </tagListOptions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <configLocation>${basedir}/checkstyle.xml</configLocation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <instrumentation>
                        <excludes>
                            <exclude>fr/dudie/**/*Test.class</exclude>
                        </excludes>
                    </instrumentation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.9</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.3</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8</version>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <!--  this profile is activated when using 'mvn release:prepare' and 'mvn release:perform' --> 
            <!--  it signs artifacts before staging to Sonatype -->
            <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-source-plugin</artifactId>
                        <version>2.1.2</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.8</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.1</version>
                        <configuration>
                            <useAgent>${use.gpg.agent}</useAgent>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
