<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>cryptolib</artifactId>
	<version>1.2.2</version>
	<name>Cryptomator Crypto Library</name>
	<description>This library contains all cryptographic functions that are used by Cryptomator.</description>
	<url>https://github.com/cryptomator/cryptolib</url>

	<scm>
		<connection>scm:git:git@github.com:cryptomator/cryptolib.git</connection>
		<developerConnection>scm:git:git@github.com:cryptomator/cryptolib.git</developerConnection>
		<url>git@github.com:cryptomator/cryptolib.git</url>
	</scm>

	<properties>
		<gson.version>2.8.5</gson.version>
		<guava.version>26.0-android</guava.version> <!-- JDK7 -->
		<siv-mode.version>1.3.1</siv-mode.version>
		<slf4j.version>1.7.25</slf4j.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</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>

	<repositories>
		<repository>
			<id>bintray</id>
			<name>bintray</name>
			<url>http://jcenter.bintray.com</url>
		</repository>
	</repositories>

	<dependencies>
		<dependency>
			<groupId>org.cryptomator</groupId>
			<artifactId>siv-mode</artifactId>
			<version>${siv-mode.version}</version>
		</dependency>

		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>${gson.version}</version>
		</dependency>
		<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>

		<!-- tests -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<version>5.4.2</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>2.24.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-all</artifactId>
			<version>1.3</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>${slf4j.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.openjdk.jmh</groupId>
			<artifactId>jmh-core</artifactId>
			<version>1.21</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.openjdk.jmh</groupId>
			<artifactId>jmh-generator-annprocess</artifactId>
			<version>1.21</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<version>5.4.2</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<release>7</release>
					<source>1.7</source> <!-- redundant to <release> but needed until https://bugs.openjdk.java.net/browse/JDK-8219474 is fixed (see javadoc config) -->
					<target>1.7</target>
					<testRelease>8</testRelease>
					<encoding>UTF-8</encoding>
					<showWarnings>true</showWarnings>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.1</version>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>intellij</id>
			<!-- workaround for intellij bug: https://youtrack.jetbrains.com/issue/IDEA-85478 -->
			<activation>
				<activeByDefault>false</activeByDefault>
				<property>
					<name>idea.maven.embedder.version</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>3.8.0</version>
						<configuration>
							<release>8</release>
							<source>1.8</source>
							<target>1.8</target>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>dependency-check</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.owasp</groupId>
						<artifactId>dependency-check-maven</artifactId>
						<version>4.0.2</version>
						<configuration>
							<cveValidForHours>24</cveValidForHours>
							<failBuildOnCVSS>0</failBuildOnCVSS>
							<skipTestScope>true</skipTestScope>
							<detail>true</detail>
							<suppressionFile>suppression.xml</suppressionFile>
						</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>0.8.3</version>
						<executions>
							<execution>
								<id>prepare-agent</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>release</id>
			<distributionManagement>
				<repository>
					<id>bintray-jcenter</id>
					<url>https://api.bintray.com/maven/cryptomator/maven/cryptolib/;publish=1</url>
				</repository>
			</distributionManagement>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.0.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.1.0</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<source>1.7</source> <!-- workaround for https://bugs.openjdk.java.net/browse/JDK-8219474 -->
							<target>1.7</target>
						</configuration>
					</plugin>
					<plugin>
						<artifactId>maven-dependency-plugin</artifactId>
						<version>3.1.1</version>
						<executions>
							<execution>
								<id>generate-dependency-list</id>
								<phase>prepare-package</phase>
								<goals>
									<goal>list</goal>
								</goals>
								<configuration>
									<includeScope>runtime</includeScope>
									<outputFile>${project.build.directory}/dependency-list.txt</outputFile>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
