<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  ObServe Toolkit :: Pom
  %%
  Copyright (C) 2017 - 2021 Ultreia.io
  %%
  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/gpl-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>io.ultreia.maven</groupId>
    <artifactId>pom</artifactId>
    <version>2021.103</version>
  </parent>

  <groupId>fr.ird.observe</groupId>
  <artifactId>toolkit</artifactId>
  <version>5.0.49</version>
  <packaging>pom</packaging>

  <name>ObServe Toolkit :: Pom</name>
  <description>Project ObServe Toolkit</description>
  <url>https://ultreiaio.gitlab.io/ird-observe-toolkit</url>
  <inceptionYear>2017</inceptionYear>
  <organization>
    <name>IRD</name>
    <url>http://www.ird.fr/</url>
  </organization>
  <licenses>
    <license>
      <name>General Public License (GPL)</name>
      <url>http://www.gnu.org/licenses/gpl.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>tchemit</id>
      <name>Tony Chemit</name>
      <email>dev@tchemit.fr</email>
      <organization>Ultreia.io</organization>
      <organizationUrl>http://ultreia.io</organizationUrl>
      <roles>
        <role>lead</role>
        <role>developer</role>
      </roles>
      <timezone>Europe/Paris</timezone>
    </developer>
  </developers>

  <modules>
    <module>dto</module>
    <module>navigation</module>
    <module>persistence</module>
    <module>validation</module>
    <module>service</module>
    <module>i18n</module>
    <module>templates</module>
    <module>plugin</module>
    <module>runner</module>
    <module>runner-navigation</module>
    <module>runner-persistence</module>
    <module>runner-server</module>
  </modules>

  <scm>
    <url>https://gitlab.com/${projectPath}</url>
    <connection>scm:git:git@gitlab.com:${projectPath}</connection>
    <developerConnection>scm:git:ssh://git@gitlab.com:${projectPath}.git</developerConnection>
  </scm>
  <distributionManagement>
    <site>
      <id>gitlab.com</id>
      <url>scm:git:https://git@gitlab.com/${projectPath}.git</url>
    </site>
  </distributionManagement>

  <properties>

    <organizationId>ultreiaio</organizationId>
    <projectId>ird-observe-toolkit</projectId>
    <stageId>frirdobserve</stageId>
    <java.version>11</java.version>
    <maven.version>3.8.3</maven.version>

    <lib.version.toolkit>${project.version}</lib.version.toolkit>

    <license.skipAddThirdParty>true</license.skipAddThirdParty>

    <lib.version.ognl>3.1.29</lib.version.ognl>

    <!-- license header configuration -->
    <license.licenseName>gpl_v3</license.licenseName>
    <license.organizationName>Ultreia.io</license.organizationName>
    <license.excludes>**/templates/*.template,**/translations/*.properties,**/THIRD-PARTY.properties,**/*.sh</license.excludes>

    <!-- Site configuration -->
    <locales>en</locales>
    <generateSitemap>true</generateSitemap>
    <relativizeDecorationLinks>false</relativizeDecorationLinks>

    <!-- i18n configuration -->
    <i18n.bundles>fr_FR,en_GB,es_ES</i18n.bundles>
    <!--i18n.silent>true</i18n.silent-->
    <i18n.failsIfAnyKeyMissingValue>true</i18n.failsIfAnyKeyMissingValue>
    <i18n.checkBundle>true</i18n.checkBundle>
    <i18n.showEmpty>true</i18n.showEmpty>
    <i18n.failsIfDuplicatedKeys>true</i18n.failsIfDuplicatedKeys>
    <i18n.removeDuplicatedKeys>true</i18n.removeDuplicatedKeys>
    <i18n.persistGetters>true</i18n.persistGetters>
    <i18n.gettersDirectory>${basedir}/src/main/i18n/getters</i18n.gettersDirectory>

    <!--Gitlab configuration-->
    <gitlab.changesTitle>ObServe Toolkit changelog</gitlab.changesTitle>
    <gitlab.trackers>bug,support,enhancement,critical,documentation</gitlab.trackers>

    <!-- deploy everything -->
    <maven.deploy.skip>false</maven.deploy.skip>
    <maven.javadoc.skip>false</maven.javadoc.skip>
    <maven.source.skip>false</maven.source.skip>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.ultreia.java4all.jaxx</groupId>
        <artifactId>jaxx-validator</artifactId>
        <version>${lib.version.java4all.jaxx}</version>
        <exclusions>
          <exclusion>
            <groupId>org.nuiton</groupId>
            <artifactId>nuiton-validator</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>io.ultreia.java4all.jaxx</groupId>
        <artifactId>jaxx-widgets-gis</artifactId>
        <version>${lib.version.java4all.jaxx}</version>
        <exclusions>
          <exclusion>
            <groupId>org.nuiton</groupId>
            <artifactId>nuiton-validator</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>io.ultreia.java4all.jaxx</groupId>
        <artifactId>jaxx-widgets-temperature</artifactId>
        <version>${lib.version.java4all.jaxx}</version>
        <exclusions>
          <exclusion>
            <groupId>org.nuiton</groupId>
            <artifactId>nuiton-validator</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.nuiton.topia</groupId>
        <artifactId>topia-persistence</artifactId>
        <version>${lib.version.nuiton.topia}</version>
        <exclusions>
          <exclusion>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-ehcache</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-c3p0</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>io.ultreia.java4all.eugene</groupId>
        <artifactId>eugene-core</artifactId>
        <version>${lib.version.java4all.eugene}</version>
        <exclusions>
          <exclusion>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
          </exclusion>
          <exclusion>
            <groupId>asm</groupId>
            <artifactId>asm-commons</artifactId>
          </exclusion>
          <exclusion>
            <groupId>asm</groupId>
            <artifactId>asm</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.resolver</groupId>
        <artifactId>maven-resolver-impl</artifactId>
        <version>${lib.version.maven.resolver}</version>
        <exclusions>
          <exclusion>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.eclipse.sisu</groupId>
        <artifactId>org.eclipse.sisu.inject</artifactId>
        <version>${lib.version.sisu.plexus}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>

        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <!--<configuration>-->
          <!--<topSiteURL>scm:git:https://git@gitlab.com/${projectPath}.git</topSiteURL>-->
          <!--<stagingDirectory>${user.dir}/target/staging</stagingDirectory>-->
          <!--</configuration>-->
          <dependencies>
            <dependency>
              <groupId>io.ultreia.java4all.jaxx</groupId>
              <artifactId>jaxx-widgets-gis</artifactId>
              <version>${lib.version.java4all.jaxx}</version>
            </dependency>
            <dependency>
              <groupId>org.nuiton</groupId>
              <artifactId>nuiton-converter</artifactId>
              <version>${lib.version.nuiton.converter}</version>
            </dependency>
            <dependency>
              <groupId>org.nuiton</groupId>
              <artifactId>nuiton-version</artifactId>
              <version>${lib.version.nuiton.version}</version>
            </dependency>
            <dependency>
              <groupId>org.apache.velocity</groupId>
              <artifactId>velocity</artifactId>
              <version>1.7</version>
            </dependency>
          </dependencies>
        </plugin>

      </plugins>
    </pluginManagement>
    <plugins>

    </plugins>
  </build>

  <reporting>
    <excludeDefaults>true</excludeDefaults>
  </reporting>

  <profiles>

    <profile>
      <id>reporting</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <reporting>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-plugin-plugin</artifactId>
            <version>${plugin.version.plugins}</version>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <version>${plugin.version.projectInfoReports}</version>
          </plugin>

          <plugin>
            <artifactId>maven-changes-plugin</artifactId>
            <version>${plugin.version.changes}</version>
            <configuration>
              <issueLinkTemplatePerSystem>
                <gitlab>https://gitlab.nuiton.org/nuiton/${projectId}/issues/%ISSUE%</gitlab>
              </issueLinkTemplatePerSystem>
              <xmlPath>${project.build.directory}/generated-site/changes.xml</xmlPath>
            </configuration>
            <reportSets>
              <reportSet>
                <reports>
                  <report>changes-report</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${plugin.version.javadoc}</version>
            <reportSets>
              <reportSet>
                <reports>
                  <report>javadoc-no-fork</report>
                  <report>test-javadoc-no-fork</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-changelog-plugin</artifactId>
            <version>${plugin.version.changelog}</version>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jxr-plugin</artifactId>
            <version>${plugin.version.jrx}</version>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-report-plugin</artifactId>
            <version>${plugin.version.surefire}</version>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>${plugin.version.license}</version>
            <reportSets>
              <reportSet>
                <reports>
                  <report>third-party-report</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

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

        </plugins>
      </reporting>

      <build>

        <plugins>

          <plugin>
            <groupId>io.ultreia.maven</groupId>
            <artifactId>gitlab-maven-plugin</artifactId>
            <executions>
              <execution>
                <inherited>false</inherited>
                <goals>
                  <goal>generate-changes</goal>
                </goals>
                <phase>pre-site</phase>
              </execution>
            </executions>
          </plugin>

        </plugins>

      </build>

    </profile>

  </profiles>
</project>
