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

Copyright (c) 2016-2023 Objectionary.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.jcabi</groupId>
    <artifactId>parent</artifactId>
    <version>0.67.0</version>
  </parent>
  <groupId>org.eolang</groupId>
  <artifactId>opeo-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <version>0.2.0</version>
  <name>opeo-maven-plugin</name>
  <url>https://objectionary.github.io/opeo-maven-plugin</url>
  <description>Bytecode decompiler to eolang and back</description>
  <inceptionYear>2023</inceptionYear>
  <organization>
    <name>EO</name>
    <url>https://github.com/objectionary/eo</url>
  </organization>
  <licenses>
    <license>
      <name>MIT</name>
      <url>https://www.eolang.org/LICENSE.txt</url>
      <distribution>site</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>1</id>
      <name>Volodya Lombrozo</name>
      <email>volodya.lombrozo@gmail.com</email>
      <organization>open-source</organization>
      <roles>
        <role>Architect</role>
        <role>Developer</role>
      </roles>
      <timezone>+3</timezone>
    </developer>
  </developers>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/objectionary/opeo-maven-plugin/issues</url>
  </issueManagement>
  <scm>
    <connection>scm:git:git@github.com:objectionary/opeo-maven-plugin.git
    </connection>
    <developerConnection>
      scm:git:git@github.com:objectionary/opeo-maven-plugin.git
    </developerConnection>
    <url>https://github.com/objectionary/opeo-maven-plugin</url>
  </scm>
  <ciManagement>
    <system>rultor</system>
    <url>https://www.rultor.com</url>
  </ciManagement>
  <distributionManagement>
    <site>
      <id>github-pages</id>
      <url>https://github.com/objectionary/opeo-maven-plugin</url>
    </site>
  </distributionManagement>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <maven.compiler.release>11</maven.compiler.release>
    <skipITs/>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>3.9.7</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>3.9.7</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>3.9.6</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>3.13.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>2.0.13</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.5.6</version>
    </dependency>
    <dependency>
      <groupId>org.eolang</groupId>
      <artifactId>eo-parser</artifactId>
      <version>0.38.2</version>
    </dependency>
    <dependency>
      <groupId>org.eolang</groupId>
      <artifactId>jeo-maven-plugin</artifactId>
      <version>0.4.4</version>
    </dependency>
    <dependency>
      <groupId>com.jcabi</groupId>
      <artifactId>jcabi-log</artifactId>
      <version>0.24.1</version>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <!-- version from the parent pom -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <!-- version from the parent pom -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <!-- version from the parent pom -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest</artifactId>
      <!-- version from the parent pom -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.jcabi</groupId>
      <artifactId>jcabi-matchers</artifactId>
      <!-- version from the parent pom -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eolang</groupId>
      <artifactId>jucs</artifactId>
      <version>0.2.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
        <filtering>false</filtering>
        <includes>
          <include>**/*.class</include>
          <include>**/*.java</include>
          <include>**/*.eo</include>
          <include>**/*.yaml</include>
          <include>**/*.xmir</include>
        </includes>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <configuration>
          <!--
            The 'spring-fat' integration test is disabled in the default profile.
            It's done intentionally to speed up the build process. However, this
            test is still available in the 'long' profile. So if you want to run
            it, you can use the following command:
            mvn clean install -Plong
          -->
          <pomExcludes>
            <exclude>spring-fat/pom.xml</exclude>
            <!--
              @todo #229:90min Enable the fuse integration test.
               The 'fuse' integration test is disabled in the default profile.
               It uses outdated format of XMIR representation of bytecode.
               We should either update the representation generated or just remove the test.
            -->
            <exclude>fuse/pom.xml</exclude>
          </pomExcludes>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>com.jcabi</groupId>
            <artifactId>jcabi-xml</artifactId>
            <version>0.29.0</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>qulice</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.qulice</groupId>
            <artifactId>qulice-maven-plugin</artifactId>
            <version>0.23.0</version>
            <configuration>
              <license>file:${basedir}/LICENSE.txt</license>
              <excludes>
                <exclude>pmd:/src/test/resources/.*</exclude>
                <exclude>pmd:/src/it/.*</exclude>
                <exclude>checkstyle:/src/test/resources/.*</exclude>
                <exclude>checkstyle:/src/it/.*</exclude>
                <exclude>checkstyle:/src/site/.*</exclude>
                <exclude>duplicatefinder:.*</exclude>
                <!--
                  @todo #1:30min Enable dependency check.
                    The qulice library has an issue related to dependency check.
                    You can find more details here:
                    - https://github.com/yegor256/qulice/issues/1145
                    When this issue is fixed, we should enable dependency check.
                    Don't forget to remove the exclude below and this puzzle.
                -->
                <exclude>dependencies:.*</exclude>
              </excludes>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.github.volodya-lombrozo</groupId>
            <artifactId>jtcop-maven-plugin</artifactId>
            <version>1.2.4</version>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.12</version>
            <configuration>
              <output>
                file
              </output>
            </configuration>
            <executions>
              <execution>
                <id>jacoco-initialize</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
              </execution>
              <execution>
                <id>jacoco-initialize-integration</id>
                <goals>
                  <goal>prepare-agent-integration</goal>
                </goals>
              </execution>
              <execution>
                <id>jacoco-check</id>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <rules>
                    <rule>
                      <element>BUNDLE</element>
                      <limits>
                        <limit>
                          <counter>INSTRUCTION</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>0.65</minimum>
                        </limit>
                        <limit>
                          <counter>LINE</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>0.68</minimum>
                        </limit>
                        <limit>
                          <counter>BRANCH</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>0.39</minimum>
                        </limit>
                        <limit>
                          <counter>COMPLEXITY</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>0.60</minimum>
                        </limit>
                        <limit>
                          <counter>METHOD</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>0.78</minimum>
                        </limit>
                        <limit>
                          <counter>CLASS</counter>
                          <value>MISSEDCOUNT</value>
                          <maximum>7</maximum>
                        </limit>
                      </limits>
                    </rule>
                  </rules>
                </configuration>
              </execution>
              <execution>
                <id>report</id>
                <phase>prepare-package</phase>
                <goals>
                  <goal>report</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>long</id>
      <!--
        This profile is used to run integration tests that take a long time.
        For example, the 'spring-fat' integration test is disabled in the default
        profile.
      -->
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <configuration combine.self="override">
              <!--
                All integration tests are enabled in the 'long' profile.
              -->
              <pomExcludes/>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
