<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>parent</artifactId>
        <version>2.9.0</version>
    </parent>

    <artifactId>jqassistant-maven-plugin</artifactId>

    <name>jQAssistant Plugin for Apache Maven</name>
    <packaging>maven-plugin</packaging>

    <description>
        jQAssistant plugin for Apache Maven to integrate jQAssistant
        into a Maven based project.
    </description>

    <properties>
        <org.apache.maven_project_version>2.2.1</org.apache.maven_project_version>
        <org.apache.maven.reporting_version>3.2.0</org.apache.maven.reporting_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
         !-->
        <org.apache.maven_dependency-tree.version>3.3.0</org.apache.maven_dependency-tree.version>
    </properties>

    <profiles>
        <profile>
            <id>IT</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <configuration>
                            <settingsFile>src/it/settings.xml</settingsFile>
                            <pomIncludes>
                                <!-- Use -Dinvoker.test=<pattern> to override the configuration below on the commandline -->
                                <include>analyze/*/pom.xml</include>
                                <include>cli/*/pom.xml</include>
                                <include>configuration/*/pom.xml</include>
                                <include>context/*/pom.xml</include>
                                <include>multimodule/*/*/pom.xml</include>
                                <include>neo4j-plugin/pom.xml</include>
                                <include>plugin/pom.xml</include>
                                <include>singlemodule/*/pom.xml</include>
                                <include>yaml/*/pom.xml</include>
                            </pomIncludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <resources>
            <resource>
                <directory>${project.basedir}/src/main/resources</directory>
                <includes>
                    <include>.jqassistant.yml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>${project.basedir}/src/main/resources</directory>
                <excludes>
                    <exclude>.jqassistant.yml</exclude>
                </excludes>
                <filtering>false</filtering>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>3.15.2</version>
                    <configuration>
                        <requiredJavaVersion>${java.release}</requiredJavaVersion>
                        <requiredMavenVersion>${maven.version}</requiredMavenVersion>
                        <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-component-metadata</artifactId>
                    <version>2.2.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>
                <plugin>
                    <groupId>org.cyclonedx</groupId>
                    <artifactId>cyclonedx-maven-plugin</artifactId>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-metadata</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>java</goal>
                        </goals>
                        <phase>test</phase>
                        <configuration>
                            <mainClass>com.buschmais.jqassistant.maven.configuration.MavenJsonSchemaGenerator</mainClass>
                            <classpathScope>test</classpathScope>
                            <arguments>
                                <argument>${project.build.directory}/generated-sources/schema</argument>
                            </arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-asciidoc</id>
                    </execution>
                    <execution>
                        <id>attach-json-schema</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/schema.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin><groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.15.2</version>
                <executions>
                    <execution>
                        <id>default-cli</id>
                        <goals>
                            <goal>descriptor</goal>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.buschmais.jqassistant</groupId>
                <artifactId>bom</artifactId>
                <version>${project.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.buschmais.jqassistant</groupId>
            <artifactId>jqa-distribution-specification</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!--
         ! All non-jQAssistant go below!
         !-->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <!-- Contains outdated Google Guice/Guava APIs -->
                    <groupId>org.eclipse.sisu</groupId>
                    <artifactId>org.eclipse.sisu.inject</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.inject</groupId>
                    <artifactId>guice</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>${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>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-dependency-tree</artifactId>
            <version>${org.apache.maven_dependency-tree.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.reporting</groupId>
            <artifactId>maven-reporting-impl</artifactId>
            <version>${org.apache.maven.reporting_version}</version>
            <exclusions>
                <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.15.2</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.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </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.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
        </dependency>
    </dependencies>

</project>
