<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2025, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ WSO2 LLC. licenses this file to you under the Apache License,
  ~ Version 2.0 (the "License"); you may not use this file except
  ~ in compliance with the License. You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->
<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>

    <groupId>org.wso2.carbon</groupId>
    <artifactId>rule-validator-parent</artifactId>
    <version>0.2.0</version>
    <packaging>pom</packaging>

    <name>WSO2 - Rule Validator POM</name>

    <parent>
        <groupId>org.wso2</groupId>
        <artifactId>wso2</artifactId>
        <version>1.4</version>
    </parent>

    <modules>
        <module>component</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.snakeyaml</groupId>
                <artifactId>snakeyaml-engine</artifactId>
                <version>${org.snakeyaml.snakeyaml.engine.version}</version>
            </dependency>
            <dependency>
                <groupId>com.jayway.jsonpath</groupId>
                <artifactId>json-path</artifactId>
                <version>${com.jayway.jsonpath.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${com.google.code.gson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.erosb</groupId>
                <artifactId>everit-json-schema</artifactId>
                <version>${com.github.erosb.everit-json-schema.version}</version>
            </dependency>
            <dependency>
                <groupId>org.reflections</groupId>
                <artifactId>reflections</artifactId>
                <version>${org.reflections.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${apache.commons.lang3.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>${junit.jupiter.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven.checkstyle.plugin.version}</version>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>compile</phase>
                        <configuration>
                            <configLocation>
                                https://raw.githubusercontent.com/wso2/code-quality-tools/v1.2/checkstyle/checkstyle.xml
                            </configLocation>
                            <suppressionsLocation>suppressions.xml</suppressionsLocation>
                            <encoding>UTF-8</encoding>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
                            <excludes>**/gen/**/*</excludes>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>${maven.spotbugsplugin.version}</version>
                <configuration>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                    <xmlOutput>true</xmlOutput>
                    <spotbugsXmlOutputDirectory>${project.build.directory}/spotbugs</spotbugsXmlOutputDirectory>
                    <!--Exclude sources-->
                    <excludeFilterFile>${maven.spotbugsplugin.exclude.file}</excludeFilterFile>
                </configuration>
                <executions>
                    <execution>
                        <id>analyze-compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>Sonatype-public</id>
            <name>SnakeYAML repository</name>
            <url>http://oss.sonatype.org/content/groups/public/</url>
        </repository>
    </repositories>

    <scm>
        <url>https://github.com/wso2/rule-validator.git</url>
        <developerConnection>scm:git:https://github.com/wso2/rule-validator.git</developerConnection>
        <connection>scm:git:https://github.com/wso2/rule-validator.git</connection>
        <tag>v0.2.0</tag>
    </scm>

    <properties>
        <project.scm.id>scm-server</project.scm.id>
        <maven.checkstyle.plugin.version>3.0.0</maven.checkstyle.plugin.version>
        <maven.spotbugsplugin.version>4.8.2.0</maven.spotbugsplugin.version>
        <apache.commons.lang3.version>3.12.0</apache.commons.lang3.version>
        <org.snakeyaml.snakeyaml.engine.version>2.9</org.snakeyaml.snakeyaml.engine.version>
        <com.jayway.jsonpath.version>2.9.0</com.jayway.jsonpath.version>
        <com.google.code.gson.version>2.11.0</com.google.code.gson.version>
        <compiler.plugin.version>3.0</compiler.plugin.version>
        <com.github.erosb.everit-json-schema.version>1.14.4</com.github.erosb.everit-json-schema.version>
        <org.reflections.version>0.10.2</org.reflections.version>
        <org.apache.maven.compiler.plugin.version>3.13.0</org.apache.maven.compiler.plugin.version>
        <maven.checkstyle.plugin.version>3.0.0</maven.checkstyle.plugin.version>
        <maven.bundle.plugin>6.0.0</maven.bundle.plugin>
        <maven.spotbugsplugin.version>4.8.2.0</maven.spotbugsplugin.version>
        <apache.commons.lang3.version>3.12.0</apache.commons.lang3.version>
        <junit.jupiter.version>5.10.0</junit.jupiter.version>
        <maven.spotbugsplugin.exclude.file>spotbugs-exclude.xml</maven.spotbugsplugin.exclude.file>
    </properties>
</project>
