<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.kitei.internal</groupId>
        <artifactId>kitei-root</artifactId>
        <version>7</version>
    </parent>

    <groupId>org.basepom.maven</groupId>
    <artifactId>basepom-maven-plugins-root</artifactId>
    <version>1</version>
    <packaging>pom</packaging>
    <name>Basepom Maven Plugins</name>

    <inceptionYear>2022</inceptionYear>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <organization>
        <name>The basepom project</name>
        <url>https://github.com/basepom</url>
    </organization>

    <developers>
        <developer>
            <id>hgschmie</id>
            <name>Henning Schmiedehausen</name>
            <timezone>-8</timezone>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/basepom/maven-plugins.git</connection>
        <developerConnection>scm:git:git://github.com/basepom/maven-plugins.git</developerConnection>
        <url>https://github.com/basepom/maven-plugins</url>
      <tag>maven-plugins-v1</tag>
  </scm>

    <issueManagement>
        <system>Github</system>
        <url>https://github.com/basepom/maven-plugins/issues</url>
    </issueManagement>

    <properties>
        <project.build.targetJdk>11</project.build.targetJdk>
        <basepom.release.tag-name-format>maven-plugins-v@{project.version}</basepom.release.tag-name-format>
        <!-- site is built in the plugin subdirectory -->
        <basepom.site.skip>true</basepom.site.skip>

        <dep.slf4j.version>1.7.36</dep.slf4j.version>
        <dep.guava.version>31.0.1-jre</dep.guava.version>
        <dep.junit5.version>5.8.2</dep.junit5.version>
        <dep.joda-time.version>2.10.14</dep.joda-time.version>
    </properties>

    <modules>
        <module>property-helper</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${dep.slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${dep.slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${dep.guava.version}</version>
            </dependency>

            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>${dep.joda-time.version}</version>
            </dependency>

            <dependency>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-annotations</artifactId>
                <version>${dep.spotbugs.version}</version>
            </dependency>

            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${dep.junit5.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <!-- all plugins have different versions -->
                        <autoVersionSubmodules>false</autoVersionSubmodules>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.skins</groupId>
                            <artifactId>maven-fluido-skin</artifactId>
                            <version>1.11.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <configuration>
                        <excludeRoots combine.children="append">
                            <excludeRoot>target/generated-sources/plugin</excludeRoot>
                        </excludeRoots>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <configuration>
                    <rulesets>
                        <ruleset>pmd/kitei.xml</ruleset>
                    </rulesets>
                    <minimumTokens>100</minimumTokens>
                    <excludeRoots>
                        <excludeRoot>*/target/generated-sources/**</excludeRoot>
                    </excludeRoots>
                </configuration>
            </plugin>

            <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>
    <profiles>
        <profile>
            <id>plugin-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>enforce-java17</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireJavaVersion>
                                            <version>[17,)</version>
                                        </requireJavaVersion>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
