<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  Pom
  %%
  Copyright (C) 20014 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>

  <groupId>org.nuiton</groupId>
  <artifactId>pom</artifactId>
  <version>2.1</version>
  <packaging>pom</packaging>

  <name>Pom</name>
  <description>A common shared pom for our maven projects</description>
  <url>https://forge.nuiton.org/projects/pom</url>
  <inceptionYear>2014</inceptionYear>
  <organization>
    <name>CodeLutin</name>
    <url>http://www.codelutin.com/</url>
  </organization>

  <licenses>
    <license>
      <name>Lesser General Public License (LGPL) v 3.0</name>
      <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>

    <developer>
      <name>Tony Chemit</name>
      <id>tchemit</id>
      <email>chemit@codelutin.com</email>
      <organization>CodeLutin</organization>
      <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>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </developer>

  </developers>

  <mailingLists>
    <mailingList>
      <name>${projectId}-commits</name>
      <subscribe>
        https://ml.${platform}/cgi-bin/mailman/listinfo/${projectId}-commits
      </subscribe>
      <unsubscribe>
        https://ml.${platform}/cgi-bin/mailman/listinfo/${projectId}-commits
      </unsubscribe>
      <post>${projectId}-commits@ml.${platform}</post>
      <archive>https://ml.${platform}/pipermail/${projectId}-commits/</archive>
    </mailingList>

    <mailingList>
      <name>${projectId}-devel</name>
      <subscribe>
        https://ml.${platform}/cgi-bin/mailman/listinfo/${projectId}-devel
      </subscribe>
      <unsubscribe>
        https://ml.${platform}/cgi-bin/mailman/listinfo/${projectId}-devel
      </unsubscribe>
      <post>${projectId}-devel@ml.${platform}</post>
      <archive>https://ml.${platform}/pipermail/${projectId}-devel/</archive>
    </mailingList>

    <mailingList>
      <name>${projectId}-users</name>
      <subscribe>
        https://ml.${platform}/cgi-bin/mailman/listinfo/${projectId}-users
      </subscribe>
      <unsubscribe>
        https://ml.${platform}/cgi-bin/mailman/listinfo/${projectId}-users
      </unsubscribe>
      <post>${projectId}-users@ml.${platform}</post>
      <archive>https://ml.${platform}/pipermail/${projectId}-users/</archive>
    </mailingList>

    <mailingList>
      <name>${projectId}-build</name>
      <subscribe>
        https://ml.${platform}/cgi-bin/mailman/listinfo/${projectId}-build
      </subscribe>
      <unsubscribe>
        https://ml.${platform}/cgi-bin/mailman/listinfo/${projectId}-build
      </unsubscribe>
      <post>${projectId}-build@ml.${platform}</post>
      <archive>https://ml.${platform}/pipermail/${projectId}-build/</archive>
    </mailingList>
  </mailingLists>

  <prerequisites>
    <maven>3.0.5</maven>
  </prerequisites>

  <scm>
    <connection>scm:git:http://git.nuiton.org/pom.git</connection>
    <developerConnection>scm:git:https://git.nuiton.org/pom.git</developerConnection>
    <url>https://gitweb.nuiton.org/pom.git</url>
  </scm>

  <issueManagement>
    <system>redmine</system>
    <url>https://forge.${platform}/projects/${projectId}/issues</url>
  </issueManagement>

  <ciManagement>
    <system>jenkins</system>
    <url>https://ci.${platform}/jenkins</url>
  </ciManagement>

  <distributionManagement>
    <repository>
      <id>${release.server}</id>
      <url>${release.repository}</url>
    </repository>
    <snapshotRepository>
      <id>${snapshot.server}</id>
      <url>${snapshot.repository}</url>
    </snapshotRepository>
  </distributionManagement>

  <modules>
    <module>nuitonpom</module>
    <module>chorempom</module>
    <module>codelutinpom</module>
  </modules>

  <properties>

    <!-- the redmine plateform used -->
    <platform />

    <!-- a proprerty to define the id of the project, in a multi-module
         project, you must use a hard-cored value, otherwise for modules
         the artifactId will be expanded , otherwise, no need to override it
    -->
    <projectId />

    <!-- default encoding -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// Deployement configuration                                //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <!-- server to use for snapshot -->
    <snapshot.server>nuiton-nexus-deploy</snapshot.server>

    <!-- location of the snapshot repository to use -->
    <snapshot.repository>https://nexus.nuiton.org/nexus/content/repositories/snapshots</snapshot.repository>

    <!-- server to use for release -->
    <release.server>nuiton-nexus-deploy</release.server>

    <!-- location of the release repository to use -->
    <release.repository>${other.release.repository}</release.repository>

    <!-- location of central-releases repository -->
    <central.release.repository>
      https://nexus.nuiton.org/nexus/content/repositories/central-releases
    </central.release.repository>

    <!-- location of other-releases repository -->
    <other.release.repository>
      https://nexus.nuiton.org/nexus/content/repositories/other-releases
    </other.release.repository>

    <!-- Which server used to deploy site (use this in your distributionManagement.site.id) -->
    <site.server>doc.${platform}</site.server>

    <!-- Where to deploy site (use this in your distributionManagement.site.url) -->
    <site.url>
      scpexe://forge.nuiton.org/var/lib/doc/maven-site/${platform}/${projectId}/${siteDeployClassifier}
    </site.url>

    <!-- Site classifier (where to deploy to site) -->
    <siteDeployClassifier>${project.version}</siteDeployClassifier>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// Maven repositories                                       //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <!-- central releases url -->
    <central.release.home.url>http://maven.nuiton.org/central-releases</central.release.home.url>

    <!-- other releases url -->
    <other.release.home.url>http://maven.nuiton.org/other-releases</other.release.home.url>

    <!-- release repository url (to be used in site.xml, by default use other-release repository) -->
    <repository.home.url>${other.release.home.url}</repository.home.url>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// Plugins version                                          //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <!-- our plugins -->
    <helperPluginVersion>2.1</helperPluginVersion>
    <jredminePluginVersion>1.9</jredminePluginVersion>
    <jrstPluginVersion>2.1</jrstPluginVersion>

    <!-- apache maven plugins version -->
    <antRunPluginVersion>1.8</antRunPluginVersion>
    <assemblyPluginVersion>2.5.3</assemblyPluginVersion>
    <cleanPluginVersion>2.6.1</cleanPluginVersion>
    <compilerPluginVersion>3.2</compilerPluginVersion>
    <dependencyPluginVersion>2.10</dependencyPluginVersion>
    <deployPluginVersion>2.8.2</deployPluginVersion>
    <earPluginVersion>2.10</earPluginVersion>
    <ejbPluginVersion>2.5</ejbPluginVersion>
    <enforcerPluginVersion>1.4</enforcerPluginVersion>
    <gpgPluginVersion>1.6</gpgPluginVersion>
    <installPluginVersion>2.5.2</installPluginVersion>
    <invokerPluginVersion>1.9</invokerPluginVersion>
    <jarPluginVersion>2.6</jarPluginVersion>
    <jarSignerPluginVersion>1.4</jarSignerPluginVersion>
    <javadocPluginVersion>2.10.1</javadocPluginVersion>
    <pluginPluginVersion>3.4</pluginPluginVersion>
    <pmdPluginVersion>3.3</pmdPluginVersion>
    <releasePluginVersion>2.5.1</releasePluginVersion>
    <remoteResourcesPluginVersion>1.5</remoteResourcesPluginVersion>
    <resourcesPluginVersion>2.7</resourcesPluginVersion>
    <sitePluginVersion>3.4</sitePluginVersion>
    <sourcePluginVersion>2.4</sourcePluginVersion>
    <surefirePluginVersion>2.18.1</surefirePluginVersion>
    <warPluginVersion>2.6</warPluginVersion>

    <!-- codehaus mojo plugins -->
    <buildHelperPluginVersion>1.9.1</buildHelperPluginVersion>
    <animalSnifferPluginVersion>1.14</animalSnifferPluginVersion>
    <coberturaPluginVersion>2.7</coberturaPluginVersion>
    <execPluginVersion>1.3.2</execPluginVersion>
    <findbugsPluginVersion>3.0.0</findbugsPluginVersion>
    <gwtPluginVersion>2.7.0</gwtPluginVersion>
    <l10nPluginVersion>1.0-alpha-2</l10nPluginVersion>
    <licensePluginVersion>1.8</licensePluginVersion>
    <sonarPluginVersion>2.5</sonarPluginVersion>
    <tidyPluginVersion>1.0-beta-1</tidyPluginVersion>
    <versionsPluginVersion>2.1</versionsPluginVersion>
    <wagonPluginVersion>1.0</wagonPluginVersion>
    <webstartPluginVersion>1.0-beta-6</webstartPluginVersion>

    <!-- codehaus plexus plugins -->
    <plexusPluginVersion>1.3.8</plexusPluginVersion>
    <plexusComponentMetadataPluginVersion>1.6</plexusComponentMetadataPluginVersion>

    <!-- others plugins -->
    <androidPluginVersion>3.0.0-alpha-11</androidPluginVersion>
    <jettyPluginVersion>8.1.16.v20140903</jettyPluginVersion>
    <statScmPluginVersion>1.2.0</statScmPluginVersion>
    <tomcatPluginVersion>2.2</tomcatPluginVersion>
    <jgitflowPluginVersion>1.0-m5.1</jgitflowPluginVersion>

    <!-- report plugins version -->
    <changesPluginVersion>2.10</changesPluginVersion>
    <projectInfoReportsPluginVersion>2.7</projectInfoReportsPluginVersion>
    <changelogPluginVersion>2.3</changelogPluginVersion>
    <jrxPluginVersion>2.4</jrxPluginVersion>
    <sonarReportPluginVersion>0.1</sonarReportPluginVersion>

    <!-- to deploy with scpexe for maven 3 -->
    <wagonSshExternalVersion>1.0</wagonSshExternalVersion>

    <!-- versions of javadoc tagglets -->
    <mavenPluginToolsJavadocVersion>2.8</mavenPluginToolsJavadocVersion>
    <plexusComponentJavadocVersion>1.5.5</plexusComponentJavadocVersion>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// Compiler configuration                                   //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <javaVersion>1.6</javaVersion>

    <maven.compiler.source>${javaVersion}</maven.compiler.source>
    <maven.compiler.target>${javaVersion}</maven.compiler.target>
    <maven.compiler.showWarnings>true</maven.compiler.showWarnings>
    <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
    <!-- for the moment we do not want to use incremental compilation -->
    <maven.compiler.useIncrementalCompilation>false</maven.compiler.useIncrementalCompilation>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// Javadoc configuration                                    //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <!-- pour modifier la verbosite de la javadoc -->
    <maven.javadoc.quiet>true</maven.javadoc.quiet>
    <!-- pour definir la version de l'api de la jre à inclure dans le site -->
    <javadocJreApiVersion>6</javadocJreApiVersion>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// License configuration                                    //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <license.useMissingFile>true</license.useMissingFile>
    <license.failIfWarning>true</license.failIfWarning>
    <license.licenseName>lgpl_v3</license.licenseName>
    <maven.license.file>${project.basedir}/LICENSE.txt</maven.license.file>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// Site generation configuration                            //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <!-- fluido skin version -->
    <fluidoSkinVersion>1.3.1</fluidoSkinVersion>

    <!-- where to get common site resources -->
    <siteCommonResourcesUrl>http://doc.nuiton.org/common/0.3</siteCommonResourcesUrl>

    <!-- to generate sitemap -->
    <generateSitemap>true</generateSitemap>

    <!-- do not relativize links in generated site -->
    <relativizeDecorationLinks>false</relativizeDecorationLinks>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// gitflow configuration                                    //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <jgitflow.masterBranchName>master</jgitflow.masterBranchName>
    <jgitflow.developBranchName>develop</jgitflow.developBranchName>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// Release configuration                                    //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <!-- extra files to include in release -->
    <redmine.releaseFiles />

    <!-- use this for a lib extra files -->
    <redmine.libReleaseFiles>
      target/${project.artifactId}-${project.version}-deps.zip,
      target/${project.artifactId}-${project.version}-full.zip
    </redmine.libReleaseFiles>

    <!-- extra arguments used by release plugin -->
    <arguments>-Ppost-release-profile</arguments>

    <!-- Post Release configuration (set it to false on last module of a project to finalize to release) -->
    <skipPostRelease>true</skipPostRelease>

  </properties>

  <build>

    <!--Ressources-->
    <resources>
      <resource>
        <directory>${project.basedir}/src/main/resources</directory>
        <includes>
          <include>**/*</include>
        </includes>
        <excludes>
          <exclude>**/*~</exclude>
        </excludes>
      </resource>
    </resources>
    <pluginManagement>

      <plugins>

        <!-- Plugins version from apache -->

        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>${antRunPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${assemblyPluginVersion}</version>
          <dependencies>
            <dependency>
              <groupId>org.nuiton</groupId>
              <artifactId>helper-maven-plugin-api</artifactId>
              <version>${helperPluginVersion}</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${cleanPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${compilerPluginVersion}</version>
        </plugin>


        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${dependencyPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${deployPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-ear-plugin</artifactId>
          <version>${earPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-ejb-plugin</artifactId>
          <version>${ejbPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${enforcerPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${gpgPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>${installPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>${invokerPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${jarPluginVersion}</version>
          <inherited>true</inherited>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
              <manifestEntries>
                <url>${project.url}</url>
              </manifestEntries>
              <!--&lt;!&ndash; cela fait bugger le chargement des service via ServiceLoader donc on desactive &ndash;&gt;-->
              <!--&lt;!&ndash; index>true</index&ndash;&gt;-->
              <!--<manifest>-->
                <!--<mainClass>${maven.jar.main.class}</mainClass>-->
              <!--</manifest>-->
            </archive>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-jarsigner-plugin</artifactId>
          <version>${jarSignerPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${javadocPluginVersion}</version>
          <configuration>
            <quiet>${maven.javadoc.quiet}</quiet>
            <charset>${project.reporting.outputEncoding}</charset>
            <links>
              <link>http://docs.oracle.com/javase/${javadocJreApiVersion}/docs/api</link>
            </links>
            <tagletArtifacts>
              <tagletArtifact>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-tools-javadoc</artifactId>
                <version>${mavenPluginToolsJavadocVersion}</version>
              </tagletArtifact>
              <tagletArtifact>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-javadoc</artifactId>
                <version>${plexusComponentJavadocVersion}</version>
              </tagletArtifact>
            </tagletArtifacts>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${pluginPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>${pmdPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>${releasePluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-remote-resources-plugin</artifactId>
          <version>${remoteResourcesPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${resourcesPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>${sitePluginVersion}</version>
          <configuration>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>${sourcePluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${surefirePluginVersion}</version>
          <configuration>
            <systemPropertyVariables>
              <java.io.tmpdir>
                ${project.build.directory}/surefire-workdir
              </java.io.tmpdir>
            </systemPropertyVariables>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>${warPluginVersion}</version>
        </plugin>

        <!-- Plugins version from codehaus mojo -->

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>animal-sniffer-maven-plugin</artifactId>
          <version>${animalSnifferPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>${coberturaPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>${execPluginVersion}</version>
        </plugin>

        <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>${buildHelperPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>${findbugsPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>gwt-maven-plugin</artifactId>
          <version>${gwtPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>l10n-maven-plugin</artifactId>
          <version>${l10nPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>${licensePluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>${sonarPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>tidy-maven-plugin</artifactId>
          <version>${tidyPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>${versionsPluginVersion}</version>
          <configuration>
            <generateBackupPoms>false</generateBackupPoms>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>wagon-maven-plugin</artifactId>
          <version>${wagonPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>webstart-maven-plugin</artifactId>
          <version>${webstartPluginVersion}</version>
          <configuration>

            <libPath>lib</libPath>
            <makeArchive>false</makeArchive>
            <verbose>false</verbose>
            <canUnsign>false</canUnsign>
            <jnlp>
              <mainClass>${maven.jar.main.class}</mainClass>
              <allPermissions>true</allPermissions>
              <offlineAllowed>true</offlineAllowed>
            </jnlp>
            <sign>
              <keystore>${keystorepath}</keystore>
              <storepass>${keystorepass}</storepass>
              <alias>${keyalias}</alias>
              <keypass>${keypass}</keypass>
              <verify>true</verify>
              <keystoreConfig>
                <delete>false</delete>
                <gen>false</gen>
              </keystoreConfig>
            </sign>

          </configuration>
        </plugin>

        <!-- Plugins version from codehaus plexus -->

        <plugin>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-metadata</artifactId>
          <version>${plexusComponentMetadataPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-maven-plugin</artifactId>
          <version>${plexusPluginVersion}</version>
        </plugin>

        <!-- Plugins version from nuiton -->

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

        <plugin>
          <groupId>org.nuiton.jredmine</groupId>
          <artifactId>jredmine-maven-plugin</artifactId>
          <version>${jredminePluginVersion}</version>
        </plugin>

        <!-- Plugins version from others -->

        <plugin>
          <groupId>com.jayway.maven.plugins.android.generation2</groupId>
          <artifactId>maven-android-plugin</artifactId>
          <version>${androidPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jetty-maven-plugin</artifactId>
          <version>${jettyPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.tomcat.maven</groupId>
          <artifactId>tomcat6-maven-plugin</artifactId>
          <version>${tomcatPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.tomcat.maven</groupId>
          <artifactId>tomcat7-maven-plugin</artifactId>
          <version>${tomcatPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>external.atlassian.jgitflow</groupId>
          <artifactId>jgitflow-maven-plugin</artifactId>
          <version>${jgitflowPluginVersion}</version>
          <configuration>
            <flowInitContext>
              <versionTagPrefix>${projectId}-</versionTagPrefix>
              <masterBranchName>${jgitflow.masterBranchName}</masterBranchName>
              <developBranchName>${jgitflow.developBranchName}</developBranchName>
            </flowInitContext>
            <scmCommentPrefix>[jgitflow-maven-plugin]</scmCommentPrefix>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <pushReleases>true</pushReleases>
          </configuration>
        </plugin>

        <plugin>
          <groupId>net.sf</groupId>
          <artifactId>stat-scm</artifactId>
          <version>${statScmPluginVersion}</version>
        </plugin>

      </plugins>
    </pluginManagement>
    <plugins>

      <!-- http://nuiton.org/issues/1683 : creates the surefire-workdir -->
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-surefire-workdir</id>
            <phase>generate-test-sources</phase>
            <configuration>
              <!-- do not generate if tests are skipped -->
              <skip>${maven.test.skip}</skip>
              <target>
                <mkdir dir="${basedir}/target/surefire-workdir" />
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-project-files</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <rules>
                <requireFilesExist>
                  <files>
                    <file>LICENSE.txt</file>
                    <file>README.txt</file>
                  </files>
                </requireFilesExist>
              </rules>
              <ignoreCache>true</ignoreCache>
              <failFast>true</failFast>
              <fail>true</fail>

            </configuration>
          </execution>

          <execution>
            <id>enforce-site-deploy-classifier</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <rules>
                <requireProperty>
                  <property>siteDeployClassifier</property>
                  <message>"siteDeployClassifier property must be specified."</message>
                  <regex>.+$</regex>
                  <regexMessage>"siteDeployClassifier property can not be empty."</regexMessage>
                </requireProperty>
              </rules>
              <ignoreCache>true</ignoreCache>
              <failFast>true</failFast>
              <fail>true</fail>
            </configuration>
          </execution>

          <execution>
            <id>enforce-platform</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <rules>
                <requireProperty>
                  <property>platform</property>
                  <message>"platform property must be specified."</message>
                  <regex>.+$</regex>
                  <regexMessage>"platform property can not be empty."</regexMessage>
                </requireProperty>
              </rules>
              <ignoreCache>true</ignoreCache>
              <failFast>true</failFast>
              <fail>true</fail>
            </configuration>
          </execution>

          <execution>
            <id>enforce-projectId</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <rules>
                <requireProperty>
                  <property>projectId</property>
                  <message>"projectId property must be specified."</message>
                  <regex>.+$</regex>
                  <regexMessage>"projectId property can not be empty."</regexMessage>
                </requireProperty>
              </rules>
              <ignoreCache>true</ignoreCache>
              <failFast>true</failFast>
              <fail>true</fail>
            </configuration>
          </execution>

          <execution>
            <id>enforce-java-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>${javaVersion}</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>

        </executions>
      </plugin>

    </plugins>
    <!-- Enabling the use of scpexe with maven 3.0 -->
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh-external</artifactId>
        <version>${wagonSshExternalVersion}</version>
      </extension>
    </extensions>
  </build>

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

  <profiles>

    <!-- use this profile to deploy a snapshot site -->
    <profile>
      <id>snapshot-site</id>

      <properties>
        <siteDeployClassifier>develop</siteDeployClassifier>
      </properties>

    </profile>

    <!-- perform only on a release stage when using the maven-release-plugin -->
    <profile>
      <id>release-profile</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <properties>

        <maven.root.dir>${session.executionRootDirectory}</maven.root.dir>

        <!-- ////////////////////////////////////////////////////////////////// -->
        <!-- //// Redmine configuration                                    //// -->
        <!-- ////////////////////////////////////////////////////////////////// -->

        <redmine.safe>false</redmine.safe>
        <redmine.url>http://forge.${platform}</redmine.url>
        <redmine.projectId>${projectId}</redmine.projectId>
        <redmine.xmlPath>${maven.root.dir}/target/changes/changes.xml</redmine.xmlPath>
        <redmine.collectedArtifacts>${maven.root.dir}/target/collect-artifacts.txt</redmine.collectedArtifacts>
        <redmine.collectedAttachments>${maven.root.dir}/target/collect-attachments.txt</redmine.collectedAttachments>
        <redmine.deploymentUrl>${repository.home.url}</redmine.deploymentUrl>

        <!-- since v 4.0, can execute some mojo not on root module -->
        <redmine.runOnlyOnRoot>false</redmine.runOnlyOnRoot>
        <helper.runOnlyOnRoot>false</helper.runOnlyOnRoot>

      </properties>

      <build>

        <plugins>

          <!-- always compute source jar -->
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- always compute javadoc jar -->
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

        </plugins>

      </build>
    </profile>

    <!-- perform only on a release stage when using the maven-release-plugin -->
    <profile>
      <id>license-profile</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <build>

        <defaultGoal>generate-resources</defaultGoal>

        <plugins>

          <!-- add license and third-party files to build -->
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-licenses</id>
                <goals>
                  <goal>update-project-license</goal>
                  <goal>add-third-party</goal>
                </goals>
                <configuration>
                  <licenseMerges>
                    <licenseMerge>
                      The Apache Software License, Version 2.0|Apache License, Version 2.0|Apache License V2.0|Apache
                      2|ASF 2.0|apache-2.0|Apache Public License 2.0
                    </licenseMerge>
                    <licenseMerge>BSD License|BSD license|BSD</licenseMerge>
                    <licenseMerge>MIT License|MIT license|MIT</licenseMerge>
                    <licenseMerge>
                      Lesser General Public License (LPGL) v 2.1|GNU Lesser General Public License, 2.1|LGPL 2.1
                    </licenseMerge>
                    <licenseMerge>
                      Lesser General Public License (LPGL)|GNU Lesser General Public License|GNU LESSER GENERAL PUBLIC
                      LICENSE|LGPL|lgpl
                    </licenseMerge>
                    <licenseMerge>
                      COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0|Common Development and Distribution
                      License (CDDL) v1.0
                    </licenseMerge>
                    <licenseMerge>Indiana University Extreme! Lab Software License, vesion 1.1.1|Indiana University
                      Extreme! Lab Software License
                    </licenseMerge>
                  </licenseMerges>
                </configuration>
              </execution>
            </executions>
          </plugin>

        </plugins>

      </build>
    </profile>

    <!-- perform only on a release to do quality checks on release -->
    <profile>
      <id>release-quality-profile</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <properties>

        <signatureArtifactId>java16</signatureArtifactId>
        <signatureVersion>1.1</signatureVersion>

      </properties>

      <build>
        <plugins>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>animal-sniffer-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <signature>
                    <groupId>org.codehaus.mojo.signature</groupId>
                    <artifactId>${signatureArtifactId}</artifactId>
                    <version>${signatureVersion}</version>
                  </signature>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <id>ensure-no-container-api</id>
                <configuration>
                  <rules>
                    <bannedDependencies>
                      <excludes>
                        <exclude>
                          org.codehaus.plexus:plexus-component-api
                        </exclude>
                      </excludes>
                      <message>
                        The new containers are not supported. You
                        probably added a dependency that is missing the
                        exclusions.
                      </message>
                    </bannedDependencies>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.nuiton</groupId>
            <artifactId>helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>check-central-safe</id>
                <inherited>true</inherited>
                <goals>
                  <goal>check-auto-container</goal>
                </goals>
                <configuration>
                  <addMavenCentral>true</addMavenCentral>
                  <failIfNotSafe>true</failIfNotSafe>
                  <repositories>
                    <central-releases>
                      ${central.release.home.url}
                    </central-releases>
                  </repositories>
                </configuration>
              </execution>
            </executions>
          </plugin>

        </plugins>
      </build>
    </profile>

    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.nuiton</groupId>
            <artifactId>helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>get-pgp-passphrase</id>
                <goals>
                  <goal>share-server-secret</goal>
                </goals>
                <phase>verify</phase>
                <configuration>
                  <serverId>gpg-signer</serverId>
                  <usernameOut>gpg.keyname</usernameOut>
                  <passwordOut>gpg.passphrase</passwordOut>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- This profile update license stuff with new goal update-file-header -->
    <profile>
      <id>update-file-header</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <properties>
        <license.descriptor>src/license/project.xml</license.descriptor>
      </properties>
      <build>
        <defaultGoal>process-resources</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>update-file-header</id>
                <goals>
                  <goal>update-file-header</goal>
                </goals>
                <configuration>
                  <excludes>
                    <exclude>**/i18n/*.properties</exclude>
                    <exclude>**/THIRD-PARTY.properties</exclude>
                    <!-- since sh scripts must begins by the line #!/bin/sh,
                         can not use the mojo for the mojo -->
                    <exclude>**/*.sh</exclude>
                  </excludes>
                </configuration>
                <phase>process-resources</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>analyze-dependencies</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <defaultGoal>verify</defaultGoal>
        <plugins>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <inherited>true</inherited>
            <executions>
              <execution>
                <id>analyze</id>
                <goals>
                  <goal>analyze-only</goal>
                </goals>
                <configuration>
                  <verbose>true</verbose>
                  <failOnWarning>true</failOnWarning>
                  <ignoreNonCompile>true</ignoreNonCompile>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- perform on a release stage (do some redmine actions) -->
    <profile>
      <id>redmine-release-profile</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <properties>
        <!-- fails if redmine goals are not ok -->
        <redmine.safe>true</redmine.safe>
      </properties>

      <reporting>
        <plugins>

          <plugin>
            <artifactId>maven-changes-plugin</artifactId>
            <version>${changesPluginVersion}</version>
            <configuration>
              <issueLinkTemplatePerSystem>
                <redmine>${redmine.issueLinkTemplate}</redmine>
              </issueLinkTemplatePerSystem>
              <xmlPath>${redmine.xmlPath}</xmlPath>
            </configuration>
            <reportSets>
              <reportSet>
                <reports>
                  <report>changes-report</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

          <!-- generate issues report -->
          <plugin>
            <groupId>org.nuiton.jredmine</groupId>
            <artifactId>jredmine-maven-plugin</artifactId>
            <version>${jredminePluginVersion}</version>
            <configuration>
              <columnNames>
                key,summary,status,assignee,tracker,priority,version,category,createdOn
              </columnNames>
            </configuration>
            <reportSets>
              <reportSet>
                <reports>
                  <report>issues-report</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

        </plugins>
      </reporting>
      <build>

        <plugins>

          <!--
          - obtain redmine username
          - collect all artifacts attached to build for announcements
          -->
          <plugin>
            <groupId>org.nuiton</groupId>
            <artifactId>helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>get-redmine-login</id>
                <goals>
                  <goal>share-server-secret</goal>
                </goals>
                <phase>initialize</phase>
                <configuration>
                  <serverId>redmine-forge.${platform}</serverId>
                  <privateKeyOut>redmine.apiKey</privateKeyOut>
                </configuration>
              </execution>
              <execution>
                <id>collect-build-artifacts</id>
                <goals>
                  <goal>collect-files</goal>
                </goals>
                <phase>verify</phase>
                <configuration>
                  <descriptionFile>${redmine.collectedArtifacts}</descriptionFile>
                  <includeAttached>true</includeAttached>
                  <includeSiteAttached>true</includeSiteAttached>
                </configuration>
              </execution>
              <execution>
                <id>collect-build-attachements</id>
                <goals>
                  <goal>collect-files</goal>
                </goals>
                <phase>verify</phase>
                <configuration>
                  <extraFiles>${redmine.releaseFiles}</extraFiles>
                  <descriptionFile>${redmine.collectedAttachments}</descriptionFile>
                  <includeAttached>false</includeAttached>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <!--
          - generate changes.xml file from redmine
          -->
          <plugin>
            <groupId>org.nuiton.jredmine</groupId>
            <artifactId>jredmine-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>jredmine-generate-changes</id>
                <goals>
                  <goal>generate-changes</goal>
                </goals>
                <phase>process-classes</phase>
                <configuration>
                  <generateOnce>true</generateOnce>
                  <actionMapping>fix:1, add:2, update:4</actionMapping>
                </configuration>
              </execution>

            </executions>

          </plugin>

        </plugins>

      </build>
    </profile>

    <!-- profile with all reports (include in release process) -->
    <profile>
      <id>reporting</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <reporting>
        <plugins>

          <plugin>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <version>${projectInfoReportsPluginVersion}</version>
            <reportSets>
              <reportSet>
                <reports>
                  <!-- see https://forge.nuiton.org/issues/3346 -->
                  <!--<report>index</report>-->
                  <report>project-team</report>
                  <report>mailing-list</report>
                  <report>cim</report>
                  <report>issue-tracking</report>
                  <report>license</report>
                  <report>scm</report>
                  <report>dependency-info</report>
                  <report>dependencies</report>
                  <report>dependency-convergence</report>
                  <report>plugin-management</report>
                  <report>plugins</report>
                  <report>dependency-management</report>
                  <report>summary</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${javadocPluginVersion}</version>
            <configuration>
              <quiet>${maven.javadoc.quiet}</quiet>
              <charset>${project.reporting.outputEncoding}</charset>
              <links>
                <link>http://docs.oracle.com/javase/${javadocJreApiVersion}/docs/api/</link>
              </links>
              <!--<excludePackageNames>${maven.javadoc.excludePackageNames}</excludePackageNames>-->
              <tagletArtifacts>
                <tagletArtifact>
                  <groupId>org.apache.maven.plugin-tools</groupId>
                  <artifactId>maven-plugin-tools-javadoc</artifactId>
                  <version>${mavenPluginToolsJavadocVersion}</version>
                </tagletArtifact>
                <tagletArtifact>
                  <groupId>org.codehaus.plexus</groupId>
                  <artifactId>plexus-component-javadoc</artifactId>
                  <version>${plexusComponentJavadocVersion}</version>
                </tagletArtifact>
              </tagletArtifacts>
            </configuration>
            <reportSets>
              <reportSet>
                <reports>
                  <report>javadoc</report>
                  <report>test-javadoc</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

          <!-- changelog:changelog
         changelog:dev-activity
         changelog:file-activity -->
          <!--FIXME : TC-20090816 : there is a bug with fileactivity
          in report, trunk url are prefix with tag/xxx-releaseNumber !-->
          <plugin>
            <artifactId>maven-changelog-plugin</artifactId>
            <version>${changelogPluginVersion}</version>
            <!--configuration>
                <displayFileDetailUrl>http://svn.nuiton.org/svn/${projectId}%FILE%</displayFileDetailUrl>
            </configuration-->
          </plugin>

          <plugin>
            <artifactId>maven-jxr-plugin</artifactId>
            <version>${jrxPluginVersion}</version>
          </plugin>

          <plugin>
            <artifactId>maven-surefire-report-plugin</artifactId>
            <version>${surefirePluginVersion}</version>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <version>${licensePluginVersion}</version>
          </plugin>

          <plugin>
            <groupId>org.codehaus.sonar-plugins</groupId>
            <artifactId>maven-report</artifactId>
            <version>${sonarReportPluginVersion}</version>
            <configuration>
              <sonarHostURL>https://qa.${platform}</sonarHostURL>
            </configuration>
          </plugin>

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

          <!--plugin>
            <groupId>net.sf</groupId>
            <artifactId>stat-scm</artifactId>
            <version>${statScmPluginVersion}</version>
          </plugin-->

        </plugins>
      </reporting>

    </profile>

    <!-- For post-release actions -->
    <profile>
      <id>post-release-profile</id>
      <properties>

        <!-- fails if redmine goals are not ok -->
        <redmine.safe>true</redmine.safe>

        <!-- no dry run for us (we trust the jredmine-m-p !) -->
        <redmine.dryRun>false</redmine.dryRun>

        <!-- release email domain (can change from the exact forge domain name) -->
        <releaseEmailDomain>${platform}</releaseEmailDomain>

        <!-- templates location -->
        <redmine.templateDirectory>http://doc.nuiton.org/common/0.3/announcement/default</redmine.templateDirectory>

        <!-- Default Release annoncement title -->
        <releaseAnnouncementTitle>${session.topLevelProject.name} ${session.topLevelProject.version} released</releaseAnnouncementTitle>

        <!-- FIX #534 unmodifiable parameter when releasing -->
        <helper.smtpHost>smtp</helper.smtpHost>

        <skipReleasePublishAttachments>${skipPostRelease}</skipReleasePublishAttachments>
        <skipReleaseUpdateVersion>${skipPostRelease}</skipReleaseUpdateVersion>
        <skipReleaseSendEmail>${skipPostRelease}</skipReleaseSendEmail>
        <skipReleasePublishNews>${skipPostRelease}</skipReleasePublishNews>

      </properties>

      <build>

        <defaultGoal>validate</defaultGoal>

        <plugins>

          <!--
          - obtain redmine login
          - send announcement email
          -->
          <plugin>
            <groupId>org.nuiton</groupId>
            <artifactId>helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>get-redmine-login</id>
                <goals>
                  <goal>share-server-secret</goal>
                </goals>
                <phase>validate</phase>
                <configuration>
                  <serverId>redmine-forge.${platform}</serverId>
                  <privateKeyOut>redmine.apiKey</privateKeyOut>
                </configuration>
              </execution>

              <execution>
                <id>send-release-email</id>
                <goals>
                  <goal>send-email</goal>
                </goals>
                <phase>install</phase>
                <!--inherited>false</inherited-->
                <configuration>

                  <!-- for a multi-module just run on root project -->
                  <runOnce>true</runOnce>
                  <skipSendEmail>${skipReleaseSendEmail}</skipSendEmail>

                  <emailTitle>
                    [ANN] - ${releaseAnnouncementTitle}
                  </emailTitle>
                  <emailContentFile>
                    target/generated-sources/announcement/release-email-announcement.vm
                  </emailContentFile>
                  <mailSender>
                    <name>${platform} Release Notification</name>
                    <email>noreply@${releaseEmailDomain}</email>
                  </mailSender>
                  <toAddresses>
                    <item>${projectId}-commits@list.${releaseEmailDomain}</item>
                  </toAddresses>
                  <!--smtpHost>smtp</smtpHost-->
                  <!-- fix bug #146 -->
                  <encoding>iso-8859-1</encoding>

                </configuration>
              </execution>

            </executions>
          </plugin>

          <!--
          - publish attachments
          - generate news announcement
          - generate email announcement
          - update version
          - publish news announcement
          - create next version
          -->
          <plugin>
            <groupId>org.nuiton.jredmine</groupId>
            <artifactId>jredmine-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>publish-attachments</id>
                <goals>
                  <goal>publish-attachments</goal>
                </goals>
                <phase>verify</phase>
                <configuration>
                  <filesFromProperties>
                    ${redmine.collectedAttachments}
                  </filesFromProperties>

                  <skipPublishAttachments>
                    ${skipReleasePublishAttachments}
                  </skipPublishAttachments>
                </configuration>
              </execution>
              <execution>
                <id>generate-announcements</id>
                <goals>
                  <goal>generate-news-announcement</goal>
                  <goal>generate-email-announcement</goal>
                </goals>
                <phase>verify</phase>
                <configuration>
                  <announceParameters>
                    <releaseProjectGroupId>
                      ${session.topLevelProject.groupId}
                    </releaseProjectGroupId>
                    <releaseProjectArtifactId>
                      ${session.topLevelProject.artifactId}
                    </releaseProjectArtifactId>
                    <releaseProjectVersion>
                      ${session.topLevelProject.version}
                    </releaseProjectVersion>
                  </announceParameters>
                  <skipGenerateEmailAnnouncement>
                    ${skipReleaseSendEmail}
                  </skipGenerateEmailAnnouncement>
                  <skipGenerateNewsAnnouncement>
                    ${skipReleasePublishNews}
                  </skipGenerateNewsAnnouncement>
                  <urlDownload>
                    ${redmine.url}/projects/${projectId}/files
                  </urlDownload>
                  <artifactsFile>${redmine.collectedArtifacts}</artifactsFile>
                </configuration>
              </execution>

              <execution>
                <id>jredmine-release</id>
                <goals>
                  <goal>update-version</goal>
                  <goal>publish-news</goal>
                </goals>
                <phase>install</phase>
                <configuration>
                  <!-- for a multi-module just run on root project -->
                  <runOnce>true</runOnce>
                  <skipUpdateVersion>
                    ${skipReleaseUpdateVersion}
                  </skipUpdateVersion>
                  <skipPublishNews>${skipReleasePublishNews}</skipPublishNews>

                  <!-- udpate-version -->
                  <closeVersion>true</closeVersion>

                  <!-- publish-news -->
                  <newsContentFile>
                    target/generated-sources/announcement/release-news-announcement.vm
                  </newsContentFile>
                  <newsSummary>${project.description}</newsSummary>
                  <newsTitle>
                    ${releaseAnnouncementTitle}
                  </newsTitle>
                </configuration>
              </execution>
            </executions>

          </plugin>

        </plugins>

      </build>
    </profile>

    <!-- do not generate site if no src/site is found for module -->
    <profile>
      <id>no-site</id>
      <activation>
        <file>
          <missing>src/site</missing>
        </file>
      </activation>

      <properties>
        <!-- no site generation -->
        <maven.site.skip>true</maven.site.skip>
        <maven.site.deploy.skip>true</maven.site.deploy.skip>
      </properties>

    </profile>

    <profile>
      <id>maven-3</id>
      <activation>
        <file>
          <!--  This employs that the basedir expression is only recognized by Maven 3.x (see MNG-2363) -->
          <exists>${basedir}</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-site-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-descriptor</id>
                <goals>
                  <goal>attach-descriptor</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- To collect deploy files (used to deploy application to a demo environnement -->

    <profile>
      <id>collect-deploy-files</id>
      <properties>
        <deploy.collectedFiles>
          target/collect-deploy-files.txt
        </deploy.collectedFiles>
      </properties>
      <build>
        <defaultGoal>verify</defaultGoal>

        <plugins>
          <plugin>
            <groupId>org.nuiton</groupId>
            <artifactId>helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>collect-deploy-files</id>
                <goals>
                  <goal>collect-files</goal>
                </goals>
                <phase>verify</phase>
                <configuration>
                  <extraFiles>${deployFiles}</extraFiles>
                  <descriptionFile>
                    ${deploy.collectedFiles}
                  </descriptionFile>
                  <includeAttached>false</includeAttached>
                  <includeSiteAttached>false</includeSiteAttached>
                </configuration>
              </execution>
            </executions>
          </plugin>

        </plugins>
      </build>
    </profile>

    <!-- Profile to build the pom project -->
    <profile>
      <id>internal</id>
      <activation>
        <file>
          <exists>${basedir}/.pom-project-do-not-delete.txt</exists>
        </file>
      </activation>
      <properties>
        <platform>nuiton.org</platform>
        <projectId>pom</projectId>
        <!-- Deploy on central release repository -->
        <release.repository>${central.release.repository}</release.repository>
        <repository.home.url>${central.release.home.url}</repository.home.url>

        <!-- issues status to include in changelog -->
        <redmine.statusIds>3,4,5</redmine.statusIds>

      </properties>
    </profile>

  </profiles>
</project>
