<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <artifactId>ae-plugins</artifactId>
    <name>${project.artifactId}</name>
    <packaging>pom</packaging>

    <parent>
        <groupId>org.metaeffekt.core</groupId>
        <artifactId>ae-core-plugin-management-pom</artifactId>
        <version>0.156.1</version>
        <relativePath>../poms/ae-core-plugin-management-pom</relativePath>
    </parent>

    <modules>
        <module>ae-inventory-maven-plugin</module>
        <module>ae-version-maven-plugin</module>
        <module>ae-api-compile-maven-plugin</module>
        <module>ae-api-publish-maven-plugin</module>
        <module>ae-artifact-publish-maven-plugin</module>
        <module>ae-jira-maven-plugin</module>
        <module>ae-shell-script-assembler-plugin</module>

        <module>ae-dependency-analysis-plugin</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.metaeffekt.core</groupId>
                <artifactId>ae-core-plugin-dependency-management-pom</artifactId>
                <version>${ae.core.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-invoker-plugin</artifactId>
                    <version>${maven.invoker.plugin.version}</version>
                    <configuration>
                        <projectsDirectory>src/it</projectsDirectory>
                        <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                        <postBuildHookScript>validate.groovy</postBuildHookScript>

                        <!-- NOTE: some verification scripts rely on debug output -->
                        <debug>true</debug>
                        <addTestClassPath>true</addTestClassPath>
                    </configuration>
                    <executions>
                        <execution>
                            <id>integration-test</id>
                            <goals>
                                <goal>run</goal>
                            </goals>

                            <!-- NOTE: we are performing the integration test late in the build. In 
                                 particular when the plugin has already been installed. Approaches
                                 that workaround this concepts do not harmonize with the parent
                                 poms being build in the same reactor. -->
                            <phase>installX</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-invoker-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <!-- ensure the proper build order (invoker usage) in the reactor -->
            <groupId>org.metaeffekt.core</groupId>
            <artifactId>ae-core-dependency-management-pom</artifactId>
            <version>${ae.core.version}</version>
            <type>pom</type>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <!-- ensure the proper build order (invoker usage) in the reactor -->
            <groupId>org.metaeffekt.core</groupId>
            <artifactId>ae-core-plugin-dependency-management-pom</artifactId>
            <version>${ae.core.version}</version>
            <type>pom</type>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
    </dependencies>

</project>
