<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  Nuiton Utils
  %%
  Copyright (C) 2004 - 2017 CodeLutin, Tony Chemit
  %%
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Lesser 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 Lesser Public License for more details.
  
  You should have received a copy of the GNU General Lesser Public 
  License along with this program.  If not, see
  <http://www.gnu.org/licenses/lgpl-3.0.html>.
  #L%
  -->
<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.nuiton</groupId>
    <artifactId>nuitonpom</artifactId>
    <version>11-beta-10</version>
  </parent>

  <artifactId>nuiton-utils</artifactId>
  <version>3.1-rc-2</version>

  <name>Nuiton Utils</name>
  <description>Library of usefull classes to be used in any project.</description>
  <url>http://nuiton-utils.nuiton.org</url>
  <inceptionYear>2004</inceptionYear>

  <developers>

    <developer>
      <name>Brendan Le Ny</name>
      <id>bleny</id>
      <email>bleny@codelutin.com</email>
      <organization>CodeLutin</organization>
      <organizationUrl>http://www.codelutin.com/</organizationUrl>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </developer>

    <developer>
      <name>Benjamin Poussin</name>
      <id>bpoussin</id>
      <email>poussin@codelutin.com</email>
      <organization>CodeLutin</organization>
      <organizationUrl>http://www.codelutin.com/</organizationUrl>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </developer>

    <developer>
      <name>Éric Chatellier</name>
      <id>echatellier</id>
      <email>chatellier@codelutin.com</email>
      <organization>CodeLutin</organization>
      <organizationUrl>http://www.codelutin.com/</organizationUrl>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </developer>

    <developer>
      <name>Tony Chemit</name>
      <id>tchemit</id>
      <email>chemit@codelutin.com</email>
      <organization>CodeLutin</organization>
      <organizationUrl>http://www.codelutin.com/</organizationUrl>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </developer>

    <developer>
      <name>Kevin Morin</name>
      <id>kmorin</id>
      <email>morin@codelutin.com</email>
      <organization>CodeLutin</organization>
      <organizationUrl>http://www.codelutin.com/</organizationUrl>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </developer>

  </developers>

  <contributors>
    <contributor>
      <name>Sylvain Letellier</name>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </contributor>

    <contributor>
      <name>Florian Desbois</name>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </contributor>
  </contributors>

  <scm>
    <url>https://gitlab.nuiton.org/nuiton/nuiton-utils</url>
    <connection>scm:git:git@gitlab.nuiton.org:nuiton/nuiton-utils.git</connection>
    <developerConnection>scm:git:git@gitlab.nuiton.org:nuiton/nuiton-utils.git</developerConnection>
  </scm>

  <properties>

    <!-- redmine project Id -->
    <projectName>nuiton-utils</projectName>
    <projectId>nuiton-utils</projectId>

    <!-- Java level -->
    <javaVersion>1.8</javaVersion>
    <signatureArtifactId>java18</signatureArtifactId>
    <signatureVersion>1.0</signatureVersion>

    <nuitonI18nVersion>4.0-rc-2</nuitonI18nVersion>

    <!-- i18n configuration -->
    <i18n.bundles>fr_FR,en_GB,es_ES</i18n.bundles>
    <i18n.failsIfWarning>true</i18n.failsIfWarning>
    <i18n.showEmpty>true</i18n.showEmpty>

    <!-- Documentation is in apt format -->
    <siteSourcesType>apt</siteSourcesType>
    <locales>fr</locales>

    <!-- FIXME AThimel 21/01/2020 Le temps des tests on ne déploie pas sur central -->
    <release.repository>${other.release.repository}</release.repository>
    <repository.home.url>${other.release.home.url}</repository.home.url>

  </properties>

  <dependencies>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.9</version>
    </dependency>

    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.2</version>
    </dependency>

    <dependency>
      <groupId>commons-primitives</groupId>
      <artifactId>commons-primitives</artifactId>
      <version>1.0</version>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-collections4</artifactId>
      <version>4.4</version>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.6</version>
    </dependency>

    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>1.9.4</version>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>28.2-jre</version>
    </dependency>

    <dependency>
      <groupId>org.nuiton.i18n</groupId>
      <artifactId>nuiton-i18n</artifactId>
      <version>${nuitonI18nVersion}</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
      <scope>provided</scope>
    </dependency>

  </dependencies>

  <build>

    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>${sitePluginVersion}</version>
          <dependencies>
            <dependency>
              <groupId>org.nuiton.jrst</groupId>
              <artifactId>doxia-module-jrst</artifactId>
              <version>2.3</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>

      <!-- plugin i18n -->
      <plugin>
        <groupId>org.nuiton.i18n</groupId>
        <artifactId>i18n-maven-plugin</artifactId>
        <version>${nuitonI18nVersion}</version>
        <configuration>
          <silent>true</silent>
          <bundles>fr_FR,en_GB,es_ES</bundles>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>parserJava</goal>
              <goal>gen</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>${assemblyPluginVersion}</version>
        <executions>
          <execution>
            <id>build-jar-with-dependencies</id>
            <goals>
              <goal>single</goal>
            </goals>
            <phase>package</phase>
            <configuration>
              <attach>true</attach>
              <descriptorRefs>
                <descriptorRef>jar-with-dependencies</descriptorRef>
              </descriptorRefs>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!--For sonar code coverage-->
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>default-report</id>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <!-- Required by org.nuiton.util.ResourceTest.testGetURLs -->
          <useSystemClassLoader>false</useSystemClassLoader>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <profiles>

    <!-- create assemblies at release time -->
    <profile>
      <id>assembly-profile</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <defaultGoal>package</defaultGoal>
        <plugins>

          <!-- launch in a release the assembly automaticly -->
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>create-assemblies</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <attach>false</attach>
              <descriptorRefs>
                <descriptorRef>deps</descriptorRef>
                <descriptorRef>full</descriptorRef>
              </descriptorRefs>
            </configuration>
          </plugin>

        </plugins>

      </build>
    </profile>

  </profiles>
</project>
