<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>com.googlecode.cmake-maven-project</groupId>
		<artifactId>cmake</artifactId>
		<version>3.29.3-b2</version>
	</parent>
	<prerequisites>
		<maven>${maven.version}</maven>
	</prerequisites>
	<artifactId>cmake-maven-plugin</artifactId>
	<packaging>maven-plugin</packaging>
	<name>CMake Maven Plugin</name>
	<description>Builds native code using CMake makefile generator</description>

	<properties>
		<cmake.shipsWithPlatform>false</cmake.shipsWithPlatform>
	</properties>

	<profiles>
		<profile>
			<id>skip-integration-tests</id>
			<activation>
				<property>
					<name>invoker.skip</name>
					<value>true</value>
				</property>
			</activation>
			<properties>
				<skipTests>true</skipTests>
			</properties>
		</profile>
	</profiles>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-invoker-plugin</artifactId>
				<executions>
					<execution>
						<id>integration-test</id>
						<goals>
							<goal>install</goal>
							<goal>run</goal>
						</goals>
						<!--
						Make sure that this artifact is installed before running integration tests; otherwise,
						maven-invoker-plugin:install will fail.
						-->
						<phase>install</phase>
						<configuration>
							<skipInstallation>${skipTests}</skipInstallation>
							<skipInvocation>${skipTests}</skipInvocation>
							<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
							<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
							<failIfNoProjects>true</failIfNoProjects>
							<streamLogs>true</streamLogs>
							<!--
							Fast Build Configuration:
							https://maven.apache.org/plugins/maven-invoker-plugin/examples/fast-use.html
							-->
							<settingsFile>src/it/settings.xml</settingsFile>
							<properties>
								<cmake.plugin.groupid>${project.groupId}</cmake.plugin.groupid>
								<cmake.plugin.version>${project.version}</cmake.plugin.version>
								<cmake.platform>${cmake.platform}</cmake.platform>
								<cmake.shipsWithPlatform>${cmake.shipsWithPlatform}</cmake.shipsWithPlatform>
							</properties>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-core</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.twdata.maven</groupId>
			<artifactId>mojo-executor</artifactId>
		</dependency>
		<dependency>
			<groupId>com.github.cowwoc.pouch</groupId>
			<artifactId>core</artifactId>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>cmake-common</artifactId>
			<version>${project.version}</version>
		</dependency>
	</dependencies>
</project>