<?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>org.ooni</groupId>
	<artifactId>oonimkall</artifactId>
	<version>c52ce3b5-linux</version>
	<packaging>pom</packaging>

	<name>oonimkall</name>
	<description>OONI Probe Library for Android</description>
	<url>https://github.com/ooni/probe-cli</url>
	<licenses>
		<license>
			<name>The 3-Clause BSD License</name>
			<url>https://opensource.org/licenses/BSD-3-Clause</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Mehul Gulati</name>
			<email>mehul@openobservatory.org</email>
			<roles>
				<role>Core developer</role>
			</roles>
			<timezone>Asia/Kolkata</timezone>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/ooni/probe-cli</url>
		<connection>https://github.com/ooni/probe-cli.git</connection>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>3.2.4</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
						<configuration>
							<gpgArguments>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>3.1.2</version>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>

			<plugin>
        		<groupId>org.sonatype.central</groupId>
        		<artifactId>central-publishing-maven-plugin</artifactId>
        		<version>0.8.0</version>
        		<extensions>true</extensions>
        		<configuration>
          		<publishingServerId>central</publishingServerId>
        		</configuration>
      		</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>deploy-android</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<project.artifact.file>${project.basedir}/oonimkall.aar</project.artifact.file>
				<project.artifact.type>aar</project.artifact.type>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-android-aar</id>
								<phase>package</phase>
								<goals>
									<goal>attach-artifact</goal>
								</goals>
								<configuration>
									<artifacts>
										<artifact>
											<file>${project.artifact.file}</file>
											<type>aar</type>
										</artifact>
									</artifacts>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.6.3</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<source>8</source>
									<failOnError>false</failOnError>
									<doclint>none</doclint>
									<additionalJOption>-Xdoclint:none</additionalJOption>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.3.1</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>deploy-desktop</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-desktop-jar</id>
								<phase>package</phase>
								<goals>
									<goal>attach-artifact</goal>
								</goals>
								<configuration>
									<artifacts>
										<artifact>
											<file>${project.basedir}/${desktop.jar.name}</file>
											<type>jar</type>
										</artifact>
									</artifacts>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-desktop-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<source>8</source>
									<failOnError>false</failOnError>
									<doclint>none</doclint>
									<additionalJOption>-Xdoclint:none</additionalJOption>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-desktop-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.13</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>central</serverId>
							<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
						</configuration>
						<executions>
							<execution>
								<id>default-deploy</id>
								<phase>deploy</phase>
								<goals>
									<goal>deploy</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
