<?xml version="1.0" encoding="UTF-8"?>
<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>org.fudaa.pom</groupId>
  <artifactId>super-pom</artifactId>
  <packaging>pom</packaging>
  <version>3.21</version>
  <name>Super Pom</name>
  <description>
    Parent Pom for Fudaa modules
  </description>
  <url>https://gitlab.com/fudaa/</url>
  <developers>
    <developer>
      <name>Guillaume Poissonnier</name>
      <url>https://www.cerema.fr</url>
    </developer>
    <developer>
      <name>Bertrand Marchand</name>
      <url>http://deltacad.fr</url>
    </developer>
    <developer>
      <name>Frederic Deniger</name>
      <email>frederic.deniger@gmail.com</email>
      <url>https://gitlab.com/frederic.deniger</url>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>GPL v2, Version 2.0</name>
      <url>https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <url>https://gitlab.com/fudaa/fudaa-pom</url>
  </scm>
  <properties>
    <!-- l'encoding pour les projets: a therme il faudrait changer cela en
    UTF-8 -->
    <!-- Certains projets applicatifs peuvent le faire -->
    <projetEncoding>ISO-8859-15</projetEncoding>
    <!-- la version du compiler -->
    <javaCompiler>1.8</javaCompiler>
    <javaRelease>8</javaRelease>
    <ctuluGroupId>org.fudaa.framework.ctulu</ctuluGroupId>
    <dodicoGroupId>org.fudaa.framework.dodico</dodicoGroupId>
    <ebliGroupId>org.fudaa.framework.ebli</ebliGroupId>
    <fudaaGroupId>org.fudaa.framework.fudaa</fudaaGroupId>
    <doclint>none</doclint>
    <sonar.sourceEncoding>${projetEncoding}</sonar.sourceEncoding>
    <sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
  </properties>
  <distributionManagement>
    <!--https://central.sonatype.org/pages/apache-maven.html#manually-releasing-the-deployment-to-the-central-repository-->
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.2.1</version>
            <configuration>
            </configuration>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>verify</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>sources</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.2.1</version>
            <configuration>
            </configuration>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>verify</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <build>
    <plugins>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.8</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>native2ascii-maven-plugin</artifactId>
        <version>2.0.1</version>
        <executions>
          <execution>
            <id>utf8-to-latin1</id>
            <goals>
              <goal>resources</goal>
            </goals>
            <phase>generate-resources</phase><!-- default -->
            <configuration>
              <srcDir>${basedir}/src/main/resources</srcDir>
              <targetDir>${project.build.outputDirectory}</targetDir>

              <encoding>${projetEncoding}</encoding><!-- default -->
              <includes>
                <include>**/**/*.fr_txt</include><!-- default -->
              </includes>
              <excludes>
                <exclude></exclude><!-- nothing by default -->
              </excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <phase>generate-resources</phase>
            <configuration>
              <target>
                <replace dir="${project.build.directory}" encoding="${projetEncoding}"
                         includes="**/*.fr_txt" token=" " value="_"
                />
                <move todir="${project.build.directory}" includeemptydirs="false">
                  <fileset dir="${project.build.directory}">
                    <include name="**/*.fr_txt"/>
                  </fileset>
                  <mapper type="glob" from="*.fr_txt" to="*.txt"/>
                </move>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
<!--        <dependencies>-->
<!--          <dependency>-->
<!--            <groupId>ant</groupId>-->
<!--            <artifactId>ant-optional</artifactId>-->
<!--            <version>1.5.3-1</version>-->
<!--          </dependency>-->
<!--        </dependencies>-->
      </plugin>

    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.11.2</version>
          <configuration>
            <!--by default we use only the project.version as tag-->
            <tag>release-${project.version}</tag>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.0.1</version>
          <configuration>
            <quiet>true</quiet>
            <encoding>${projetEncoding}</encoding>
            <additionalOptions>-Xdoclint:none</additionalOptions>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.22.2</version>
          <configuration>
            <argLine>-Djava.awt.headless=true</argLine>
            <useSystemClassLoader>false</useSystemClassLoader>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
          <configuration>
            <source>${javaCompiler}</source>
            <target>${javaCompiler}</target>
            <release>${javaRelease}</release>
            <encoding>${projetEncoding}</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.1.0</version>
          <configuration>
            <encoding>${projetEncoding}</encoding>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-changelog-plugin</artifactId>
          <version>2.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.2.0</version>
          <executions>
            <execution>
              <goals>
                <goal>test-jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <configuration>
            <skip>true</skip>
          </configuration>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>
                      org.apache.maven.plugins
                    </groupId>
                    <artifactId>
                      maven-antrun-plugin
                    </artifactId>
                    <versionRange>
                      [1.3,)
                    </versionRange>
                    <goals>
                      <goal>run</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <repositories>
    <repository>
      <id>oss-sonatype</id>
      <name>OSS Sonatype Repository</name>
      <url>https://oss.sonatype.org/content/groups/public/</url>
    </repository>
  </repositories>


</project>
