<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.googlecode.cmake-maven-project</groupId>
	<artifactId>cmake</artifactId>
	<version>3.26.3-b1</version>
	<packaging>pom</packaging>
	<name>CMake</name>
	<description>Builds native code using CMake makefile generator</description>
	<url>https://github.com/cmake-maven-project/cmake-maven-project</url>
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<scm>
		<url>https://github.com/cmake-maven-project/cmake-maven-project</url>
		<connection>scm:git:https://github.com/cmake-maven-project/cmake-maven-project.git</connection>
		<developerConnection>scm:git:https://github.com/cmake-maven-project/cmake-maven-project.git
		</developerConnection>
		<tag>release-3.26.3-b1</tag>
	</scm>
	<developers>
		<developer>
			<id>cowwoc</id>
			<name>Gili Tzabari</name>
		</developer>
		<developer>
			<id>ksclarke</id>
			<name>Kevin S. Clarke</name>
		</developer>
	</developers>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.version>3.9.0</maven.version>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<maven.core.version>3.9.0</maven.core.version>
	</properties>

	<distributionManagement>
		<snapshotRepository>
			<id>maven-central-snapshots</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>maven-central-releases</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
	</distributionManagement>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-core</artifactId>
				<version>${maven.core.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugin-tools</groupId>
				<artifactId>maven-plugin-annotations</artifactId>
				<version>3.8.1</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-compress</artifactId>
				<version>1.22</version>
			</dependency>
			<dependency>
				<groupId>com.github.cowwoc.pouch</groupId>
				<artifactId>core</artifactId>
				<version>3.0</version>
			</dependency>
			<dependency>
				<groupId>org.twdata.maven</groupId>
				<artifactId>mojo-executor</artifactId>
				<version>2.4.1-m2</version>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-engine</artifactId>
				<version>5.9.2</version>
			</dependency>
			<dependency>
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>31.1-jre</version>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>3.2.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>3.0.0-M7</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.11.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.5.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.2.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-plugin-plugin</artifactId>
					<version>3.8.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>3.0.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>3.5.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>3.2.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>4.0.0-M5</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.3.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>3.3.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-invoker-plugin</artifactId>
					<version>3.5.0</version>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce-maven</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<version>${maven.version}</version>
								</requireMavenVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<!--
				Cannot be hidden behind the "deploy" profile because we invoke "rc-open" and "rc-close" before and
				after the deploy.
				-->
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.13</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>maven-central-releases</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<showWarnings>true</showWarnings>
					<showDeprecation>true</showDeprecation>
					<compilerArgs>
						<arg>-Xdiags:verbose</arg>
						<arg>-Werror</arg>
					</compilerArgs>
					<jdkToolchain>
						<version>8</version>
					</jdkToolchain>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<tagNameFormat>release-@{project.version}</tagNameFormat>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<modules>
		<module>cmake-common</module>
	</modules>

	<profiles>
		<profile>
			<id>list-profiles</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<executions>
							<execution>
								<phase>validate</phase>
								<goals>
									<goal>run</goal>
								</goals>
								<configuration>
									<target>
										<echo>Please activate one of the following profiles:</echo>
										<echo>* windows-x86_64</echo>
										<echo>* linux-x86_64</echo>
										<echo>* linux-arm_32</echo>
										<echo>* linux-arm_64</echo>
										<echo>* mac-x86_64</echo>
										<echo>* mac-aarch64</echo>
										<echo />
										<echo>For instance: mvn -Pwindows-x86_64 install</echo>
										<echo />
										<echo>Use mvn help:active-profiles for troubleshooting and</echo>
										<echo>https://maven.apache.org/settings.html#Activation for reference.</echo>
										<fail />
									</target>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>windows-x86_64</id>
			<activation>
				<os>
					<family>windows</family>
					<arch>amd64</arch>
				</os>
			</activation>
			<properties>
				<platform>windows-x86_64</platform>
			</properties>
			<modules>
				<module>cmake-binaries</module>
				<module>cmake-binaries-plugin</module>
				<module>cmake-maven-plugin</module>
			</modules>
		</profile>
		<profile>
			<id>linux-x86_64</id>
			<activation>
				<os>
					<!-- Per https://stackoverflow.com/a/19031165/14731 the family name of linux is "unix" -->
					<family>unix</family>
					<arch>amd64</arch>
				</os>
			</activation>
			<properties>
				<platform>linux-x86_64</platform>
			</properties>
			<modules>
				<module>cmake-binaries</module>
				<module>cmake-binaries-plugin</module>
				<module>cmake-maven-plugin</module>
			</modules>
		</profile>
		<profile>
			<id>linux-arm_32</id>
			<activation>
				<os>
					<family>unix</family>
					<arch>arm</arch>
				</os>
			</activation>
			<properties>
				<platform>linux-arm_32</platform>
			</properties>
			<modules>
				<!-- The binaries ship with the OS so we skip cmake-binaries -->
				<module>cmake-binaries-plugin</module>
				<module>cmake-maven-plugin</module>
			</modules>
		</profile>
		<profile>
			<id>linux-arm_64</id>
			<activation>
				<os>
					<family>unix</family>
					<arch>aarch64</arch>
				</os>
			</activation>
			<properties>
				<platform>linux-arm_64</platform>
			</properties>
			<modules>
				<module>cmake-binaries</module>
				<module>cmake-binaries-plugin</module>
				<module>cmake-maven-plugin</module>
			</modules>
		</profile>
		<profile>
			<id>mac-x86_64</id>
			<activation>
				<os>
					<family>mac</family>
					<arch>x86_64</arch>
				</os>
			</activation>
			<properties>
				<platform>mac-universal</platform>
			</properties>
			<modules>
				<module>cmake-binaries</module>
				<module>cmake-binaries-plugin</module>
				<module>cmake-maven-plugin</module>
			</modules>
		</profile>
		<profile>
			<id>mac-aarch64</id>
			<activation>
				<os>
					<family>mac</family>
					<arch>aarch64</arch>
				</os>
			</activation>
			<properties>
				<platform>mac-universal</platform>
			</properties>
			<modules>
				<module>cmake-binaries</module>
				<module>cmake-binaries-plugin</module>
				<module>cmake-maven-plugin</module>
			</modules>
		</profile>
		<profile>
			<id>deploy</id>
			<!--
			Must use property-based activation because there is no way to activate a no-deploy profile without it.
			See https://stackoverflow.com/a/7481347/14731
			-->
			<activation>
				<property>
					<name>deploy</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.2.1</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.5.0</version>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<!-- See https://maven.apache.org/guides/mini/guide-encryption.html -->
									<passphraseServerId>gpg.passphrase</passphraseServerId>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>