<?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>2.2</version>
  <name>Super Pom</name>
    <description>
        Parent Pom for Fudaa modules
    </description>
    <url>http://fudaa.org</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/tree/master/soft-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.6</javaCompiler>
    <ctuluGroupId>org.fudaa.framework.ctulu</ctuluGroupId>
    <dodicoGroupId>org.fudaa.framework.dodico</dodicoGroupId>
    <ebliGroupId>org.fudaa.framework.ebli</ebliGroupId>
    <fudaaGroupId>org.fudaa.framework.fudaa</fudaaGroupId>
  </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>2.4</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.5</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>2.9.1</version>
            <configuration>
              <quiet>true</quiet>
              <encoding>${projetEncoding}</encoding>
              <additionalJOption>-Xdoclint:none</additionalJOption>
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</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.7</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase> process-resources</phase>
            <configuration>
              <tasks>
                <mkdir dir="${project.build.directory}" />
                <replace dir="${project.build.directory}" encoding="${projetEncoding}"
                         includes="**/*.fr_txt" token=" " value="_" />
                <native2ascii src="${project.build.directory}"
                              encoding="${projetEncoding}" dest="${project.build.directory}"
                              includes="**/*.fr_txt" ext=".txt" />
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>ant</groupId>
            <artifactId>ant-optional</artifactId>
            <version>1.5.3-1</version>
          </dependency>
          <dependency>
            <groupId>com.sun</groupId>
            <artifactId>tools</artifactId>
            <version>1.5+</version>
            <scope>system</scope>
            <systemPath>${java.home}/../lib/tools.jar</systemPath>
          </dependency>

        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <configuration>
        </configuration>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.4.1</version>          
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <source>${javaCompiler}</source>
            <target>${javaCompiler}</target>
            <encoding>${projetEncoding}</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.5</version>
          <configuration>
            <encoding>${projetEncoding}</encoding>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-changelog-plugin</artifactId>
          <version>2.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.3.2</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>
      </plugins>
    </pluginManagement>
  </build>


</project>
