<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>com.buschmais.jqassistant</groupId>
    <artifactId>jqa-uber-parent</artifactId>
    <version>2.0.0-RC2</version>
    <packaging>pom</packaging>

    <name>jQAssistant Ueber Parent</name>
    <url>https://jqassistant.org/</url>

    <description>
        Maven Parent POM for all projects of the jQAssistant ecosystem.
        It provides comman and usefull settings shared by all
        jQAssistant projects.
    </description>

    <organization>
        <name>jQAssistant Development Team</name>
        <url>https://jqassistant.org</url>
    </organization>

    <licenses>
        <license>
            <name>GNU General Public License, v3</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.html</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:jqassistant/jqa-uber-parent.git</connection>
        <developerConnection>scm:git:git@github.com:jqassistant/jqa-uber-parent.git</developerConnection>
        <url>https://github.com/jqassistant/jqa-uber-parent/</url>
        <tag>HEAD</tag>
    </scm>

    <prerequisites>
        <maven>3.2</maven>
    </prerequisites>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <pluginRepositories>
        <pluginRepository>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </pluginRepository>
    </pluginRepositories>

    <developers>
        <developer>
            <id>dirk-mahler</id>
            <name>Dirk Mahler</name>
            <email>dirk.mahler@buschmais.com</email>
        </developer>
        <developer>
            <id>oliver.b.fischer</id>
            <name>Oliver B. Fischer</name>
            <email>o.b.fischer@swe-blog.net</email>
        </developer>
    </developers>

    <properties>
        <assertj.version>3.22.0</assertj.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <doxia-markdown.version>1.9</doxia-markdown.version>
        <com.buschmais.xo.version>2.1.0</com.buschmais.xo.version>
        <io.smallrye.config.version>3.1.1</io.smallrye.config.version>
        <guava.version>30.0-jre</guava.version>
        <caffeine.version>2.8.4</caffeine.version>
        <jaxb-api.version>2.4.0-b180830.0359</jaxb-api.version>
        <maven.ant.version>3.1.0</maven.ant.version>
        <maven.assembly.version>3.3.0</maven.assembly.version>
        <maven.buildhelper.version>3.2.0</maven.buildhelper.version>
        <maven.checkstyle.version>3.1.0</maven.checkstyle.version>
        <maven.owasp-dependency-check.version>7.0.4</maven.owasp-dependency-check.version>
        <maven.clean.version>3.1.0</maven.clean.version>
        <maven.compiler.version>3.10.1</maven.compiler.version>
        <maven.dependency.version>3.3.0</maven.dependency.version>
        <maven.deploy.version>3.0.0-M1</maven.deploy.version>
        <maven.enforcer.version>3.0.0</maven.enforcer.version>
        <maven.failsafe.version>3.0.0-M6</maven.failsafe.version>
        <maven.install.version>3.0.0-M1</maven.install.version>
        <maven.jar.version>3.2.2</maven.jar.version>
        <maven.javadoc.version>3.4.0</maven.javadoc.version>
        <maven.jaxb2-plugin.version>0.15.1</maven.jaxb2-plugin.version>

        <!--
         ! This two properties controls on which severity of constraint
         ! violations jQAssistant will fail a build or issue a warning.
         !
         ! Please do not configure this as parameter of the plugin
         ! configuration. This way is the only one which allows
         ! us to override these parameters on the commandline.
         ! Oliver B. Fischer, 2017-06-07
         !-->
        <jqassistant.warnOnSeverity>INFO</jqassistant.warnOnSeverity>
        <jqassistant.failOnSeverity>MINOR</jqassistant.failOnSeverity>

        <lombok-maven-plugin.version>1.18.20.0</lombok-maven-plugin.version>
        <!--
         ! The current version of jQAssistant is always scanned by the
         ! previous version of jQAssistant.
         !                          Oliver B. Fischer, 2015-11-27
         !-->
        <maven.jqassistant.previous.version>1.12.2</maven.jqassistant.previous.version>
        <maven.min.version>3.5.0</maven.min.version>
        <maven.resources.version>3.0.2</maven.resources.version>
        <maven.shade.version>3.1.1</maven.shade.version>
        <maven.site.version>3.4</maven.site.version>
        <maven.source.plugin>3.2.1</maven.source.plugin>
        <maven.surefire.version>${maven.failsafe.version}</maven.surefire.version>
        <maven.xml.version>1.0.2</maven.xml.version>
        <org.asciidoctor-plugin.version>2.2.1</org.asciidoctor-plugin.version>
        <junit.version>5.9.1</junit.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.asciidoctor</groupId>
                    <artifactId>asciidoctor-maven-plugin</artifactId>
                    <version>${org.asciidoctor-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.buschmais.jqassistant</groupId>
                    <artifactId>jqassistant-maven-plugin</artifactId>
                    <version>${maven.jqassistant.previous.version}</version>
                    <executions>
                        <execution>
                            <id>default</id>
                            <goals>
                                <goal>scan</goal>
                                <goal>analyze</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <!--
                         ! To not configure failOnSeverity and warnOnSeverity
                         ! directly. Please control these parameters via
                         ! the user properties set in the properties section
                         ! of the Ueber Parent of jQAssistant.
                         ! Oliver B. Fischer, 2017-06-07
                         !-->
                        <scanIncludes>
                            <scanInclude>
                                <path>${project.basedir}/readme.adoc</path>
                            </scanInclude>
                            <scanInclude>
                                <path>${project.basedir}/src/main/asciidoc</path>
                            </scanInclude>
                            <scanInclude>
                                <path>${project.basedir}/.editorconfig</path>
                            </scanInclude>
                            <scanInclude>
                                <path>${project.basedir}/LICENSE</path>
                            </scanInclude>
                        </scanIncludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>${maven.ant.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${maven.checkstyle.version}</version>
                    <configuration>
                        <sourceDirectories>
                            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
                        </sourceDirectories>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${maven.clean.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${maven.failsafe.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${maven.assembly.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.projectlombok</groupId>
                    <artifactId>lombok-maven-plugin</artifactId>
                    <version>${lombok-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>delombok</goal>
                            </goals>
                            <configuration>
                                <skip>true</skip>
                                <addOutputDirectory>false</addOutputDirectory>
                                <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.version}</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                        <source>11</source>
                        <target>11</target>
                        <testSource>11</testSource>
                        <testTarget>11</testTarget>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven.javadoc.version}</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                        <detectJavaApiLink>false</detectJavaApiLink>
                        <doclint>none</doclint>
                        <sourcepath>${project.basedir}/src/main/java;${project.build.directory}/generated-sources/delombok;${project.build.directory}/generated-sources/xjc</sourcepath>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven.install.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven.jar.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.jvnet.jaxb2.maven2</groupId>
                    <artifactId>maven-jaxb2-plugin</artifactId>
                    <version>${maven.jaxb2-plugin.version}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>generate</goal>
                            </goals>
                            <configuration>
                                <schemaDirectory>src/main/resources/META-INF/xsd</schemaDirectory>
                                <!-- Provide namespace in each generated class to avoid problems loading this information from package-info.java on Java 11 and newer -->
                                <packageLevelAnnotations>false</packageLevelAnnotations>
                                <args>
                                    <arg>-mark-generated</arg>
                                    <arg>-Xdefault-value</arg>
                                    <arg>-Xno-comment</arg>
                                </args>
                                <plugins>
                                    <plugin>
                                        <groupId>org.jvnet.jaxb2_commons</groupId>
                                        <artifactId>jaxb2-default-value</artifactId>
                                        <version>1.1</version>
                                    </plugin>
                                    <!--
                                     ! This is a custom plugin which suppresses the generation
                                     ! of JavaDoc descriptions. We this as our JavaDoc is written
                                     ! in Asciidoctor and the JAXB 2 plugin generated the standard
                                     ! JavaDoc descriptions.
                                     ! Oliver B. Fischer, 2016-12-26
                                     !-->
                                    <plugin>
                                        <groupId>com.buschmais.x2j.nocomment</groupId>
                                        <artifactId>nocomment-plugin</artifactId>
                                        <version>0.1</version>
                                    </plugin>
                                </plugins>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${maven.shade.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven.dependency.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven.deploy.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven.enforcer.version}</version>
                    <executions>
                        <execution>
                            <id>enforce-plugin-versions</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireMavenVersion>
                                        <version>[${maven.min.version},)</version>
                                    </requireMavenVersion>
                                    <requireSameVersions>
                                        <plugins>
                                            <plugin>org.apache.maven.plugins:maven-surefire-plugin</plugin>
                                            <plugin>org.apache.maven.plugins:maven-failsafe-plugin</plugin>
                                            <plugin>org.apache.maven.plugins:maven-surefire-report-plugin</plugin>
                                        </plugins>
                                    </requireSameVersions>
                                    <requirePluginVersions>
                                        <message>Best Practice is to always define plugin versions!</message>
                                        <banLatest>true</banLatest>
                                        <banRelease>true</banRelease>
                                        <banSnapshots>true</banSnapshots>
                                        <phases>clean,deploy,site</phases>
                                    </requirePluginVersions>
                                </rules>
                            </configuration>
                        </execution>
                        <execution>
                            <id>enforce-java-version</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireJavaVersion>
                                        <version>[11,)</version>
                                    </requireJavaVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven.resources.version}</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven.site.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.doxia</groupId>
                            <artifactId>doxia-module-markdown</artifactId>
                            <version>${doxia-markdown.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.asciidoctor</groupId>
                            <artifactId>asciidoctor-maven-plugin</artifactId>
                            <version>${org.asciidoctor-plugin.version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <skipDeploy>true</skipDeploy>
                    </configuration>
                </plugin>


                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven.source.plugin}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${maven.buildhelper.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>xml-maven-plugin</artifactId>
                    <version>${maven.xml.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>${maven.owasp-dependency-check.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>enable-sonatype-snapshots</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <repositories>
                <repository>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <id>sonatype-nexus-snapshots</id>
                    <name>Sonatype Nexus Snapshots</name>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </repository>
            </repositories>
        </profile>
        <profile>
            <id>IT</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                                <configuration>
                                    <argLine>-Xmx768M -XX:+HeapDumpOnOutOfMemoryError</argLine>
                                    <forkCount>1</forkCount>
                                    <reuseForks>false</reuseForks>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>owasp</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.owasp</groupId>
                        <artifactId>dependency-check-maven</artifactId>
                        <version>${maven.owasp-dependency-check.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <skipProvidedScope>true</skipProvidedScope>
                                    <skipSystemScope>true</skipSystemScope>
                                    <skipTestScope>true</skipTestScope>
                                    <formats>
                                        <format>CSV</format>
                                        <format>XML</format>
                                        <format>HTML</format>
                                    </formats>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <!--
             ! This profile is automatically activated by using maven-release-plugin:perfom.
             ! So this mean signing of artifacts is only done in case of running a release.
             !-->
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>enforce-release-versions</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireReleaseDeps/>
                                        <requireReleaseVersion/>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>IntelliJ</id>
            <activation>
                <activeByDefault>false</activeByDefault>
                <property>
                    <name>idea.maven.embedder.version</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>2.0.1.Final</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye.config</groupId>
                <artifactId>smallrye-config-core</artifactId>
                <version>${io.smallrye.config.version}</version>
            </dependency>
            <dependency>
                <groupId>io.smallrye.config</groupId>
                <artifactId>smallrye-config-source-yaml</artifactId>
                <version>${io.smallrye.config.version}</version>
            </dependency>
            <!-- required by smallry config -->
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>javax.annotation-api</artifactId>
                <version>1.3.2</version>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

</project>