<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>com.buschmais.jqassistant</groupId>
        <artifactId>jqa-uber-parent</artifactId>
        <version>2.0.0-M2</version>
        <relativePath/>
    </parent>

    <groupId>com.buschmais.jqassistant</groupId>
    <artifactId>jqassistant-maven-plugin</artifactId>
    <version>2.0.0-M2</version>

    <name>jQAssistant Plugin for Apache Maven</name>
    <url>https://jqassistant.org/</url>

    <packaging>maven-plugin</packaging>

    <description>
        jQAssistant plugin for Apache Maven to integrate jQAssistant
        into a Maven based project.
    </description>

    <licenses>
        <license>
            <name>GNU General Public License, v3</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.html</url>
        </license>
    </licenses>

    <organization>
        <name>jQAssistant Development Team</name>
        <url>https://jqassistant.org</url>
    </organization>

    <scm>
        <connection>scm:git:git@github.com:jqassistant/jqa-maven-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:jqassistant/jqa-maven-plugin.git</developerConnection>
        <url>https://github.com/jqassistant/jqa-maven-plugin</url>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <checkstyle.version>8.29</checkstyle.version>
        <jqa-asciidoctor-utilities.version>2.0.0-M2</jqa-asciidoctor-utilities.version>
        <jqa-bom.version>2.0.0-SNAPSHOT</jqa-bom.version>
        <jqa-core-framework.version>2.0.0-M2</jqa-core-framework.version>
        <jqa-distribution-spec.version>2.0.0-M2</jqa-distribution-spec.version>
        <jqa-own-constraints.version>2.0.0-M2</jqa-own-constraints.version>
        <org.apache.maven.version>3.5.0</org.apache.maven.version>
        <org.apache.maven_project_version>2.2.1</org.apache.maven_project_version>
        <org.apache.maven.reporting_version>3.0.0</org.apache.maven.reporting_version>
        <hamcrest.version>2.0.0.0</hamcrest.version>
        <maven-invoker-plugin.version>3.2.2</maven-invoker-plugin.version>

        <!--
         ! Properties used for the IT with the Maven Invoker Plugin.
         ! We must maintain this list manually as each plugin now have
         ! his own lifecyle inclusive versioning.
         ! Oliver B. Fischer, 2016-10-30
         !-->
        <it.jqa.core.version>2.0.0-M2</it.jqa.core.version>
        <it.jqa.java-plugin.version>2.0.0-M2</it.jqa.java-plugin.version>
        <it.jqa.plugin-common.version>2.0.0-M2</it.jqa.plugin-common.version>
        <org.apache.maven_dependency-tree.version>3.1.0</org.apache.maven_dependency-tree.version>
    </properties>

    <profiles>
        <profile>
            <id>IT</id>
            <properties>
                <maven.invoker.localRepositoryPath>${project.build.directory}/local-repo</maven.invoker.localRepositoryPath>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>checkstyle</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
                            <logViolationsToConsole>true</logViolationsToConsole>
                            <configLocation>checkstyle/jqa-code-style.xml</configLocation>
                            <suppressionsLocation>checkstyle/jqa-code-suppressions.xml</suppressionsLocation>
                            <excludes>**/generated-sources/**/*</excludes>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>com.buschmais.jqassistant</groupId>
                                <artifactId>checkstyle-config</artifactId>
                                <version>${project.parent.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <version>${maven-invoker-plugin.version}</version>
                        <configuration>
                            <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                            <settingsFile>src/it/settings.xml</settingsFile>
                            <mergeUserSettings>false</mergeUserSettings>
                            <localRepositoryPath>${maven.invoker.localRepositoryPath}</localRepositoryPath>
                            <postBuildHookScript>verify</postBuildHookScript>
                            <streamLogs>true</streamLogs>
                            <pomIncludes>
                                <!-- Use -Dinvoker.test=<pattern> to override the configuration below on the commandline -->
                                <include>configuration/*/pom.xml</include>
                                <include>singlemodule/*/pom.xml</include>
                                <include>multimodule/*/*/pom.xml</include>
                                <include>list-plugins/pom.xml</include>
                                <include>plugin/pom.xml</include>
                                <include>yaml/*/pom.xml</include>
                            </pomIncludes>
                        </configuration>
                        <executions>
                            <execution>
                                <id>integration-test</id>
                                <goals>
                                    <goal>install</goal>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>3.6.1</version>
                    <configuration>
                        <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-component-metadata</artifactId>
                    <version>2.1.0</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>generate-metadata</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-plugin-plugin</artifactId>
                                        <versionRange>[3.2,)</versionRange>
                                        <goals>
                                            <goal>descriptor</goal>
                                            <goal>helpmojo</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore/>
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            org.codehaus.plexus
                                        </groupId>
                                        <artifactId>
                                            plexus-component-metadata
                                        </artifactId>
                                        <versionRange>
                                            [1.5.5,)
                                        </versionRange>
                                        <goals>
                                            <goal>
                                                generate-metadata
                                            </goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore/>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>checkstyle</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <logViolationsToConsole>true</logViolationsToConsole>
                    <configLocation>/checkstyle/jqa-code-style.xml</configLocation>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.buschmais.jqassistant</groupId>
                        <artifactId>checkstyle-config</artifactId>
                        <version>${project.parent.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.buschmais.jqassistant</groupId>
                <artifactId>jqassistant-maven-plugin</artifactId>
                <configuration>
                    <!--
                     ! To not configure failOnSeverity and warnOnSeverity
                     ! directly. Please control these parameters via
                     ! the user properties set in the properties section
                     ! of the Ueber Parant of jQAssistant.
                     ! Oliver B. Fischer, 2017-06-07
                     !-->
                    <groups>
                        <group>jqa-legal</group>
                        <group>jqa-maven-constraints</group>
                        <group>jqa-maven-dependency-constraints</group>
                        <group>jqa-project-layout</group>
                    </groups>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.buschmais.jqassistant</groupId>
                        <artifactId>github-integration</artifactId>
                        <version>${jqa-own-constraints.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.buschmais.jqassistant</groupId>
                        <artifactId>legal-constraints</artifactId>
                        <version>${jqa-own-constraints.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.buschmais.jqassistant</groupId>
                        <artifactId>maven-commmon-constraints</artifactId>
                        <version>${jqa-own-constraints.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.buschmais.jqassistant</groupId>
                        <artifactId>project-layout-constraints</artifactId>
                        <version>${jqa-own-constraints.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-metadata</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-asciidoc</id>
                        <!--
                         ! Builds an assembly with all artifacts required to include
                         ! the documentation of the command line tool in
                         ! the user manual
                         !-->
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptorRefs>
                                <descriptorRef>asciidoc</descriptorRef>
                            </descriptorRefs>
                            <delimiters>
                                <!-- do not use ${*} as readme.adoc contains samples that shall not be replaced -->
                                <delimiter>@{*}</delimiter>
                            </delimiters>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.buschmais.jqassistant</groupId>
                        <artifactId>asciidoctor-utilities</artifactId>
                        <version>${jqa-asciidoctor-utilities.version}</version>
                    </dependency>
                </dependencies>

            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.buschmais.jqassistant</groupId>
                <artifactId>bom</artifactId>
                <version>${jqa-bom.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>com.buschmais.jqassistant</groupId>
                <artifactId>jqa-distribution-specification</artifactId>
                <version>${jqa-distribution-spec.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>com.buschmais.jqassistant.core</groupId>
            <artifactId>shared</artifactId>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.core</groupId>
            <artifactId>configuration</artifactId>
        </dependency>
        <!--
         ! Depedencies to artifacts from the jQAssistant ecosystem
         ! which are not jQAssistant plugins must be added here!
         !-->
        <dependency>
            <groupId>com.buschmais.jqassistant.core</groupId>
            <artifactId>report</artifactId>
        </dependency>

        <dependency>
            <groupId>com.buschmais.jqassistant.core</groupId>
            <artifactId>plugin</artifactId>
            <!--
             ! Inherit the version information of this dependency from
             ! the distribution specification after solving
             ! https://github.com/buschmais/jqa-distribution-specification/issues/1
             ! Oliver B. Fischer, 2016-10-27
             !-->
            <version>${jqa-core-framework.version}</version>
        </dependency>

        <!--
         ! Dependencies to plugins of jQAssistant must be added here!
         !-->
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>java</artifactId>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>json</artifactId>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>maven3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>xml</artifactId>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant.plugin</groupId>
            <artifactId>yaml2</artifactId>
        </dependency>
        <!--
         ! I M P O R T A N T
         !
         ! The declaration of this dependency is required as Maven if
         ! not able to download declared dependencies of plugins.
         ! Oliver B. Fischer, 2017-04-11
         ! todo Check if this hack is still required
         !
         ! Try the following to check if this is still required
         ! - mvn - - version
         ! - Remove the dependency com.buschmais.jqassistant:asciidoctor-utilities
         ! - mvn -Dmaven.repo.local=<somepath> clean install
         !-->
        <dependency>
            <groupId>com.buschmais.jqassistant</groupId>
            <artifactId>asciidoctor-utilities</artifactId>
            <version>${jqa-asciidoctor-utilities.version}</version>
            <!-- The scope must be provided otherwise it will be part of the distribution -->
            <scope>provided</scope>
        </dependency>

        <!--
         ! All non-jQAssistant go below!
         !-->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${org.apache.maven.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${org.apache.maven.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>${org.apache.maven.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-project</artifactId>
            <version>${org.apache.maven_project_version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-dependency-tree</artifactId>
            <version>${org.apache.maven_dependency-tree.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.reporting</groupId>
            <artifactId>maven-reporting-impl</artifactId>
            <version>${org.apache.maven.reporting_version}</version>
            <exclusions>
                <exclusion>
                    <!-- Conflicts with httpcore from jQAssistnt M2 Repo Plugin -->
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpcore</artifactId>
                </exclusion>
                <exclusion>
                    <artifactId>commons-logging</artifactId>
                    <groupId>commons-logging</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.googlecode.slf4j-maven-plugin-log</groupId>
            <artifactId>slf4j-maven-plugin-log</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>java-hamcrest</artifactId>
            <version>${hamcrest.version}</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

</project>