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

Copyright (c) 2025 Volodya Lombrozo

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 NONINFRINGEMENT. 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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.github.volodya-lombrozo</groupId>
  <artifactId>xnav</artifactId>
  <packaging>jar</packaging>
  <version>0.1.10</version>
  <name>xnav</name>
  <description>
    Xnav is a library designed for seamless navigation and querying of XML documents
  </description>
  <inceptionYear>2025</inceptionYear>
  <url>https://github.com/volodya-lombrozo/xnav</url>
  <scm>
    <connection>
        scm:git:git://github.com/volodya-lombrozo/xnav.git
      </connection>
    <developerConnection>
        scm:git:ssh://github.com/volodya-lombrozo/xnav.git
      </developerConnection>
    <url>
        https://github.com/volodya-lombrozo/xnav/tree/main
    </url>
  </scm>
  <licenses>
    <license>
      <name>MIT License</name>
      <url>http://www.opensource.org/licenses/mit-license.php</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Volodya Lombrozo</name>
      <email>volodya.lombrozo@gmail.com</email>
      <roles>
        <role>Architect</role>
      </roles>
    </developer>
  </developers>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <argLine/>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>2.0.16</version>
    </dependency>
    <dependency>
      <groupId>com.jcabi</groupId>
      <artifactId>jcabi-log</artifactId>
      <version>0.24.3</version>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.36</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.yegor256</groupId>
      <artifactId>together</artifactId>
      <version>0.1.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>2.0.16</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>5.11.4</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <version>5.11.4</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>5.11.4</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest</artifactId>
      <version>3.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <!-- JUnit 5 requires Surefire version 2.22.0 or higher -->
        <version>3.5.2</version>
        <configuration>
          <argLine>@{argLine}</argLine>
        </configuration>
      </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>pmd:/src/test/java/XnavUsage.java</exclude>
                <exclude>checkstyle:/src/test/resources/.*</exclude>
                <exclude>checkstyle:/src/main/java/com/github/lombrozo/xnav/Xpath.java</exclude>
                <exclude>checkstyle:/src/it/.*</exclude>
                <exclude>checkstyle:/src/test/java/XnavUsage.java</exclude>
                <exclude>duplicatefinder:.*</exclude>
                <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.3.5</version>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <exclusions>src/test/java/XnavUsage.java</exclusions>
                </configuration>
              </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.70</minimum>
                        </limit>
                        <limit>
                          <counter>LINE</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>0.80</minimum>
                        </limit>
                        <limit>
                          <counter>BRANCH</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>0.80</minimum>
                        </limit>
                        <limit>
                          <counter>COMPLEXITY</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>0.80</minimum>
                        </limit>
                        <limit>
                          <counter>METHOD</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>0.80</minimum>
                        </limit>
                        <limit>
                          <counter>CLASS</counter>
                          <value>MISSEDCOUNT</value>
                          <maximum>1</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>release</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.11.2</version>
            <configuration>
              <doclint>none</doclint>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.3.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.2.7</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.7.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>central</publishingServerId>
              <tokenAuth>true</tokenAuth>
              <autoPublish>true</autoPublish>
              <waitUntil>published</waitUntil>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>benchmark</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.gmavenplus</groupId>
            <artifactId>gmavenplus-plugin</artifactId>
            <version>4.1.1</version>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <scripts>
                <script>file:///${project.basedir}/src/main/groovy/benchmark.groovy</script>
              </scripts>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>com.github.volodya-lombrozo</groupId>
                <artifactId>xnav</artifactId>
                <version>${project.version}</version>
              </dependency>
              <dependency>
                <groupId>org.dom4j</groupId>
                <artifactId>dom4j</artifactId>
                <version>2.1.4</version>
              </dependency>
              <dependency>
                <groupId>jaxen</groupId>
                <artifactId>jaxen</artifactId>
                <version>2.0.0</version>
              </dependency>
              <dependency>
                <groupId>org.eolang</groupId>
                <artifactId>jeo-maven-plugin</artifactId>
                <version>0.7.3</version>
              </dependency>
              <dependency>
                <groupId>net.sf.saxon</groupId>
                <artifactId>Saxon-HE</artifactId>
                <version>12.5</version>
              </dependency>
              <dependency>
                <groupId>org.apache.groovy</groupId>
                <artifactId>groovy</artifactId>
                <version>4.0.25</version>
                <scope>runtime</scope>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>docs</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.gmavenplus</groupId>
            <artifactId>gmavenplus-plugin</artifactId>
            <version>4.1.1</version>
            <executions>
              <execution>
                <phase>process-resources</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <scripts>
                <script>file:///${project.basedir}/src/main/groovy/update-examples.groovy</script>
              </scripts>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>org.apache.groovy</groupId>
                <artifactId>groovy</artifactId>
                <version>4.0.25</version>
                <scope>runtime</scope>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
