<?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.cryptomator</groupId>
	<artifactId>webdav-nio-adapter</artifactId>
	<version>1.2.7</version>
	<name>WebDAV-NIO Adapter</name>
	<description>Embedded Jetty serving a WebDAV servlet to access resources at a given NIO path.</description>
	<url>https://github.com/cryptomator/webdav-nio-adapter</url>

	<scm>
		<connection>scm:git:git@github.com:cryptomator/webdav-nio-adapter.git</connection>
		<developerConnection>scm:git:git@github.com:cryptomator/webdav-nio-adapter.git</developerConnection>
		<url>git@github.com:cryptomator/webdav-nio-adapter.git</url>
	</scm>

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

		<!-- dependencies -->
		<webdavservlet.version>1.2.1</webdavservlet.version>
		<dagger.version>2.41</dagger.version>
		<jetty.version>10.0.8</jetty.version>
		<guava.version>31.1-jre</guava.version>
		<slf4j.version>1.7.36</slf4j.version>

		<!-- test dependencies -->
		<junit.jupiter.version>5.8.2</junit.jupiter.version>

		<!-- mvn plugin dependencies -->
		<dependency-check.version>7.0.0</dependency-check.version>
		<jacoco.version>0.8.7</jacoco.version>
		<nexus-staging.version>1.6.8</nexus-staging.version>
	</properties>

	<licenses>
		<license>
			<name>GNU Affero General Public License (AGPL) version 3.0</name>
			<url>https://www.gnu.org/licenses/agpl.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Sebastian Stenzel</name>
			<email>sebastian.stenzel@gmail.com</email>
			<timezone>+1</timezone>
			<organization>cryptomator.org</organization>
			<organizationUrl>http://cryptomator.org</organizationUrl>
		</developer>
	</developers>

	<dependencies>
		<dependency>
			<groupId>org.cryptomator</groupId>
			<artifactId>webdav-nio-adapter-servlet</artifactId>
			<version>${webdavservlet.version}</version>
		</dependency>

		<!-- Jetty -->
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-server</artifactId>
			<version>${jetty.version}</version>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-servlet</artifactId>
			<version>${jetty.version}</version>
		</dependency>

		<!-- Guava -->
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>${guava.version}</version>
		</dependency>

		<!-- Logging -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>

		<!-- DI -->
		<dependency>
			<groupId>com.google.dagger</groupId>
			<artifactId>dagger</artifactId>
			<version>${dagger.version}</version>
		</dependency>

		<!-- Test -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<version>${junit.jupiter.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>${slf4j.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.10.1</version>
				<configuration>
					<release>11</release>
					<showWarnings>true</showWarnings>
					<annotationProcessorPaths>
						<path>
							<groupId>com.google.dagger</groupId>
							<artifactId>dagger-compiler</artifactId>
							<version>${dagger.version}</version>
						</path>
					</annotationProcessorPaths>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.2</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.2.2</version>
			</plugin>
			<plugin>
				<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>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.3.2</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>dependency-check</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.owasp</groupId>
						<artifactId>dependency-check-maven</artifactId>
						<version>${dependency-check.version}</version>
						<configuration>
							<cveValidForHours>24</cveValidForHours>
							<failBuildOnCVSS>0</failBuildOnCVSS>
							<skipTestScope>true</skipTestScope>
							<detail>true</detail>
							<suppressionFiles>
								<suppressionFile>suppression.xml</suppressionFile>
							</suppressionFiles>
						</configuration>
						<executions>
							<execution>
								<goals>
									<goal>check</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>coverage</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>${jacoco.version}</version>
						<executions>
							<execution>
								<id>prepare-agent</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>report</id>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>sign</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</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>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>deploy-central</id>
			<distributionManagement>
				<repository>
					<id>ossrh</id>
					<name>Maven Central</name>
					<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
			</distributionManagement>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>${nexus-staging.version}</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>deploy-github</id>
			<distributionManagement>
				<repository>
					<id>github</id>
					<name>GitHub Packages</name>
					<url>https://maven.pkg.github.com/cryptomator/webdav-nio-adapter</url>
				</repository>
			</distributionManagement>
		</profile>
	</profiles>
</project>
