<?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.nav</groupId>
	<artifactId>arxaas</artifactId>
	<version>2020.02.24-16.04-366f0cde73f4</version>
	<name>ARXaaS</name>
	<description>ARXaaS is a Anonymization as a Service project implemented as a RESTful web application using Spring Boot.</description>
	<url>https://github.com/navikt/ARXaaS</url>

	<organization>
		<name>no.nav</name>
		<url>https://github.com/navikt</url>
	</organization>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/navikt/ARXaaS/issues</url>
	</issueManagement>

	<licenses>
		<license>
			<name>MIT</name>
			<url>https://github.com/navikt/ARXaaS/blob/master/LICENCE</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<url>https://github.com/navikt/ARXaaS</url>
		<connection>
			scm:git:git://github.com/navikt/ARXaaS.git
		</connection>
		<developerConnection>
			scm:git:ssh://git@github.com/navikt/ARXaaS.git
		</developerConnection>
	</scm>
	<developers>
		<developer>
			<name>Jeremiah Augie Uy</name>
			<organization>NAV</organization>
			<organizationUrl>https://www.nav.no/</organizationUrl>
		</developer>
		<developer>
			<name>Lord André Groseth</name>
			<organization>NAV</organization>
			<organizationUrl>https://www.nav.no/</organizationUrl>
		</developer>
		<developer>
			<name>Julian Sagen</name>
			<organization>NAV</organization>
			<organizationUrl>https://www.nav.no/</organizationUrl>
		</developer>
		<developer>
			<name>Sondre Halvorsen</name>
			<organization>NAV</organization>
			<organizationUrl>https://www.nav.no/</organizationUrl>
		</developer>
		<developer>
			<name>Viktor Vartdal Johansen</name>
			<organization>NAV</organization>
			<organizationUrl>https://www.nav.no/</organizationUrl>
		</developer>
	</developers>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.2.4.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

	<properties>
		<java.version>11</java.version>
		<jackson.version>2.9.9.20190807</jackson.version>
		<version.junit>5.6.0</version.junit>
	</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.springframework.boot</groupId>
			<artifactId>spring-boot-starter-security</artifactId>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<version>${version.junit}</version>
			<scope>test</scope>
		</dependency>
    
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>

		<dependency>
			<groupId>io.micrometer</groupId>
			<artifactId>micrometer-core</artifactId>
		</dependency>

		<dependency>
			<groupId>io.micrometer</groupId>
			<artifactId>micrometer-registry-prometheus</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-hateoas</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.restdocs</groupId>
			<artifactId>spring-restdocs-mockmvc</artifactId>
			<scope>test</scope>
		</dependency>


		<!-- https://mvnrepository.com/artifact/com.univocity/univocity-parsers -->
		<dependency>
			<groupId>com.univocity</groupId>
			<artifactId>univocity-parsers</artifactId>
			<version>2.8.4</version>
		</dependency>

		<!-- ARX library -->

		<dependency>
			<groupId>org.deidentifier</groupId>
			<artifactId>libarx</artifactId>
			<version>3.8.0</version>
		</dependency>

		<!-- JSON logging -->

		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>1.2.3</version>
		</dependency>
		<dependency>
			<groupId>net.logstash.logback</groupId>
			<artifactId>logstash-logback-encoder</artifactId>
			<version>6.3</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.30</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>
				<executions>
					<execution>
						<id>build-info</id>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.2</version>
			</plugin>

			<plugin>
				<groupId>org.asciidoctor</groupId>
				<artifactId>asciidoctor-maven-plugin</artifactId>
				<version>1.6.0</version>
				<dependencies>
					<dependency>
						<groupId>org.springframework.restdocs</groupId>
						<artifactId>spring-restdocs-asciidoctor</artifactId>
						<version>2.0.4.RELEASE</version>
					</dependency>
				</dependencies>
				<executions>
					<execution>
						<id>generate-docs</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>process-asciidoc</goal>
						</goals>
						<configuration>
							<backend>html5</backend>
							<doctype>book</doctype>
							<imagesDir>img</imagesDir>
							<attributes>
								<toc>left</toc>
								<toclevels>3</toclevels>
								<snippets>${project.build.directory}/generated-snippets</snippets>
							</attributes>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.1.0</version>
				<executions>
					<execution>
						<id>copy-resources</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>
								${project.build.outputDirectory}/static
							</outputDirectory>
							<resources>
								<resource>
									<directory>
										${project.build.directory}/generated-docs
									</directory>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
    				<groupId>org.jacoco</groupId>
    				<artifactId>jacoco-maven-plugin</artifactId>
    				<version>0.8.5</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/nav/arxaas/**/*</include>
							</includes>
                            <excludes>
                                <exclude>**/no/nav/arxaas/controller/NaisController.*</exclude>
								<exclude>**/no/nav/arxaas/controller/CustomErrorController.*</exclude>
                                <exclude>**/no/nav/arxaas/config/SecurityConfig.*</exclude>
                                <exclude>**/no/nav/arxaas/SwaggerConfig.*</exclude>
                                <exclude>**/no/nav/arxaas/ARXaaSApplication.*</exclude>
								<exclude>**/no/nav/arxaas/analyzer/Analyzer.*</exclude>
								<exclude>**/no/nav/arxaas/anonymizer/Anonymizer.*</exclude>
								<exclude>**/no/nav/arxaas/utils/DataFactory.*</exclude>
								<exclude>**/no/nav/arxaas/utils/ConfigurationFactory.*</exclude>
                            </excludes>
						</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.8</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.1.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>3.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>
						<configuration>
							<gpgArguments>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>pitest</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.pitest</groupId>
						<artifactId>pitest-maven</artifactId>
						<version>1.5.0</version>
						<dependencies>
							<dependency>
								<groupId>org.pitest</groupId>
								<artifactId>pitest-junit5-plugin</artifactId>
								<version>0.12</version>
							</dependency>
						</dependencies>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
