<?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>io.openliberty.boost</groupId>
		<artifactId>boost-maven-parent</artifactId>
		<version>0.1.2</version>
	</parent>

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

	<dependencies>

		<!-- Boost dependencies -->
		<dependency>
			<groupId>io.openliberty.boost</groupId>
			<artifactId>boost-common</artifactId>
			<version>0.1.2</version>
		</dependency>
		<dependency>
			<groupId>net.wasdev.wlp.maven.plugins</groupId>
			<artifactId>liberty-maven-plugin</artifactId>
			<version>2.6.2</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>com.spotify</groupId>
			<artifactId>docker-client</artifactId>
			<version>8.11.7</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>
								<runtimeGroupId>${runtimeGroupId}</runtimeGroupId>
								<runtimeArtifactId>${runtimeArtifactId}</runtimeArtifactId>
								<runtimeVersion>${runtimeVersion}</runtimeVersion>
							</properties>
						</configuration>
						<executions>
							<execution>
								<id>integration-test</id>
								<goals>
									<goal>install</goal>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<!-- Profiles for WLP vs OL -->
		<profile>
			<id>wlp-its</id>
			<activation>
				<property>
					<name>runtime</name>
					<value>wlp</value>
				</property>
			</activation>
			<properties>
				<runtimeGroupId>com.ibm.websphere.appserver.runtime</runtimeGroupId>
				<runtimeArtifactId>wlp-javaee7</runtimeArtifactId>
				<runtimeVersion>${runtimeVersion}</runtimeVersion>
			</properties>
		</profile>
		<profile>
			<id>ol-its</id>
			<activation>
				<property>
					<name>runtime</name>
					<value>ol</value>
				</property>
			</activation>
			<properties>
				<runtimeGroupId>io.openliberty</runtimeGroupId>
				<runtimeArtifactId>openliberty-runtime</runtimeArtifactId>
				<runtimeVersion>${runtimeVersion}</runtimeVersion>
			</properties>
		</profile>
		<profile>
			<id>default-its</id>
			<activation>
				<property>
					<name>!runtime</name>
				</property>
			</activation>
			<properties>
				<runtimeGroupId>io.openliberty</runtimeGroupId>
				<runtimeArtifactId>openliberty-runtime</runtimeArtifactId>
				<runtimeVersion>[18.0.0.3,)</runtimeVersion>
			</properties>
		</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>
