<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  Empreintes-edit ToolBox :: Maven plugin
  %%
  Copyright (C) 2019 - 2022 Ultreia.io
  %%
  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>

  <parent>
    <groupId>io.ultreia.empreintes.edit</groupId>
    <artifactId>toolbox</artifactId>
    <version>1.0.0</version>
  </parent>

  <groupId>io.ultreia.empreintes.edit.toolbox</groupId>
  <artifactId>toolbox-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <name>Empreintes-edit ToolBox :: Maven plugin</name>

  <dependencies>

    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>model</artifactId>
      <version>${project.version}</version>
    </dependency>

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

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

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

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

    <!-- dependencies to mojo annotations -->
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-1.2-api</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-jcl</artifactId>
      <scope>runtime</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>

      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
        <configuration>
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>helpmojo</goal>
              <goal>descriptor</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- expose new plexus components -->
      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-metadata</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>generate-metadata</goal>
            </goals>
          </execution>
        </executions>
      </plugin>


    </plugins>
  </build>

  <profiles>

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

      <reporting>

        <plugins>

          <plugin>
            <artifactId>maven-plugin-plugin</artifactId>
            <version>${plugin.version.plugins}</version>
          </plugin>

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

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

          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${plugin.version.javadoc}</version>
            <configuration>
              <quiet>true</quiet>
            </configuration>
            <reportSets>
              <reportSet>
                <reports>
                  <report>javadoc</report>
                  <report>test-javadoc</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>

        </plugins>
      </reporting>

    </profile>

  </profiles>
</project>
