<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  EUGene
  %%
  Copyright (C) 2004 - 2017 Code Lutin, Ultreia.io
  %%
  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>io.ultreia.maven</groupId>
    <artifactId>pom</artifactId>
    <version>2021.96</version>
  </parent>

  <groupId>io.ultreia.java4all</groupId>
  <artifactId>eugene</artifactId>
  <version>3.0-alpha-42</version>
  <packaging>pom</packaging>

  <name>EUGene</name>
  <description>Efficient Universal Generator</description>
  <url>http://ultreiaio.gitlab.io/eugene</url>
  <inceptionYear>2004</inceptionYear>

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

    <developer>
      <name>Arnaud Thimel</name>
      <id>athimel</id>
      <email>thimel@codelutin.com</email>
      <organization>CodeLutin</organization>
      <organizationUrl>http://codelutin.com</organizationUrl>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </developer>

    <developer>
      <name>Julien Ruchaud</name>
      <id>jruchaud</id>
      <email>ruchaud@codelutin.com</email>
      <organization>CodeLutin</organization>
      <organizationUrl>http://codelutin.com</organizationUrl>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </developer>

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

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

  </developers>
  <contributors>
    <contributor>
      <name>Stéphane Chorlet</name>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </contributor>
    <contributor>
      <name>Florian Desbois</name>
      <roles>
        <role>developer</role>
      </roles>
    </contributor>
  </contributors>

  <modules>
    <module>eugene-core</module>
    <module>eugene-java-templates</module>
    <module>eugene-plantuml-templates</module>
    <module>eugene-yaml-templates</module>
    <module>eugene-maven-plugin</module>
  </modules>

  <scm>
    <url>https://gitlab.com/ultreiaio/eugene</url>
    <connection>scm:git:git@gitlab.com:${projectPath}</connection>
    <developerConnection>scm:git:ssh://git@gitlab.com:${projectPath}</developerConnection>
  </scm>

  <distributionManagement>
    <site>
      <id>gitlab.com</id>
      <url>scm:git:https://git@gitlab.com/${organizationId}/${projectId}.git</url>
    </site>
  </distributionManagement>

  <properties>

    <organizationId>ultreiaio</organizationId>
    <projectId>eugene</projectId>
    <java.version>11</java.version>
    <lib.version.java4all.eugene>${project.version}</lib.version.java4all.eugene>
<!--    used to generate report but can't use the snapshot version, breaks release process-->
    <eugene.version>3.0-alpha-38</eugene.version>
    <plugin.version.jrst>2.3</plugin.version.jrst>

    <!--Site configuration -->
    <locales>en</locales>
    <siteSourcesType>rst</siteSourcesType>

    <!-- I18n configuration -->
    <i18n.failsIfAnyKeyMissingValue>true</i18n.failsIfAnyKeyMissingValue>
    <i18n.checkBundle>true</i18n.checkBundle>
    <i18n.showEmpty>true</i18n.showEmpty>

    <!-- License configuration -->
    <license.organizationName>Code Lutin, Ultreia.io</license.organizationName>

    <maven.javadoc.skip>false</maven.javadoc.skip>
    <maven.source.skip>false</maven.source.skip>
    <maven.deploy.skip>false</maven.deploy.skip>

    <!--Gitlab configuration-->
    <gitlab.changesTitle>EuGene changelog</gitlab.changesTitle>
    <!--<gitlab.trackers>Anomalie,Evolution,Tâche</gitlab.trackers>-->

  </properties>

  <dependencyManagement>
    <dependencies>

      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-text</artifactId>
        <version>1.9</version>
      </dependency>

      <dependency>
        <groupId>org.nuiton</groupId>
        <artifactId>helper-maven-plugin-api</artifactId>
        <version>${plugin.version.helper}</version>
        <exclusions>

          <exclusion>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-dependency-tree</artifactId>
          </exclusion>

          <exclusion>
            <groupId>velocity</groupId>
            <artifactId>velocity</artifactId>
          </exclusion>

        </exclusions>
      </dependency>

      <dependency>
        <groupId>xml-apis</groupId>
        <artifactId>xml-apis</artifactId>
        <!-- Do not use version 2.0.0 nor 2.0.2, they miss ElementTraversal class needed by eugene:help -->
        <version>1.4.01</version>
        <scope>runtime</scope>
      </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>
          <dependencies>
            <dependency>
              <groupId>org.nuiton.jrst</groupId>
              <artifactId>doxia-module-jrst</artifactId>
              <version>${plugin.version.jrst}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <configuration>
            <extraExtensions>
              <objectmodel>xml</objectmodel>
              <xsd>xml</xsd>
            </extraExtensions>
          </configuration>
        </plugin>

      </plugins>
    </pluginManagement>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh-external</artifactId>
        <version>1.0</version>
      </extension>

    </extensions>
  </build>

  <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-project-info-reports-plugin</artifactId>
            <version>${plugin.version.projectInfoReports}</version>
            <inherited>false</inherited>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-changes-plugin</artifactId>
            <version>${plugin.version.changes}</version>
            <inherited>false</inherited>
            <configuration>
              <issueLinkTemplatePerSystem>
                <gitlab>https://gitlab.com/${organizationId}/${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>
            <inherited>false</inherited>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>${plugin.version.license}</version>
            <inherited>false</inherited>
            <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>
            <inherited>false</inherited>
          </plugin>

        </plugins>
      </reporting>

      <build>

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

          <plugin>
            <!-- copy object model xsd to site -->
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>

              <execution>
                <inherited>false</inherited>
                <id>xsd-to-site</id>
                <phase>pre-site</phase>
                <configuration>
                  <target>
                    <copy todir="target/site/xsd/v1" failonerror="false" overwrite="true">
                      <fileset dir="${basedir}/eugene/src/main/resources/xsd">
                        <include name="**/*.xsd" />
                      </fileset>
                    </copy>
                    <copy todir="target/site/dtd/v1" failonerror="false" overwrite="true">
                      <fileset dir="${basedir}/eugene/src/main/resources/dtd">
                        <include name="**/*.dtd" />
                      </fileset>
                    </copy>
                  </target>
                </configuration>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
