<?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>siv-mode</artifactId>
	<version>1.3.1</version>

	<name>SIV Mode</name>
	<description>RFC 5297 SIV mode: deterministic authenticated encryption</description>
	<url>https://github.com/cryptomator/siv-mode</url>

	<scm>
		<connection>scm:git:git@github.com:cryptomator/siv-mode.git</connection>
		<developerConnection>scm:git:git@github.com:cryptomator/siv-mode.git</developerConnection>
		<url>git@github.com:cryptomator/siv-mode.git</url>
	</scm>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://www.opensource.org/licenses/mit-license.php</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>

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

	<dependencies>
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcprov-jdk15on</artifactId>
			<version>1.60</version>
			<!-- see maven-shade-plugin; we don't want this as a transitive dependency in other projects -->
			<optional>true</optional>
		</dependency>

		<!-- Tests -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>2.16.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>24.0-jre</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.openjdk.jmh</groupId>
			<artifactId>jmh-core</artifactId>
			<version>1.20</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.openjdk.jmh</groupId>
			<artifactId>jmh-generator-annprocess</artifactId>
			<version>1.20</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.7.0</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
					<release>7</release>
					<encoding>UTF-8</encoding>
					<showWarnings>true</showWarnings>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>
				<configuration>
					<archive>
						<manifestEntries>
							<Sealed>true</Sealed>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-shade-plugin</artifactId>
				<version>3.1.0</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<minimizeJar>true</minimizeJar>
							<keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>
							<createDependencyReducedPom>false</createDependencyReducedPom>
							<createSourcesJar>false</createSourcesJar>
							<artifactSet>
								<includes>
									<include>org.bouncycastle:bcprov-jdk15on</include>
								</includes>
							</artifactSet>
							<relocations>
								<relocation>
									<pattern>org.bouncycastle</pattern>
									<shadedPattern>org.cryptomator.siv.org.bouncycastle</shadedPattern>
								</relocation>
							</relocations>
							<filters>
								<filter>
									<artifact>*:*</artifact>
									<excludes>
										<exclude>META-INF/*.SF</exclude>
										<exclude>META-INF/*.DSA</exclude>
										<exclude>META-INF/*.RSA</exclude>
									</excludes>
								</filter>
							</filters>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.moditect</groupId>
					<artifactId>moditect-maven-plugin</artifactId>
				<version>1.0.0.Beta1</version>
				<executions>
					<execution>
						<id>add-module-infos</id>
						<phase>package</phase>
						<goals>
							<goal>add-module-info</goal>
						</goals>
						<configuration>
							<module>
								<moduleInfoSource>
									module org.cryptomator.siv {
										exports org.cryptomator.siv;
									}
								</moduleInfoSource>
							</module>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>dependency-check</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.owasp</groupId>
						<artifactId>dependency-check-maven</artifactId>
						<version>3.1.1</version>
						<configuration>
							<cveValidForHours>24</cveValidForHours>
							<failBuildOnCVSS>0</failBuildOnCVSS>
						</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.0</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/siv-mode/;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.0.0</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
