<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2018 IBM Corporation and others. All rights reserved. 
    This program and the accompanying materials are made available under the 
    terms of the Eclipse Public License v1.0 which accompanies this distribution, 
    and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: 
    IBM Corporation - initial API and implementation -->
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.microshed.boost</groupId>
        <artifactId>boost-maven-parent</artifactId>
        <version>0.2.1</version>
    </parent>

    <artifactId>boost-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>

    <dependencies>

        <!-- Boost dependencies -->
        <dependency>
            <groupId>org.microshed.boost</groupId>
            <artifactId>boost-common</artifactId>
            <version>0.2.1</version>
        </dependency>
        <dependency>
            <groupId>io.openliberty.tools</groupId>
            <artifactId>liberty-maven-plugin</artifactId>
            <version>3.0.1</version>
        </dependency>

        <!-- Other dependencies -->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.twdata.maven</groupId>
            <artifactId>mojo-executor</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.aether</groupId>
            <artifactId>aether-api</artifactId>
            <version>0.9.0.M2</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>plugin-support</artifactId>
            <version>1.0-alpha-1</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-project</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-artifact</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-plugin-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>it</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <version>3.1.0</version>
                        <configuration>
                            <debug>false</debug>
                            <goals>
                                <goal>install</goal>
                            </goals>
                            <projectsDirectory>src/it</projectsDirectory>
                            <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                            <streamLogs>true</streamLogs>
                            <properties>
                                <boostRuntime>${boostRuntime}</boostRuntime>
                                <!-- Explicitly set the boost port to 9000 
                                    for testing purposes across multiple runtimes -->
                                <boost_http_port>9000</boost_http_port>
                            </properties>
                        </configuration>
                        <executions>
                            <execution>
                                <id>integration-test</id>
                                <goals>
                                    <goal>install</goal>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <resources>
            <resource>
                <directory>../other-legal</directory>
                <targetPath>META-INF</targetPath>
                <excludes>
                    <exclude>README.md</exclude>
                </excludes>
            </resource>
            <resource>
                <!-- Parent root -->
                <directory>..</directory>
                <includes>
                    <include>LICENSE</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.5.2</version>
                <executions>
                    <execution>
                        <id>generated-helpmojo</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
