<?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.basepom</groupId>
        <artifactId>basepom-oss</artifactId>
        <version>35</version>
    </parent>

    <groupId>org.basepom.maven</groupId>
    <artifactId>dependency-versions-check-maven-plugin</artifactId>
    <version>3.2.0</version>
    <packaging>maven-plugin</packaging>

    <description>
        The dependency-versions-check plugin verifies that all resolved
        versions of artifacts are at least the versions specified by
        the project dependencies.

        The Maven dependency resolution process will substitute versions for
        the different artifacts in a dependency tree and sometimes chooses incompatible
        versions which leads to difficult to detect problems.

        This plugin resolves all dependencies and collects any requested version. It evaluates
        whether the resolved versions are compatible to the requested versions and reports possible
        conflicts.
    </description>
    <inceptionYear>2020</inceptionYear>

    <url>https://basepom.github.io/dependency-versions-check-maven-plugin/</url>

    <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>tomdz</id>
            <name>Thomas Dudziak</name>
            <url>http://tomdz.org</url>
            <timezone>-8</timezone>
        </developer>
        <developer>
            <id>hgschmie</id>
            <name>Henning Schmiedehausen</name>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/basepom/dependency-versions-check-maven-plugin.git</connection>
        <developerConnection>scm:git:git://github.com/basepom/dependency-versions-check-maven-plugin.git</developerConnection>
        <tag>dependency-versions-check-maven-plugin-3.2.0</tag>
        <url>https://github.com/basepom/dependency-versions-check-maven-plugin</url>
    </scm>

    <issueManagement>
        <system>Github</system>
        <url>https://github.com/basepom/dependency-versions-check-maven-plugin/issues</url>
    </issueManagement>

    <properties>
        <project.build.systemJdk>11</project.build.systemJdk>
        <project.build.targetJdk>8</project.build.targetJdk>

        <maven.site.deploy.skip>true</maven.site.deploy.skip>
        <!-- site requires full javadoc generation -->
        <basepom.javadoc.skip>false</basepom.javadoc.skip>

        <dep.maven-api.version>3.6.3</dep.maven-api.version>
        <dep.maven-resolver.version>1.4.2</dep.maven-resolver.version>
        <dep.plexus.version>2.1.0</dep.plexus.version>
        <dep.plugin.plugin.version>3.6.0</dep.plugin.plugin.version>
        <dep.slf4j.version>1.7.30</dep.slf4j.version>
        <dep.guava.version>29.0-jre</dep.guava.version>
        <dep.junit5.version>5.7.0</dep.junit5.version>

        <dep.plugin.jxr.version>3.0.0</dep.plugin.jxr.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.errorprone</groupId>
                <artifactId>error_prone_annotations</artifactId>
                <version>2.4.0</version>
            </dependency>
            <dependency>
                <groupId>org.sonatype.plexus</groupId>
                <artifactId>plexus-cipher</artifactId>
                <version>1.7</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>

        <!-- Maven provided dependencies -->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${dep.maven-api.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>${dep.plugin.plugin.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>${dep.maven-api.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>${dep.maven-api.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${dep.maven-api.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.resolver</groupId>
            <artifactId>maven-resolver-api</artifactId>
            <version>${dep.maven-resolver.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-component-annotations</artifactId>
            <version>${dep.plexus.version}</version>
            <scope>provided</scope>
        </dependency>

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

        <!-- Maven APIs -->

        <dependency>
            <groupId>org.apache.maven.resolver</groupId>
            <artifactId>maven-resolver-util</artifactId>
            <version>${dep.maven-resolver.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-shared-utils</artifactId>
            <version>3.3.3</version>
        </dependency>

        <!-- other dependencies -->

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

        <!-- Test code -->

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${dep.junit5.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${dep.junit5.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>${dep.plugin.plugin.version}</version>
                    <configuration>
                        <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-component-metadata</artifactId>
                    <version>${dep.plexus.version}</version>
                </plugin>

                <plugin>
                    <groupId>com.github.github</groupId>
                    <artifactId>site-maven-plugin</artifactId>
                    <version>0.12</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <configuration>
                    <rules combine.children="append">
                        <requireProperty>
                            <property>project.build.targetJdk</property>
                            <regex>^8$</regex>
                            <regexMessage>Project must be built with JDK8 target.</regexMessage>
                        </requireProperty>
                    </rules>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>help-goal</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-metadata</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate-metadata</goal>
                        </goals>
                    </execution>
                </executions>
            </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>

            <plugin>
                <groupId>org.basepom.maven</groupId>
                <artifactId>duplicate-finder-maven-plugin</artifactId>
                <configuration>
                    <exceptions>
                        <!--
                            different parts of maven use different things to resolve dependencies.
                            Classworlds somehow sorts that out, but the duplicate finder does not know that.
                            So exclude this conflict.
                        -->
                        <exception>
                            <conflictingDependencies>
                                <dependency>
                                    <groupId>org.apache.maven.resolver</groupId>
                                    <artifactId>maven-resolver-util</artifactId>
                                </dependency>
                                <dependency>
                                    <groupId>org.eclipse.aether</groupId>
                                    <artifactId>aether-util</artifactId>
                                </dependency>
                            </conflictingDependencies>
                            <packages>
                                <package>org.eclipse.aether.util</package>
                            </packages>
                        </exception>
                    </exceptions>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <dependencies>
                    <!-- Fluido is listed here for version update checking only -->
                    <dependency>
                        <groupId>org.apache.maven.skins</groupId>
                        <artifactId>maven-fluido-skin</artifactId>
                        <version>1.9</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>com.github.github</groupId>
                <artifactId>site-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>site-deploy</phase>
                        <goals>
                            <goal>site</goal>
                        </goals>
                        <configuration>
                            <server>github</server>
                            <message>Creating site for ${project.version}</message>
                            <noJekyll>true</noJekyll>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.1.1</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>summary</report>
                            <report>team</report>
                            <report>scm</report>
                            <report>issue-management</report>
                            <report>ci-management</report>
                            <report>dependency-info</report>
                            <report>dependencies</report>
                        </reports>
                    </reportSet>
        </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>${dep.plugin.surefire.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <additionalJOption>--no-module-directories</additionalJOption>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>${dep.plugin.jxr.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>pmd</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>plugin-test</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>${project.groupId}</groupId>
                        <artifactId>${project.artifactId}</artifactId>
                        <version>${project.version}</version>
                        <executions>
                            <execution>
                                <phase>validate</phase>
                                <goals>
                                    <goal>check</goal>
                                    <goal>list</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <transitiveConflictFailsBuild>false</transitiveConflictFailsBuild>
                            <directConflictFailsBuild>true</directConflictFailsBuild>
                            <fastResolution>false</fastResolution>
                            <conflictOnly>false</conflictOnly>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
