<?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>
	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>9</version>
	</parent>
	<groupId>org.bitbucket.cowwoc</groupId>
	<artifactId>requirements</artifactId>
	<version>4.0.0-RC</version>
	<packaging>pom</packaging>
	<name>Requirements</name>
	<description>A fluent API for enforcing design contracts with automatic message generation</description>
	<url>https://bitbucket.org/cowwoc/requirements/</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://bitbucket.org/cowwoc/requirements/</url>
		<connection>scm:hg:https://bitbucket.org/cowwoc/requirements/</connection>
		<developerConnection>scm:hg:https://bitbucket.org/cowwoc/requirements/</developerConnection>
		<tag>HEAD</tag>
	</scm>

	<developers>
		<developer>
			<id>cowwoc</id>
			<name>Gili Tzabari</name>
			<email>cowwoc@bbs.darktech.org</email>
		</developer>
	</developers>

	<modules>
		<module>core</module>
		<module>native</module>
		<module>guava</module>
		<module>maven-plugin</module>
	</modules>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.3</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<tagNameFormat>release-@{project.version}</tagNameFormat>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>sonatype-nexus-staging</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<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>
									<tasks>
										<echo>Please pick one of the following profiles:</echo>
										<echo>* windows-x86_32-debug</echo>
										<echo>* windows-x86_32-release</echo>
										<echo>* windows-x86_64-debug</echo>
										<echo>* windows-x86_64-release</echo>
										<echo>* linux-x86_32-debug</echo>
										<echo>* linux-x86_32-release</echo>
										<echo>* linux-x86_64-debug</echo>
										<echo>* linux-x86_64-release</echo>
										<echo>* mac-x86_64-debug</echo>
										<echo>* mac-x86_64-release</echo>
										<echo></echo>
										<echo>For instance: mvn -Pwindows-x86_32-debug install</echo>
										<fail/>
									</tasks>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>windows-x86_32-debug</id>
			<properties>
				<platform>windows-x86_32</platform>
				<build.type>debug</build.type>
			</properties>
		</profile>
		<profile>
			<id>windows-x86_32-release</id>
			<activation>
				<property>
					<name>osDetection</name>
					<value>!false</value>
				</property>
				<os>
					<family>windows</family>
					<arch>x86</arch>
				</os>
			</activation>
			<properties>
				<platform>windows-x86_32</platform>
				<build.type>release</build.type>
			</properties>
		</profile>
		<profile>
			<id>windows-x86_64-debug</id>
			<properties>
				<platform>windows-x86_64</platform>
				<build.type>debug</build.type>
			</properties>
		</profile>
		<profile>
			<id>windows-x86_64-release</id>
			<activation>
				<property>
					<name>osDetection</name>
					<value>!false</value>
				</property>
				<os>
					<family>windows</family>
					<arch>amd64</arch>
				</os>
			</activation>
			<properties>
				<platform>windows-x86_64</platform>
				<build.type>release</build.type>
			</properties>
		</profile>
		<profile>
			<id>linux-x86_32-debug</id>
			<properties>
				<platform>linux-x86_32</platform>
				<build.type>debug</build.type>
			</properties>
		</profile>
		<profile>
			<id>linux-x86_32-release</id>
			<activation>
				<property>
					<name>osDetection</name>
					<value>!false</value>
				</property>
				<os>
					<family>linux</family>
					<arch>i386</arch>
				</os>
			</activation>
			<properties>
				<platform>linux-x86_32</platform>
				<build.type>release</build.type>
			</properties>
		</profile>
		<profile>
			<id>linux-x86_64-debug</id>
			<properties>
				<platform>linux-x86_64</platform>
				<build.type>debug</build.type>
			</properties>
		</profile>
		<profile>
			<id>linux-x86_64-release</id>
			<activation>
				<property>
					<name>osDetection</name>
					<value>!false</value>
				</property>
				<os>
					<family>linux</family>
					<arch>amd64</arch>
				</os>
			</activation>
			<properties>
				<platform>linux-x86_64</platform>
				<build.type>release</build.type>
			</properties>
		</profile>
		<profile>
			<id>mac-x86_64-debug</id>
			<properties>
				<platform>mac-x86_64</platform>
				<build.type>debug</build.type>
			</properties>
		</profile>
		<profile>
			<id>mac-x86_64-release</id>
			<activation>
				<property>
					<name>osDetection</name>
					<value>!false</value>
				</property>
				<os>
					<family>mac</family>
					<arch>x86_64</arch>
				</os>
			</activation>
			<properties>
				<platform>mac-x86_64</platform>
				<build.type>release</build.type>
			</properties>
		</profile>
		<profile>
			<id>deploy</id>
			<activation>
				<property>
					<name>deploy</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.10.4</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</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>
		<profile>
			<id>no-deploy</id>
			<!--
			According to https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin
			skipNexusStagingDeployMojo may not be set to true in the last reactor module. Because we don't
			want to deploy our last module, nor a dummy module, we simply omit the relevant modules when
			a deploy is in progress.
			-->
			<activation>
				<property>
					<name>!deploy</name>
				</property>
			</activation>
			<modules>
				<module>benchmark</module>
				<module>test</module>
			</modules>
		</profile>
		<profile>
			<id>portable</id>
			<!--
			Sonatype requires a main jar, even for platform-specific artifacts, so we supply it with an
			empty file.
			-->
		</profile>
	</profiles>
</project>
