<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>org.jboss.shrinkwrap.resolver</groupId>
        <artifactId>shrinkwrap-resolver-parent</artifactId>
        <version>3.1.4</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>shrinkwrap-resolver-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>

    <name>ShrinkWrap Resolver Maven Plugin</name>
    <description>ShrinkWrap Maven Resolver Plugin</description>


    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>


    <dependencies>
        <!-- ShrinkWrap Maven Resolver -->
        <dependency>
            <groupId>org.jboss.shrinkwrap.resolver</groupId>
            <artifactId>shrinkwrap-resolver-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap.resolver</groupId>
            <artifactId>shrinkwrap-resolver-spi</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap.resolver</groupId>
            <artifactId>shrinkwrap-resolver-api-maven</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap.resolver</groupId>
            <artifactId>shrinkwrap-resolver-spi-maven</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap.resolver</groupId>
            <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap.resolver</groupId>
            <artifactId>shrinkwrap-resolver-impl-maven-archive</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- org.apache.maven -->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-utils</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.5</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-artifact</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <configuration>
                    <goalPrefix>shrinkwrap-resolver</goalPrefix>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
                <executions>
                    <execution>
                        <id>generated-helpmojo</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>generated-descriptor</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-invoker-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <debug>false</debug>
                    <projectsDirectory>src/it</projectsDirectory>
                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                    <pomIncludes>
                        <pomInclude>*/pom.xml</pomInclude>
                    </pomIncludes>
                    <preBuildHookScript>setup</preBuildHookScript>
                    <postBuildHookScript>verify</postBuildHookScript>
                    <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                    <!-- <settingsFile>src/it/settings.xml</settingsFile> -->
                    <streamLogs>true</streamLogs>
                </configuration>
                <executions>
                    <execution>
                        <id>install-artifacts-into-local-repository</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <!-- install artifacts into local testing repository -->
                            <goal>install</goal>
                        </goals>
                        <configuration>
                            <extraArtifacts>
                                <!-- depchain seems not be enough -->
                                <extraArtifact>org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-depchain:${project.version}:pom</extraArtifact>
                                <!-- we need to install poms, so Invoker will be able to resolve transitive dependencies -->
                                <extraArtifact>org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api:${project.version}:pom</extraArtifact>
                                <extraArtifact>org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api-maven:${project.version}:pom</extraArtifact>
                                <extraArtifact>org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:${project.version}:pom</extraArtifact>
                                <extraArtifact>org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven-archive:${project.version}:pom</extraArtifact>
                            </extraArtifacts>
                        </configuration>
                    </execution>
                    <execution>
                        <id>run-integration-test</id>
                        <phase>integration-test</phase>
                        <goals>
                            <!-- run tests -->
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.jboss.shrinkwrap.resolver</groupId>
                                        <artifactId>shrinkwrap-resolver-maven-plugin</artifactId>
                                        <versionRange>[1.0.0-alpha-1-SNAPSHOT,)</versionRange>
                                        <goals>
                                            <goal>propagate-execution-context</goal>
                                            <goal>dependency-tree</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
