<?xml version="1.0"?>
<!--
The MIT License (MIT)

Copyright (c) 2020 artipie.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<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>com.artipie</groupId>
    <artifactId>ppom</artifactId>
    <version>0.3.4</version>
  </parent>
  <artifactId>rpm-adapter</artifactId>
  <version>1.1</version>
  <name>rpm-files</name>
  <description>Turns your files/objects into RPM artifacts</description>
  <url>https://github.com/artipie/rpm-adapter</url>
  <inceptionYear>2019</inceptionYear>
  <licenses>
    <license>
      <name>MIT</name>
      <url>https://github.com/artipie/rpm-adapter/blob/master/LICENSE.txt</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>1</id>
      <name>Yegor Bugayenko</name>
      <email>yegor256@gmail.com</email>
      <organization>yegor256.com</organization>
      <organizationUrl>https://www.yegor256.com</organizationUrl>
      <roles>
        <role>Architect</role>
        <role>Developer</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
  </developers>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/artipie/rpm-adapter/issues</url>
  </issueManagement>
  <scm>
    <connection>scm:git:git@github.com:artipie/rpm-adapter.git</connection>
    <developerConnection>scm:git:git@github.com:artipie/rpm-adapter.git</developerConnection>
    <url>https://github.com/artipie/rpm-adapter</url>
  </scm>
  <ciManagement>
    <system>rultor</system>
    <url>https://www.rultor.com/s/rpm-adapter</url>
  </ciManagement>
  <distributionManagement>
    <site>
      <id>github-pages</id>
      <url>https://github.com/artipie/rpm-adapter</url>
    </site>
  </distributionManagement>
  <dependencies>
    <dependency>
      <groupId>org.redline-rpm</groupId>
      <artifactId>redline</artifactId>
      <version>1.2.9</version>
    </dependency>
    <dependency>
      <groupId>com.artipie</groupId>
      <artifactId>http</artifactId>
      <version>0.15.6</version>
    </dependency>
    <dependency>
      <groupId>javax.xml.bind</groupId>
      <artifactId>jaxb-api</artifactId>
      <version>2.3.0</version>
    </dependency>
    <dependency>
      <groupId>com.artipie</groupId>
      <artifactId>asto</artifactId>
      <version>0.25</version>
    </dependency>
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>1.4</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>28.2-jre</version>
    </dependency>
    <dependency>
      <groupId>com.amihaiemil.web</groupId>
      <artifactId>eo-yaml</artifactId>
      <version>5.1.0</version>
    </dependency>
    <dependency>
      <groupId>com.jcabi</groupId>
      <artifactId>jcabi-matchers</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.jcabi</groupId>
      <artifactId>jcabi-xml</artifactId>
      <version>0.21.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.llorllale</groupId>
      <artifactId>cactoos-matchers</artifactId>
      <version>0.18</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <version>${junit-platform.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xmlunit</groupId>
      <artifactId>xmlunit-core</artifactId>
      <version>2.6.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xmlunit</groupId>
      <artifactId>xmlunit-matchers</artifactId>
      <version>2.6.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-core</artifactId>
      <version>2.3.0.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <version>2.3.0.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.activation</groupId>
      <artifactId>activation</artifactId>
      <version>1.1.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.artipie</groupId>
      <artifactId>vertx-server</artifactId>
      <version>0.3.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers</artifactId>
      <version>1.14.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>1.14.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>mockserver</artifactId>
      <version>1.14.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.30</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <testResources>
      <testResource>
        <directory>${basedir}/src/test/resources</directory>
        <filtering>true</filtering>
      </testResource>
      <testResource>
        <directory>${basedir}/src/test/resources-binary</directory>
        <filtering>false</filtering>
      </testResource>
    </testResources>
    <resources>
      <resource>
        <directory>${basedir}/src/test/resources-binary</directory>
        <excludes>
          <exclude>**/repodata/**</exclude>
        </excludes>
      </resource>
    </resources>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.qulice</groupId>
          <artifactId>qulice-maven-plugin</artifactId>
          <configuration>
            <excludes combine.children="append">
              <exclude>checkstyle:/src/test/resources-binary/.*</exclude>
              <exclude>checkstyle:/src/test/resources-binary/rpms/.*</exclude>
            </excludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <finalName>rpm-adapter</finalName>
          <archive>
            <manifest>
              <mainClass>com.artipie.rpm.Cli</mainClass>
            </manifest>
          </archive>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
          <appendAssemblyId>false</appendAssemblyId>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.5</version>
        <configuration>
          <output>file</output>
        </configuration>
        <executions>
          <execution>
            <id>jacoco-initialize</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>jacoco-check</id>
            <phase>test</phase>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <rules>
                <rule>
                  <element>BUNDLE</element>
                  <limits>
                    <limit>
                      <counter>INSTRUCTION</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.75</minimum>
                    </limit>
                    <limit>
                      <counter>LINE</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.75</minimum>
                    </limit>
                    <limit>
                      <counter>BRANCH</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.75</minimum>
                    </limit>
                    <limit>
                      <counter>COMPLEXITY</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.75</minimum>
                    </limit>
                    <limit>
                      <counter>METHOD</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.75</minimum>
                    </limit>
                    <limit>
                      <counter>CLASS</counter>
                      <value>MISSEDCOUNT</value>
                      <maximum>4</maximum>
                    </limit>
                  </limits>
                </rule>
              </rules>
            </configuration>
          </execution>
          <execution>
            <id>jacoco-site</id>
            <phase>verify</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>cli</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>make-assembly</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <finalName>rpm-adapter</finalName>
              <archive>
                <manifest>
                  <mainClass>com.artipie.rpm.Cli</mainClass>
                </manifest>
              </archive>
              <descriptorRefs>
                <descriptorRef>jar-with-dependencies</descriptorRef>
              </descriptorRefs>
              <appendAssemblyId>false</appendAssemblyId>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>itcase</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
              <parallel>none</parallel>
              <trimStackTrace>false</trimStackTrace>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
