<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	 xmlns="http://maven.apache.org/POM/4.0.0"
	 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<modelVersion>4.0.0</modelVersion>

	<groupId>engineering.exploratory</groupId>
	<artifactId>nbiot-java</artifactId>
	<version>0.2</version>
	<packaging>jar</packaging>

	<name>Telenor-NBIoT-Java</name>
	<description>A Telenor NB-IoT client</description>
	<url>https://nbiot.engineering/</url>

	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Exploratory Engineering</name>
			<email>ee@telenordigital.com</email>
			<organization>Exploratory Engineering</organization>
			<organizationUrl>https://exploratory.engineering/</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git://github.com/telenordigital/nbiot-java.git</connection>
		<developerConnection>scm:git:ssh://github.com/telenordigital/nbiot-java.git</developerConnection>
		<url>http://github.com/telenordigital/nbiot-java/tree/master</url>
	</scm>

	<dependencies>
		<dependency>
			<groupId>com.mashape.unirest</groupId>
			<artifactId>unirest-java</artifactId>
			<version>1.4.9</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish.tyrus</groupId>
			<artifactId>tyrus-client</artifactId>
			<version>1.1</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish.tyrus</groupId>
			<artifactId>tyrus-container-grizzly</artifactId>
			<version>1.1</version>
		</dependency>
		<dependency>
			<groupId>org.immutables</groupId>
			<artifactId>value</artifactId>
			<version>2.5.5</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.2</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>2.9.5</version>
		</dependency>
		<dependency>
			<groupId>com.google.code.findbugs</groupId>
			<artifactId>jsr305</artifactId>
			<version>3.0.2</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.7.0</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<!-- output on console, fork per test -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.4.3</version>
				<configuration>
					<forkMode>pertest</forkMode>
					<useFile>false</useFile>
				</configuration>
			</plugin>

			<!-- Create an assembly that contains all the deps -->
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
						<id>bundle-project-sources</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>

						<configuration>
							<finalName>nbiot-java</finalName>
							<descriptorRefs>
								<descriptorRef>jar-with-dependencies</descriptorRef>
							</descriptorRefs>
						</configuration>

					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<!-- Deploy to OSSRH Nexus Repository Manager -->
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.8</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>

					<!-- Generate Source and Javadoc attachments -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>2.2.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.9.1</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<!-- Sign components -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
