<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>fr.in2p3.commons</groupId>
    <artifactId>java-commons</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>Commons Java libraries</name>
    <description>Java commons libraries</description>
    <url>http://software.in2p3.fr/java-commons</url>
    <organization>
        <name>IN2P3 Computing Center</name>
        <url>http://cc.in2p3.fr</url>
    </organization>
    <licenses>
        <license>
            <name>GNU Lesser General Public License</name>
            <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
        </license>
    </licenses>

    <modules>
        <module>file-system</module>
        <module>jmockito</module>
        <module>user-support</module>
        <module>elog</module>
        <module>krb5-remctl</module>
    </modules>

    <scm>
        <connection>scm:git:git://gitlab.in2p3.fr/cc-in2p3-dev/java-commons</connection>
        <developerConnection>scm:git:ssh://gitlab.in2p3.fr/cc-in2p3-dev/java-commons</developerConnection>
        <url>https://gitlab.in2p3.fr/cc-in2p3-dev/java-commons</url>
    </scm>
    <ciManagement>
        <system>Gitlab-CI</system>
        <url>https://gitlab.in2p3.fr/cc-in2p3-dev/java-commons/builds</url>
    </ciManagement>
    <issueManagement>
        <system>Gitlab</system>
        <url>https://gitlab.in2p3.fr/cc-in2p3-dev/java-commons/issues</url>
    </issueManagement>
    <distributionManagement>
         <repository>
            <id>maven2-repository</id>
            <url>${maven.repository}</url>
         </repository>
        <site>
            <id>project-web-site</id>
            <url>${project.web.site}</url>
        </site>
    </distributionManagement>
    <profiles>
        <!-- WARNING: behavior is not the same if moved in profiles.xml -->
        <profile>
            <id>local</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <maven.repository>file:///tmp/maven.in2p3.fr/maven2</maven.repository>
                <project.web.site>file:///tmp/software.in2p3.fr/java-commons</project.web.site>
            </properties>
        </profile>
        <profile>
            <id>remote</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
            <!--
                1) The Maven deploy plugin uses wagon-ssh-external (ssh command)
                2) wagon-ssh-external DOES use the SSH client configuration.
                3) The username MUST be given in the URL AND in the settings.xml in the <server> part.
                4) When building in Jenkins, the settings.xml is created via the Configuration Files plugin
                5) When building outside Jenkins, the settings.xml DOES NOT need <password>. The local SSH configuration is used.
                6) The public key of the SFTP server must be added to the client's known_hosts file
             -->
                <maven.repository>scpexe://maven@maven.in2p3.fr/sites/maven/www/htdocs</maven.repository>
            <!--
                1) The Maven site-deploy plugin use the wagon-ssh
                2) wagon-ssh (JSch API) DOES NOT use the SSH client configuration.
                3) Giving the username in the URL DOES work, but for security reasons, it is rather given in settings.xml in the <server> part.
                4) The public key of the SFTP server must be added to the client's known_hosts file
             -->
                <project.web.site>sftp://software.in2p3.fr/www/htdocs/java-commons/${project.version}</project.web.site>
            </properties>
        </profile>
    </profiles>

    <build>
        <!-- plug-ins configuration -->
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <chmod>false</chmod>
                </configuration>
            </plugin>
        </plugins>

        <!-- directories -->
        <sourceDirectory>src</sourceDirectory>
        <resources>
            <resource>
                <directory>resources</directory>
            </resource>
        </resources>
        <testSourceDirectory>test/src</testSourceDirectory>
        <testResources>
            <testResource>
                <directory>test/resources</directory>
            </testResource>
        </testResources>
        <directory>build</directory>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>2.5</version>
            </extension>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh-external</artifactId>
                <version>2.5</version>
            </extension>
        </extensions>
    </build>
    <reporting>
        <!-- directories -->
        <outputDirectory>build/site</outputDirectory>

        <!-- plug-ins configuration -->
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.7</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <!--<report>dependencies</report>--><!-- java.lang.OutOfMemoryError: Java heap space -->
                            <report>dependency-convergence</report>
                            <report>license</report>
                            <report>summary</report>
                            <report>project-team</report>
                            <report>scm</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.3</version>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <tagListOptions>
                        <tagClasses>
                            <tagClass>
                                <displayName>Urgent Work</displayName>
                                <tags>
                                    <tag>
                                        <matchString>fixme</matchString>
                                        <matchType>ignoreCase</matchType>
                                    </tag>
                                </tags>
                            </tagClass>
                            <tagClass>
                                <displayName>Todo Work</displayName>
                                <tags>
                                    <tag>
                                        <matchString>todo</matchString>
                                        <matchType>ignoreCase</matchType>
                                    </tag>
                                </tags>
                            </tagClass>
                        </tagClasses>
                    </tagListOptions>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
</project>