<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  Helper Maven Plugin :: Test Api
  %%
  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>

  <parent>
    <groupId>org.nuiton</groupId>
    <artifactId>helper-maven-plugin-parent</artifactId>
    <version>2.5.0</version>
  </parent>

  <artifactId>helper-maven-plugin-test-api</artifactId>

  <name>Helper Maven Plugin :: Test Api</name>
  <description>Simple maven mojo test api for our projects</description>

  <dependencies>

    <!-- compile dependencies -->

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

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

    <!-- provided dependencies -->

    <!--<dependency>-->
      <!--<groupId>org.codehaus.plexus</groupId>-->
      <!--<artifactId>plexus-container-default</artifactId>-->
    <!--</dependency>-->

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-compat</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.resolver</groupId>
      <artifactId>maven-resolver-api</artifactId>
    </dependency>

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

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

    <dependency>
      <groupId>org.eclipse.sisu</groupId>
      <artifactId>org.eclipse.sisu.plexus</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <scope>compile</scope>
      <exclusions>

        <exclusion>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-archiver</artifactId>
        </exclusion>

        <exclusion>
          <groupId>org.apache.maven.wagon</groupId>
          <artifactId>wagon-http-lightweight</artifactId>
        </exclusion>

        <exclusion>
          <groupId>org.apache.maven.wagon</groupId>
          <artifactId>wagon-file</artifactId>
        </exclusion>

        <exclusion>
          <groupId>org.apache.maven.wagon</groupId>
          <artifactId>wagon-ssh</artifactId>
        </exclusion>

        <exclusion>
          <groupId>org.apache.maven.reporting</groupId>
          <artifactId>maven-reporting-api</artifactId>
        </exclusion>

      </exclusions>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>compile</scope>
    </dependency>

  </dependencies>

  <build>

  </build>

  <profiles>

    <!-- prepare the assembly at release time -->
    <profile>
      <id>release-assembly-profile</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <build>
        <defaultGoal>package</defaultGoal>
        <plugins>

          <!-- build release zip files -->
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <!-- La dépendance est nécessaire pour récupérer les descriptors définis dans ce module -->
            <dependencies>
              <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>helper-maven-plugin-api</artifactId>
                <version>${project.version}</version>
              </dependency>
            </dependencies>

            <executions>
              <execution>
                <id>create-assemblies</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <attach>false</attach>
              <descriptorRefs>
                <descriptorRef>deps</descriptorRef>
                <descriptorRef>full</descriptorRef>
              </descriptorRefs>
            </configuration>
          </plugin>

        </plugins>
      </build>

    </profile>


  </profiles>
</project>
