<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  Helper Maven Plugin
  %%
  Copyright (C) 2009 - 2026 Code Lutin
  %%
  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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.nuiton</groupId>
  <artifactId>helper-maven-plugin-parent</artifactId>
  <version>2.5.0-RC-2-SNAPSHOT</version>
  <packaging>pom</packaging>

  <name>Helper Maven Plugin</name>
  <description>Toolbox to help creating new maven plugins</description>
  <url>https://gitlab.nuiton.org/nuiton/maven-helper-plugin</url>
  <inceptionYear>2009</inceptionYear>

  <organization>
    <name>Code Lutin</name>
    <url>https://www.codelutin.com/</url>
  </organization>

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

  <developers/>

  <modules>
    <module>helper-maven-plugin-api</module>
    <module>helper-maven-plugin-test-api</module>
    <module>helper-maven-plugin</module>
  </modules>

  <scm>
    <url>https://gitlab.nuiton.org/nuiton/maven-helper-plugin</url>
    <connection>scm:git:git@gitlab.nuiton.org:nuiton/maven-helper-plugin.git</connection>
    <developerConnection>scm:git:git@gitlab.nuiton.org:nuiton/maven-helper-plugin.git</developerConnection>
  </scm>

  <issueManagement>
    <system>gitlab</system>
    <url>https://gitlab.nuiton.org/nuiton/maven-helper-plugin/issues</url>
  </issueManagement>

  <ciManagement>
    <system>gitlab-ci</system>
    <url>https://gitlab.nuiton.org/nuiton/maven-helper-plugin/pipelines</url>
  </ciManagement>

  <distributionManagement>
    <repository>
      <id>nuiton-nexus-deploy</id>
      <url>https://nexus.nuiton.org/nexus/content/repositories/central-releases</url>
    </repository>
    <snapshotRepository>
      <id>nuiton-nexus-deploy</id>
      <url>https://nexus.nuiton.org/nexus/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>

    <gitlabProjectName>maven-helper-plugin</gitlabProjectName>

    <plexusMailSenderVersion>1.0-alpha-2</plexusMailSenderVersion>

    <!-- documentation is in english -->
    <locales>en</locales>

    <mavenVersion>3.9.15</mavenVersion>

    <javaVersion>1.8</javaVersion>
    <signatureArtifactId>java18</signatureArtifactId>
    <signatureVersion>1.0</signatureVersion>

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

    <!-- apache maven plugins version -->
    <antRunPluginVersion>3.2.0</antRunPluginVersion>
    <assemblyPluginVersion>3.8.0</assemblyPluginVersion>
    <cleanPluginVersion>3.5.0</cleanPluginVersion>
    <compilerPluginVersion>3.15.0</compilerPluginVersion>
    <dependencyPluginVersion>3.10.0</dependencyPluginVersion>
    <deployPluginVersion>3.1.4</deployPluginVersion>
    <enforcerPluginVersion>3.6.2</enforcerPluginVersion>
    <gpgPluginVersion>3.2.8</gpgPluginVersion>
    <installPluginVersion>3.1.4</installPluginVersion>
    <invokerPluginVersion>3.10.1</invokerPluginVersion>
    <jarPluginVersion>3.5.0</jarPluginVersion>
    <jarSignerPluginVersion>3.1.0</jarSignerPluginVersion>
    <javadocPluginVersion>3.12.0</javadocPluginVersion>
    <pluginPluginVersion>3.15.2</pluginPluginVersion>
    <resourcesPluginVersion>3.5.0</resourcesPluginVersion>
    <sitePluginVersion>4.0.0-M16</sitePluginVersion>
    <sourcePluginVersion>3.4.0</sourcePluginVersion>
    <surefirePluginVersion>3.5.5</surefirePluginVersion>

    <!-- codehaus mojo plugins -->
    <animalSnifferPluginVersion>1.27</animalSnifferPluginVersion>
    <licensePluginVersion>2.7.1</licensePluginVersion>
    <versionsPluginVersion>2.21.0</versionsPluginVersion>

    <!-- others plugins -->
    <jacocoPluginVersion>0.8.14</jacocoPluginVersion>
    <gitflowPluginVersion>1.21.0</gitflowPluginVersion>

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

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

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

    <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>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// 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                            //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

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

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

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

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

    <!--par defaut on déploie tout-->
    <maven.deploy.skip>false</maven.deploy.skip>
    <!--par default on construit la javadoc-->
    <maven.javadoc.skip>false</maven.javadoc.skip>
    <!--par defaut on construit les sources-->
    <maven.source.skip>false</maven.source.skip>
  </properties>

  <build>

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

    <pluginManagement>
      <plugins>

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

        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${assemblyPluginVersion}</version>
        </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-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>
            </archive>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${javadocPluginVersion}</version>
          <configuration>
            <quiet>true</quiet>
            <charset>${project.reporting.outputEncoding}</charset>
            <links>
              <link>https://docs.oracle.com/en/java/javase/${javaVersion}/docs/api/index.html</link>
            </links>
            <tagletArtifacts>
              <tagletArtifact>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-tools-javadoc</artifactId>
                <version>3.5.2</version>
              </tagletArtifact>
              <tagletArtifact>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-javadoc</artifactId>
                <version>1.7.1</version>
              </tagletArtifact>
            </tagletArtifacts>
          </configuration>
        </plugin>

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

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

        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>${sitePluginVersion}</version>
        </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>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>${versionsPluginVersion}</version>
          <configuration>
            <generateBackupPoms>false</generateBackupPoms>
          </configuration>
        </plugin>

        <plugin>
          <groupId>com.amashchenko.maven.plugin</groupId>
          <artifactId>gitflow-maven-plugin</artifactId>
          <version>${gitflowPluginVersion}</version>
          <configuration>
            <verbose>true</verbose>

            <gitFlowConfig>
              <productionBranch>${gitflow.masterBranchName}</productionBranch>
              <developmentBranch>${gitflow.developBranchName}</developmentBranch>
              <versionTagPrefix>${gitlabProjectName}-</versionTagPrefix>
            </gitFlowConfig>

            <commitMessagePrefix>[gitflow-maven-plugin] </commitMessagePrefix>

            <!-- On ignore les tests pendant le release-finish ... -->
            <skipTestProject>true</skipTestProject>
            <!-- ... pour en réalité faire un verify complet avec -DperformRelease -->
            <preReleaseGoals>clean verify -DperformRelease</preReleaseGoals>
            <!-- Et on déploie ensuite -->
            <postReleaseGoals>deploy -DperformRelease -Dmaven.test.skip</postReleaseGoals>
          </configuration>
        </plugin>

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

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

        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacocoPluginVersion}</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>

      <!--For sonar code coverage-->
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>default-report</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <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>

    <!-- 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>

  <dependencyManagement>
    <dependencies>

      <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.3.6</version>
      </dependency>

      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.20.0</version>
      </dependency>

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

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>3.3.0</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-sec-dispatcher</artifactId>
        <version>2.0</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-container-default</artifactId>
        <version>2.1.1</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>plexus</groupId>
        <artifactId>plexus-mail-sender-api</artifactId>
        <version>${plexusMailSenderVersion}</version>
        <exclusions>
          <exclusion>
            <groupId>plexus</groupId>
            <artifactId>plexus-container-default</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <!-- provided dependencies -->

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>${mavenVersion}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-model</artifactId>
        <version>${mavenVersion}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-settings</artifactId>
        <version>${mavenVersion}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-artifact</artifactId>
        <version>${mavenVersion}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-compat</artifactId>
        <version>${mavenVersion}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${mavenVersion}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.resolver</groupId>
        <artifactId>maven-resolver-api</artifactId>
        <version>1.9.27</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-aether-provider</artifactId>
        <version>3.3.9</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.eclipse.aether</groupId>
        <artifactId>aether-api</artifactId>
        <version>1.1.0</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.eclipse.sisu</groupId>
        <artifactId>org.eclipse.sisu.plexus</artifactId>
        <version>0.3.4</version>
      </dependency>

      <!-- dependencies to mojo annotations -->
      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>${pluginPluginVersion}</version>
        <scope>compile</scope>
      </dependency>

      <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>1.5.0-b01</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-provider-api</artifactId>
        <version>3.3.4</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.velocity</groupId>
        <artifactId>velocity-engine-core</artifactId>
        <version>2.4.1</version>
      </dependency>

      <!-- tests dependencies -->

      <dependency>
        <groupId>org.apache.maven.plugin-testing</groupId>
        <artifactId>maven-plugin-testing-harness</artifactId>
        <version>3.3.0</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
        <scope>test</scope>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <profiles>

    <!-- 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>

        <!-- since v 4.0, can execute some mojo not on root module -->
        <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>

      <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>
              <execution>
                <id>enforce-bytecode-version</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <enforceBytecodeVersion>
                      <maxJdkVersion>${javaVersion}</maxJdkVersion>
                    </enforceBytecodeVersion>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>extra-enforcer-rules</artifactId>
                <version>1.12.0</version>
              </dependency>
            </dependencies>
          </plugin>

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

    <!-- FIXME AThimel 12/05/2026 Il faut revoir la façon dont on signe ce projet pour ne pas dépendre d'une ancienne version du plugin -->
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <properties>
        <!-- Disable this execution if no GPG signature is expected -->
        <helper.skipShareServerSecret>${gpg.skip}</helper.skipShareServerSecret>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.nuiton</groupId>
            <artifactId>helper-maven-plugin</artifactId>
            <!-- On utilise une ancienne version du plugin pour pouvoir lire les credentials -->
            <version>2.4.2</version>
            <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>
              <execution>
                <id>update-pom-header</id>
                <goals>
                  <goal>update-file-header</goal>
                </goals>
                <configuration>
                  <roots>
                    <root>${project.basedir}</root>
                  </roots>
                  <includes>
                    <include>pom.xml</include>
                  </includes>
                </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>
  </profiles>

</project>
