<?xml version="1.0" encoding="UTF-8"?>
<!--
~   Licensed 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>

    <parent>
        <groupId>org.basepom</groupId>
        <artifactId>basepom-oss</artifactId>
        <version>53</version>
        <relativePath />
    </parent>

    <groupId>org.kitei.internal</groupId>
    <artifactId>kitei-root</artifactId>
    <version>9</version>
    <packaging>pom</packaging>

    <properties>
        <project.build.targetJdk>17</project.build.targetJdk>
        <project.build.systemJdk>[17,)</project.build.systemJdk>

        <dep.kitei-rules.version>9</dep.kitei-rules.version>

        <!-- multi-module projects should deploy at the end -->
        <basepom.at-end.deploy>true</basepom.at-end.deploy>
        <basepom.at-end.install>false</basepom.at-end.install>

        <!-- only level 5 pmd allows the builds to pass. -->
        <basepom.pmd.fail-level>4</basepom.pmd.fail-level>

        <!-- fail on all checkstyle violations -->
        <basepom.check.checkstyle-severity>warning</basepom.check.checkstyle-severity>

        <!-- do not fail on javadoc errors -->
        <basepom.check.fail-javadoc>false</basepom.check.fail-javadoc>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Load the pmd rules from the kitei-rules jar -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <dependencies>
                        <dependency>
                            <groupId>org.kitei.internal</groupId>
                            <artifactId>kitei-rules</artifactId>
                            <version>${dep.kitei-rules.version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <rulesets>
                            <ruleset>pmd/kitei.xml</ruleset>
                        </rulesets>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <dependencies>
                        <dependency>
                            <groupId>org.kitei.internal</groupId>
                            <artifactId>kitei-rules</artifactId>
                            <version>${dep.kitei-rules.version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <configLocation>checkstyle/kitei.xml</configLocation>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <dependencies>
                        <dependency>
                            <groupId>org.kitei.internal</groupId>
                            <artifactId>kitei-rules</artifactId>
                            <version>${dep.kitei-rules.version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <excludeFilterFile>spotbugs/kitei-exclusions.xml</excludeFilterFile>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration combine.children="append">
                    <author>false</author>
                    <detectJavaApiLink>true</detectJavaApiLink>
                    <linksource>true</linksource>
                    <nodeprecated>false</nodeprecated>
                    <nohelp>true</nohelp>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
</project>
