<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ pom.xml
  ~
  ~ Tigase XMPP Client Library
  ~ Copyright (C) 2004-2018 "Tigase, Inc." <office@tigase.com>
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU Affero General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License,
  ~ or (at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU Affero General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Affero General Public License
  ~ along with this program. Look for COPYING file in the top folder.
  ~ If not, see http://www.gnu.org/licenses/.
  -->

<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>
	<groupId>tigase</groupId>
	<artifactId>tigase-jaxmpp</artifactId>
	<packaging>pom</packaging>
	<name>Tigase XMPP Client Library</name>
	<version>3.6.0-SNAPSHOT</version>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.javadoc.skip>true</maven.javadoc.skip>

		<sign-keystore>/path/to/jks.keystore</sign-keystore>
		<sign-alias>alias</sign-alias>
		<sign-storepass>storepass</sign-storepass>
		<sign-keypass>keypass</sign-keypass>
		<sign-skip>true</sign-skip>
		<verbose-log>false</verbose-log>
		<tsa>${tsa-uri}</tsa>
	</properties>

	<inceptionYear>2006</inceptionYear>
	<developers>
		<developer>
			<id>bmalkow</id>
			<name>Bartosz Malkowski</name>
			<email>bartosz.malkowski tigase org</email>
			<roles>
				<role>architect</role>
				<role>developer</role>
			</roles>
			<timezone>+1</timezone>
		</developer>
	</developers>

	<licenses>
		<license>
			<name>GNU Affero General Public License</name>
			<url>http://www.gnu.org/licenses/agpl.txt</url>
		</license>
	</licenses>

	<organization>
		<name>Tigase</name>
		<url>http://www.tigase.org</url>
	</organization>

	<modules>
		<module>jaxmpp-core</module>
		<module>jaxmpp-registration</module>
		<module>jaxmpp-roster</module>
		<module>jaxmpp-presence</module>
		<module>jaxmpp-chat</module>
		<module>jaxmpp-muc</module>
		<module>jaxmpp-deliveryreceipts</module>
		<module>jaxmpp-pubsub</module>
		<module>jaxmpp-adhoc</module>
		<module>jaxmpp-mam</module>
		<module>jaxmpp-filetransfer</module>
		<module>jaxmpp-httpfileupload</module>
		<module>jaxmpp-jingle</module>
		<module>jaxmpp-socks5</module>
		<module>jaxmpp-vcard</module>
		<module>jaxmpp-xep0136</module>
		<module>jaxmpp-xep0013_flexible_offline</module>
		<module>jaxmpp-im</module>
		<module>jaxmpp-all</module>
		<module>jaxmpp-j2se</module>
		<module>jaxmpp-push</module>
		<module>jaxmpp-workgroup</module>
		<module>jaxmpp-omemo</module>
	</modules>

	<profiles>
		<profile>
			<id>android</id>
			<activation>
				<property>
					<name>android</name>
				</property>
			</activation>
			<modules>
				<module>jaxmpp-android</module>
			</modules>
		</profile>
		<profile>
			<id>gwt</id>
			<activation>
				<property>
					<name>gwt</name>
				</property>
			</activation>
			<modules>
				<module>jaxmpp-gwt</module>
			</modules>
		</profile>
		<profile>
			<id>all</id>
			<activation>
				<property>
					<name>all</name>
				</property>
			</activation>
			<modules>
				<module>jaxmpp-android</module>
				<module>jaxmpp-gwt</module>
			</modules>
		</profile>
		<profile>
			<id>docs</id>
			<properties>
				<maven.javadoc.skip>false</maven.javadoc.skip>
			</properties>
			<modules>
				<module>jaxmpp-documentation</module>
			</modules>
		</profile>
		<profile>
			<id>dist</id>
			<properties>
				<maven.javadoc.skip>false</maven.javadoc.skip>
			</properties>
			<modules>
				<module>jaxmpp-android</module>
				<module>jaxmpp-all</module>
				<module>jaxmpp-all-singlejar</module>
				<module>jaxmpp-gwt</module>
				<module>jaxmpp-gwt-singlejar</module>
				<module>jaxmpp-j2se</module>
				<module>jaxmpp-j2se-singlejar</module>
				<module>jaxmpp-documentation</module>
				<module>jaxmpp-dist</module>
			</modules>
		</profile>
	</profiles>


	<scm>
		<connection>scm:git:https://github.com/tigase/jaxmpp.git</connection>
		<developerConnection>scm:git:https://github.com/tigase/jaxmpp.git</developerConnection>
		<url>https://github.com/tigase/jaxmpp</url>
	  <tag>HEAD</tag>
  </scm>

	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.gmaven</groupId>
				<artifactId>gmaven-plugin</artifactId>
				<version>1.5</version>
				<executions>
					<execution>
						<id>gitver</id>
						<phase>validate</phase>
						<goals>
							<goal>execute</goal>
						</goals>
						<configuration>
							<providerSelection>2.0</providerSelection>
							<properties>
								<script>git rev-list HEAD --count</script>
							</properties>
							<source>
								def version
								try {
									def command = project.properties.script
									def process = command.execute()
									process.waitFor()

									version = process.in.text.trim()
								} catch (Exception e) {
									version = '0'
								}
								log.info("setting revision to: " + version)

								project.properties.setProperty('gitVersion', version)

							</source>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.2</version>
				<configuration>
				  <releaseProfiles>dist,docs</releaseProfiles>
				  <tagNameFormat>@{project.version}</tagNameFormat>
				  <autoVersionSubmodules>true</autoVersionSubmodules>
				</configuration>				
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.2</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.4</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>package</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
					<execution>
						<id>attach-test-sources</id>
						<phase>package</phase>
						<goals>
							<goal>test-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>
						<phase>install</phase>
						<goals>
							<goal>aggregate-jar</goal>
						</goals>
						<configuration>
							<source>1.8</source>
							<quiet>true</quiet>
							<aggregate>true</aggregate>
							<reportOutputDirectory>docs/javadoc</reportOutputDirectory>
							<destDir>docs/javadoc</destDir>
							<additionalparam>-Xdoclint:none</additionalparam>
							<finalName>${project.artifactId}-${project.version}-b${gitVersion}</finalName>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jarsigner-plugin</artifactId>
				<version>1.4</version>
				<executions>
					<execution>
						<id>sign</id>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<archiveDirectory>${project.basedir}</archiveDirectory>
					<includes>
						<include>target/tigase*.?ar</include>
						<include>jars/tigase*.?ar</include>
					</includes>
					<processMainArtifact>false</processMainArtifact>
					<processAttachedArtifacts>false</processAttachedArtifacts>
					<tsa>${tsa-uri}</tsa>
					<skip>${sign-skip}</skip>

					<keystore>${sign-keystore}</keystore>
					<alias>${sign-alias}</alias>
					<storepass>${sign-storepass}</storepass>
					<keypass>${sign-keypass}</keypass>
					<verbose>${verbose-log}</verbose>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.1</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<repositories>
		<repository>
			<id>tigase</id>
			<name>Tigase repository</name>
			<url>https://maven-repo.tigase.net/repository/release</url>
		</repository>
		<repository>
			<id>tigase-snapshot</id>
			<name>Tigase repository</name>
			<url>https://maven-repo.tigase.net/repository/snapshot</url>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>
	<distributionManagement>
		<repository>
			<id>tigase</id>
			<name>Tigase repository</name>
			<url>https://maven-repo.tigase.net/repository/release</url>
		</repository>
		<snapshotRepository>
			<id>tigase-snapshot</id>
			<name>Tigase snapshot repository</name>
			<url>https://maven-repo.tigase.net/repository/snapshot</url>
		</snapshotRepository>
	</distributionManagement>

</project>
