<?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>no.oslomet</groupId>
	<artifactId>aaas</artifactId>
	<version>0.0.1-RELEASE</version>
	<name>AaaS</name>
	<description>The best anonynmization service the world has ever seen</description>
	<url>https://github.com/oslomet-arx-as-a-service/AaaS</url>

	<organization>
		<name>no.oslomet</name>
		<url>https://github.com/oslomet-arx-as-a-service</url>
	</organization>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/oslomet-arx-as-a-service/AaaS/issues</url>
	</issueManagement>

	<licenses>
		<license>
			<name>MIT</name>
			<url>https://github.com/oslomet-arx-as-a-service/AaaS/blob/master/LICENCE</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<url>https://github.com/oslomet-arx-as-a-service/AaaS</url>
		<connection>
			scm:git:git://github.com/oslomet-arx-as-a-service/AaaS.git
		</connection>
		<developerConnection>
			scm:git:ssh://git@github.com/oslomet-arx-as-a-service/AaaS.git
		</developerConnection>
	</scm>
	<developers>
		<developer>
			<name>Jeremiah Augie Uy</name>
			<email>s181369@oslomet.no</email>
			<organization>OsloMet</organization>
			<organizationUrl>https://www.oslomet.no/</organizationUrl>
		</developer>
		<developer>
			<name>Lord André Groseth</name>
			<email>s181365@oslomet.no</email>
			<organization>OsloMet</organization>
			<organizationUrl>https://www.oslomet.no/</organizationUrl>
		</developer>
		<developer>
			<name>Julian Sagen</name>
			<email>s315584@oslomet.no</email>
			<organization>OsloMet</organization>
			<organizationUrl>https://www.oslomet.no/</organizationUrl>
		</developer>
		<developer>
			<name>Sondre Halvorsen</name>
			<email>s305348@oslomet.no</email>
			<organization>OsloMet</organization>
			<organizationUrl>https://www.oslomet.no/</organizationUrl>
		</developer>
		<developer>
			<name>Viktor Vartdal Johansen</name>
			<email>s315615@oslomet.no</email>
			<organization>OsloMet</organization>
			<organizationUrl>https://www.oslomet.no/</organizationUrl>
		</developer>
	</developers>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.1.2.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

	<properties>
		<java.version>11</java.version>
		<!--image prefix has to correlate with docker hub server name-->
		<docker.image.prefix>arxaas</docker.image.prefix>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.deidentifier</groupId>
			<artifactId>libarx</artifactId>
			<version>3.7.1</version>
		</dependency>
	</dependencies>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
    </distributionManagement>

    <build>
        <plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>

			<plugin>
    				<groupId>org.jacoco</groupId>
    				<artifactId>jacoco-maven-plugin</artifactId>
    				<version>0.8.3</version>
					<executions>
        				<execution>
							<goals>
                				<goal>prepare-agent</goal>
           					</goals>
        				</execution>
        				<execution>
            					<id>report</id>
            					<phase>test</phase>
            					<goals>
                					<goal>report</goal>
            					</goals>
						<configuration>
							<includes>
								<include>**/no/oslomet/aaas/**/*</include>
							</includes>
						</configuration>
        				</execution>
    				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>unpack</id>
						<phase>package</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>${project.groupId}</groupId>
									<artifactId>${project.artifactId}</artifactId>
									<version>${project.version}</version>
								</artifactItem>
							</artifactItems>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>release</name>
				</property>
			</activation>

			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.7</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>

					<!--create javadoc jar-->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.0.1</version>
						<configuration>
							<show>private</show>
							<nohelp>true</nohelp>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<!--create source jar-->
					<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>

					<!--sign jars with pgp-->
					<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>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
