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

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

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

  <properties>

    <!-- extra files to include in release -->
    <redmine.releaseFiles>${redmine.libReleaseFiles}</redmine.releaseFiles>

  </properties>

  <dependencies>

    <!-- compile dependencies -->

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

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

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

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

    <!-- provided dependencies -->

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

    <!-- tests dependencies -->

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>

  </dependencies>

  <build>
    <testResources>
      <testResource>
        <directory>${project.basedir}/src/test/resources</directory>
        <includes>
          <include>**/*</include>
        </includes>
        <excludes>
          <exclude>**/*~</exclude>
        </excludes>
      </testResource>
    </testResources>
  </build>

  <profiles>
    <!-- reporting at release time -->
    <profile>
      <id>reporting</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <reporting>
        <plugins>

          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${javadocPluginVersion}</version>
            <configuration>
              <quiet>true</quiet>
              <tagletArtifacts>
                <tagletArtifact>
                  <groupId>org.apache.maven.plugin-tools</groupId>
                  <artifactId>maven-plugin-tools-javadoc</artifactId>
                  <version>${pluginPluginVersion}</version>
                </tagletArtifact>
                <tagletArtifact>
                  <groupId>org.codehaus.plexus</groupId>
                  <artifactId>plexus-component-javadoc</artifactId>
                  <version>1.5.5</version>
                </tagletArtifact>
              </tagletArtifacts>
            </configuration>
            <reportSets>
              <reportSet>
                <reports>
                  <report>javadoc</report>
                  <report>test-javadoc</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>
        </plugins>
      </reporting>
    </profile>

    <!-- 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>
            <version>${assemblyPluginVersion}</version>
            <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>
