<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.paris.lutece.tools</groupId>
    <artifactId>lutece-global-pom</artifactId>
    <name>Lutece global pom</name>
    <url>http://dev.lutece.paris.fr/</url> 
    <packaging>pom</packaging>
    <version>3.0.4</version>
    
    <properties>
        <memory.min>128m</memory.min>
        <memory.max>896m</memory.max>
        <targetJdk>1.7</targetJdk>
        <java.source.version>1.7</java.source.version>
        <sonar.host.url>http://dev.lutece.paris.fr/sonar</sonar.host.url>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
        <maven-site-plugin.version>3.5.1</maven-site-plugin.version>
        <maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version>
        <maven-pmd-plugin.version>3.6</maven-pmd-plugin.version>
        <maven-findbugs-plugin.version>3.0.3</maven-findbugs-plugin.version>
        <maven-formatter-plugin.version>0.5.2</maven-formatter-plugin.version>
        <maven-war-plugin.version>2.6</maven-war-plugin.version>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
        <maven-cobertura-plugin.version>2.7</maven-cobertura-plugin.version>
        <maven-javadoc-plugin.version>2.10.3</maven-javadoc-plugin.version>
        <maven-surefire-report-plugin.version>2.19.1</maven-surefire-report-plugin.version>
        <maven-jxr-plugin.version>2.5</maven-jxr-plugin.version>
        <maven-compiler-plugin.version>3.1</maven-compiler-plugin.version>
        <maven-jdepend-plugin.version>2.0</maven-jdepend-plugin.version>
        <maven-taglist-plugin.version>2.4</maven-taglist-plugin.version>
        <maven-javancss-plugin.version>2.1</maven-javancss-plugin.version>
        <maven-lutece-plugin.version>4.0.1</maven-lutece-plugin.version>
        <maven-xdoc2md-plugin.version>1.0.0</maven-xdoc2md-plugin.version>
        <serverUrl>dev.lutece.paris.fr</serverUrl>
        <jiraBaseUrl>http://${serverUrl}/jira</jiraBaseUrl>
        <organization.logo>http://dev.lutece.paris.fr/images/banner_left.png</organization.logo>
        <build-config.location>build-config</build-config.location> <!-- directory provided by the artifact fr.paris.lutece.tools:build-config -->
        <github.project>lutece-platform</github.project>
        <twitter.account>LuteceFoundry</twitter.account>
        <openhub.id>7203</openhub.id>
        <jiraProjectName>GLOBALPOM</jiraProjectName>
        <jiraComponentId>12858</jiraComponentId>
        
    </properties>

                
    <licenses>
        <license>
            <name>Lutece license</name>
            <url>http://dev.lutece.paris.fr/LICENSE.TXT</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

  
    <organization>
        <name>City of Paris</name>
        <url>http://lutece.paris.fr</url>
    </organization>
  
    <issueManagement>
        <system>jira</system>
        <url>${jiraBaseUrl}/browse/${jiraProjectName}</url>
    </issueManagement>
  
    <ciManagement>
        <system>continuum</system>
        <url>http://${serverUrl}/jenkins/</url>
        <notifiers>
            <notifier>
                <type>mail</type>
                <configuration>
                    <address>lutece@paris.fr</address>
                </configuration>
            </notifier>
        </notifiers>
    </ciManagement>
    
    <repositories>
        <repository>
            <id>lutece</id>
            <name>luteceRepository</name>
            <url>http://${serverUrl}/maven_repository</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>luteceSnapshot</id>
            <name>luteceSnapshot</name>
            <url>http://${serverUrl}/snapshot_repository</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
  
    <pluginRepositories>
        <pluginRepository>
            <id>lutece</id>
            <name>luteceRepository</name>
            <url>http://${serverUrl}/maven_repository</url>
        </pluginRepository>
        <pluginRepository>
            <id>luteceSnapshot</id>
            <name>luteceSnapshot</name>
            <url>http://${serverUrl}/snapshot_repository</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <dependencies>
        <dependency>    
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>fr.paris.lutece.plugins</groupId>
            <artifactId>library-lutece-unit-testing</artifactId>
            <version>2.0.8</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
    </dependencies>


    <build>
        <sourceDirectory>src/java</sourceDirectory>

        <resources>
            <resource>
                <directory>src/java</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                    <exclude>**/.svn/**</exclude>
                </excludes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven-release-plugin.version}</version>
                <configuration>
                    <providerImplementations>
                        <git>jgit</git>
                    </providerImplementations>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-jgit</artifactId>
                        <version>1.9.2</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>${maven-site-plugin.version}</version>
                <configuration>
                    <inputEncoding>UTF-8</inputEncoding>
                    <outputEncoding>UTF-8</outputEncoding>
                    <locales>en,fr</locales>
                    <reportPlugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                            <version>${maven-javadoc-plugin.version}</version>
                            <configuration>
                                <minmemory>${memory.min}</minmemory>
                                <maxmemory>${memory.max}</maxmemory>
                        <!--        <additionalparam>-Xdoclint:none</additionalparam> For Java8 -->
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-jxr-plugin</artifactId>
                            <version>${maven-jxr-plugin.version}</version>
                            <configuration>
                                <outputEncoding>UTF-8</outputEncoding>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-project-info-reports-plugin</artifactId>
                            <version>2.8</version>
                            <reportSets>
                                <reportSet>
                                    <reports>
                                        <report>index</report>
                                        <report>summary</report>
                                        <!-- <report>dependencies</report> --> <!-- Removed in order to remove the jboss black listed repository when executing "mvn site" -->
                                        <report>cim</report>
                                        <report>issue-tracking</report>
                                        <report>license</report>
                                        <report>scm</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-checkstyle-plugin</artifactId>
                            <version>${maven-checkstyle-plugin.version}</version>
                            <reportSets>
                                <reportSet>
                                    <reports>
                                        <report>checkstyle</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>
                        
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-pmd-plugin</artifactId>
                            <version>${maven-pmd-plugin.version}</version>
                        </plugin>
                        

                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>jdepend-maven-plugin</artifactId>
                            <version>${maven-jdepend-plugin.version}</version>
                        </plugin>

                        <!-- Build fails Error parsing changelog.xml : An invalid XML character (Unicode: 0x1b) was found in the CDATA section.
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-changelog-plugin</artifactId>
                            <version>2.3</version>
                            <reportSets>
                                <reportSet>
                                    <id>dual-report</id>
                                    <configuration>
                                        <type>range</type>
                                        <range>30</range>
                                    </configuration>
                                    <reports>
                                        <report>changelog</report>
                                        <report>file-activity</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>
                        -->
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>taglist-maven-plugin</artifactId>
                            <version>${maven-taglist-plugin.version}</version>
                            <configuration>
                                <tags>
                                    <tag>TODO</tag>
                                    <tag>FIXME</tag>
                                    <tag>@todo</tag>
                                    <tag>@deprecated</tag>
                                    <tag>DOCUMENT_ME</tag>
                                    <tag>NOT_YET_DOCUMENTED</tag>
                                </tags>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>javancss-maven-plugin</artifactId>
                            <version>${maven-javancss-plugin.version}</version>
                        </plugin>
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>findbugs-maven-plugin</artifactId>
                            <version>${maven-findbugs-plugin.version}</version>
                        </plugin>
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>cobertura-maven-plugin</artifactId>
                            <version>${maven-cobertura-plugin.version}</version>
                            <configuration>
                                <instrumentation>
                                    <ignores>
                                        <ignore>fr.paris.lutece.portal.web.constants.*</ignore>
                                    </ignores>
                                </instrumentation>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-report-plugin</artifactId>
                            <version>${maven-surefire-report-plugin.version}</version>
                        </plugin>
                        <plugin>
                            <groupId>org.codehaus.sonar-plugins</groupId>
                            <artifactId>maven-report</artifactId>
                            <version>0.1</version>
                        </plugin>
                    </reportPlugins>
                </configuration>

                <executions>
                    <execution>
                        <id>attach-descriptor</id>
                        <goals>
                            <goal>attach-descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>fr.paris.lutece.tools</groupId>
                <artifactId>lutece-maven-plugin</artifactId>
                <extensions>true</extensions>
                <version>${maven-lutece-plugin.version}</version>
                <configuration>
                    <localConfDirectory>${localConfDirectory}</localConfDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>fr.paris.lutece.tools</groupId>
                <artifactId>xdoc2md-maven-plugin</artifactId>
                <version>${maven-xdoc2md-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <source>${java.source.version}</source>
                    <target>${java.source.version}</target>
                </configuration>
            </plugin>
            <!-- Deprecated -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jalopy-maven-plugin</artifactId>
                <version>1.0-alpha-1</version>
                <configuration>
                    <convention>${build-config.location}/jalopy_mdp.xml</convention>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.17</version>
                <configuration>
                    <excludes>
                        <exclude>**/MainTest.java</exclude>
                        <exclude>**/TestRunner.java</exclude>
                        <exclude>**/LuteceTestCase.java</exclude>
                    </excludes>
                    <systemProperties>
                        <property>
                            <name>net.sourceforge.cobertura.datafile</name>
                            <value>target/cobertura/cobertura.ser</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>${maven-cobertura-plugin.version}</version>
                <configuration>
                    <formats>
                        <format>html</format>
                        <format>xml</format>
                    </formats>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>${maven-surefire-report-plugin.version}</version>
                <configuration>
                    <showSuccess>true</showSuccess>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>${maven-antrun-plugin.version}</version>
                <configuration>
                    <tasks>
                        <ant antfile="${basedir}/target/lutece/WEB-INF/sql/build.xml" dir="${basedir}/target/lutece/WEB-INF/sql/">
                            <target name="all" />
                        </ant>
                    </tasks>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>ant</groupId>
                        <artifactId>ant-optional</artifactId>
                        <version>1.5.3-1</version>
                    </dependency>
                </dependencies>
            </plugin>
			
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>${maven-war-plugin.version}</version>
                <configuration>
                    <warSourceDirectory>${basedir}/webapp</warSourceDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.revelc.code</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
            </plugin>
        </plugins>
        
   
        
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${maven-checkstyle-plugin.version}</version>
                    <configuration>
                        <minmemory>${memory.min}</minmemory>
                        <maxmemory>${memory.max}</maxmemory>
                        <configLocation>${build-config.location}/lutece_checks.xml</configLocation>
                        <headerLocation>${build-config.location}/checkstyle-header.txt</headerLocation>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>${maven-pmd-plugin.version}</version>
                    <configuration>
                        <minmemory>${memory.min}</minmemory>
                        <maxmemory>${memory.max}</maxmemory>
                        <linkXref>true</linkXref>
                        <rulesets>
                            <ruleset>${build-config.location}/pmd_rulesets/coupling.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/design.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/controversial.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/codesize.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/clone.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/braces.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/basic.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/finalizers.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/imports.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/logging-jakarta-commons.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/logging-java.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/migrating.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/naming.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/optimizations.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/strictexception.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/strings.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/sunsecure.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/typeresolution.xml</ruleset>
                            <ruleset>${build-config.location}/pmd_rulesets/unusedcode.xml</ruleset>
                        </rulesets>
                        <failsOnError>false</failsOnError>
                        <source>${java.source.version}</source>
                        <target>${java.source.version}</target>
                    </configuration>
                </plugin>   
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>${maven-findbugs-plugin.version}</version>
                    <configuration>
                        <xmlOutput>true</xmlOutput>
                        <threshold>Normal</threshold>
                        <effort>Max</effort>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>net.revelc.code</groupId>
                    <artifactId>formatter-maven-plugin</artifactId>
                    <version>${maven-formatter-plugin.version}</version>
                    <configuration>
                        <configFile>${build-config.location}/lutece_formatter.xml</configFile>
                    </configuration>                
                </plugin>
            </plugins>
        </pluginManagement>
 
        <extensions>
            <extension>
                <groupId>fr.paris.lutece.tools</groupId>
                <artifactId>build-config</artifactId>
                <version>[1.0.0,)</version>
            </extension>
            <!-- Enabling the use of FTP -->
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ftp</artifactId>
                <version>2.6</version>
            </extension>
        </extensions>
    </build>

  
    <distributionManagement>
        <repository>
            <id>lutece_releases_repository</id>
            <url>http://dev.lutece.paris.fr/nexus/content/repositories/lutece_releases_repository</url>
        </repository>
		
        <snapshotRepository>
            <uniqueVersion>true</uniqueVersion>
            <id>lutece_snapshots_repository</id>
            <url>http://dev.lutece.paris.fr/nexus/content/repositories/lutece_snapshots_repository</url>
        </snapshotRepository>
        
        <site>
            <id>lutece_ftp_site_maven</id>
            <url>ftp://site-deploy.dev.lutece.paris.fr/site/plugins</url>
        </site>
    </distributionManagement>

    <scm>
        <connection>scm:git:https://github.com/lutece-platform/tools-maven-global-pom.git</connection>
        <developerConnection>scm:git:https://github.com/lutece-platform/tools-maven-global-pom.git</developerConnection>
        <url>https://github.com/lutece-platform/tools-maven-global-pom.git</url>
        <tag>tools-maven-global-pom-3.0.4</tag>
    </scm>
  
</project>
