<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (C) 2020 GZoltar contributors.

  This file is part of GZoltar.

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

  GZoltar 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 Lesser
  General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License along with GZoltar. If
  not, see <https://www.gnu.org/licenses/>.
-->
<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>com.gzoltar</groupId>
    <artifactId>com.gzoltar.build</artifactId>
    <version>1.7.3</version>
    <relativePath>../com.gzoltar.build</relativePath>
  </parent>

  <artifactId>com.gzoltar</artifactId>
  <packaging>pom</packaging>

  <name>GZoltar :: Distribution</name>
  <description>GZoltar Standalone Distribution</description>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.core</artifactId>
      <version>${project.version}</version>
      <classifier>javadoc</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.core</artifactId>
      <version>${project.version}</version>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.agent</artifactId>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.agent</artifactId>
      <version>${project.version}</version>
      <classifier>javadoc</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.agent</artifactId>
      <version>${project.version}</version>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.agent</artifactId>
      <version>${project.version}</version>
      <classifier>runtime</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.agent.rt</artifactId>
      <version>${project.version}</version>
      <classifier>javadoc</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.agent.rt</artifactId>
      <version>${project.version}</version>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.fl</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.fl</artifactId>
      <version>${project.version}</version>
      <classifier>javadoc</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.fl</artifactId>
      <version>${project.version}</version>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.report</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.report</artifactId>
      <version>${project.version}</version>
      <classifier>javadoc</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.report</artifactId>
      <version>${project.version}</version>
      <classifier>sources</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.ant</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.ant</artifactId>
      <version>${project.version}</version>
      <classifier>jar-with-dependencies</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.cli</artifactId>
      <version>${project.version}</version>
      <classifier>jar-with-dependencies</classifier>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>com.gzoltar.doc</artifactId>
      <version>${project.version}</version>
      <classifier>javadoc</classifier>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <finalName>gzoltar-${dist.version}</finalName>
              <appendAssemblyId>false</appendAssemblyId>
              <descriptors>
                <descriptor>assembly.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-distribution-size</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>verify</phase>
            <configuration>
              <rules>
                <requireFilesSize>
                  <maxsize>15000000</maxsize>
                  <minsize>10000000</minsize>
                  <files>
                    <file>${project.build.directory}/gzoltar-${dist.version}.zip</file>
                  </files>
                </requireFilesSize>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
