<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.polychro</groupId>
  <artifactId>polychro-parent</artifactId>
  <version>1.0.0-alpha4</version>
  <packaging>pom</packaging>
  <name>Polychro</name>
  <description>Polyglot Spec Linting Engine</description>
  <url>https://github.com/naftiko/polychro</url>
  <inceptionYear>2026</inceptionYear>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>eskenazit</id>
      <name>Thomas Eskenazi</name>
      <url>https://github.com/eskenazit</url>
    </developer>
    <developer>
      <id>jlouvel</id>
      <name>Jerome Louvel</name>
      <url>https://github.com/jlouvel</url>
    </developer>
  </developers>
  <modules>
    <module>polychro-api</module>
    <module>polychro-wellformedness</module>
    <module>polychro-json-schema</module>
    <module>polychro-json-structure</module>
    <module>polychro-ruleset</module>
    <module>polychro-ruleset-polyglot</module>
    <module>polychro-rulesets</module>
    <module>polychro-core</module>
    <module>polychro-capability</module>
    <module>polychro-cli</module>
    <module>polychro-github-action</module>
    <module>polychro-markdown</module>
    <module>polychro-format-common</module>
    <module>polychro-html</module>
    <module>polychro-checkov</module>
    <module>polychro-coverage</module>
  </modules>
  <scm>
    <connection>scm:git:https://github.com/naftiko/polychro.git</connection>
    <developerConnection>scm:git:ssh://github.com:naftiko/polychro.git</developerConnection>
    <url>https://github.com/naftiko/polychro</url>
  </scm>
  <distributionManagement>
    <repository>
      <id>github</id>
      <name>GitHub Releases</name>
      <url>https://maven.pkg.github.com/naftiko/polychro</url>
    </repository>
    <snapshotRepository>
      <id>github</id>
      <name>GitHub Snapshots</name>
      <url>https://maven.pkg.github.com/naftiko/polychro</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <maven.compiler.release>21</maven.compiler.release>
    <json-path.version>2.9.0</json-path.version>
    <graalvm.polyglot.version>24.2.1</graalvm.polyglot.version>
    <jacoco.line.min>0.75</jacoco.line.min>
    <jsoup.version>1.18.3</jsoup.version>
    <jackson.version>2.20.2</jackson.version>
    <jacoco.version>0.8.13</jacoco.version>
    <revision>1.0.0-alpha4</revision>
    <slf4j.version>2.0.17</slf4j.version>
    <picocli.version>4.7.6</picocli.version>
    <json-schema-validator.version>1.0.87</json-schema-validator.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <junit.version>5.12.2</junit.version>
    <jacoco.branch.min>0.65</jacoco.branch.min>
    <json-structure.version>0.5.5</json-structure.version>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.polychro</groupId>
        <artifactId>polychro-format-common</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-yaml</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-xml</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.networknt</groupId>
        <artifactId>json-schema-validator</artifactId>
        <version>${json-schema-validator.version}</version>
      </dependency>
      <dependency>
        <groupId>com.jayway.jsonpath</groupId>
        <artifactId>json-path</artifactId>
        <version>${json-path.version}</version>
      </dependency>
      <dependency>
        <groupId>org.json-structure</groupId>
        <artifactId>json-structure</artifactId>
        <version>${json-structure.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jsoup</groupId>
        <artifactId>jsoup</artifactId>
        <version>${jsoup.version}</version>
      </dependency>
      <dependency>
        <groupId>org.graalvm.polyglot</groupId>
        <artifactId>polyglot</artifactId>
        <version>${graalvm.polyglot.version}</version>
      </dependency>
      <dependency>
        <groupId>org.graalvm.polyglot</groupId>
        <artifactId>js</artifactId>
        <version>${graalvm.polyglot.version}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>info.picocli</groupId>
        <artifactId>picocli</artifactId>
        <version>${picocli.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.14.0</version>
          <configuration>
            <release>21</release>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.5.3</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.version}</version>
          <executions>
            <execution>
              <id>prepare-agent</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>report</id>
              <phase>test</phase>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
            <execution>
              <id>check</id>
              <phase>verify</phase>
              <goals>
                <goal>check</goal>
              </goals>
              <configuration>
                <haltOnFailure>true</haltOnFailure>
                <rules>
                  <rule>
                    <element>BUNDLE</element>
                    <limits>
                      <limit>
                        <counter>LINE</counter>
                        <value>COVEREDRATIO</value>
                        <minimum>${jacoco.line.min}</minimum>
                      </limit>
                      <limit>
                        <counter>BRANCH</counter>
                        <value>COVEREDRATIO</value>
                        <minimum>${jacoco.branch.min}</minimum>
                      </limit>
                    </limits>
                  </rule>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>flatten-maven-plugin</artifactId>
          <version>1.6.0</version>
          <executions>
            <execution>
              <id>flatten</id>
              <phase>process-resources</phase>
              <goals>
                <goal>flatten</goal>
              </goals>
            </execution>
            <execution>
              <id>flatten-clean</id>
              <phase>clean</phase>
              <goals>
                <goal>clean</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <updatePomFile>true</updatePomFile>
            <flattenMode>resolveCiFriendliesOnly</flattenMode>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.6.3</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <doclint>none</doclint>
            <source>21</source>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.3.1</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>central</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.10.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>central</publishingServerId>
              <autoPublish>true</autoPublish>
              <waitUntil>published</waitUntil>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
