<?xml version="1.0"?>
<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>
	<parent>
		<groupId>com.scytl.products.ov.sdm</groupId>
		<artifactId>ov-secure-data-manager-backend</artifactId>
        <version>2.1.6</version>
	</parent>

	<groupId>com.scytl.products.ov.sdm.services</groupId>
	<artifactId>secure-data-manager-services</artifactId>
	<packaging>jar</packaging>
	<name>Secure Data Manager - Backend - Services</name>

	<properties>
		<junit.version>4.12</junit.version>
		<mockito.version>1.10.19</mockito.version>
		<spring-boot-jersey.version>1.0.0.M1</spring-boot-jersey.version>
		<jmockit.version>1.17</jmockit.version>
	</properties>

	<dependencies>
        <dependency>
          <groupId>com.scytl.products.ov</groupId>
          <artifactId>mixnet-webapp</artifactId>
          <version>${project.version}</version>
          <classifier>classes</classifier>
    	  <exclusions>
    			<exclusion>
    				<groupId>org.mockito</groupId>
    				<artifactId>mockito-all</artifactId>
    			</exclusion>
    		</exclusions>
        </dependency>

    <!-- Configuration engine - commons module -->
		<dependency>
			<groupId>com.scytl.products.ov</groupId>
			<artifactId>config-commons</artifactId>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
				<exclusion>
					<artifactId>log4j-slf4j-impl</artifactId>
					<groupId>org.apache.logging.log4j</groupId>
				</exclusion>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-log4j12</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.springframework.batch</groupId>
					<artifactId>spring-batch-core</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
        <dependency>
            <groupId>com.squareup.retrofit2</groupId>
            <artifactId>retrofit</artifactId>
        </dependency>
        <dependency>
            <groupId>com.squareup.retrofit2</groupId>
            <artifactId>converter-jackson</artifactId>
        </dependency>
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
            <version>${okhttp.version}</version>
        </dependency>
		<dependency>
			<groupId>com.scytl.products.ov.sdm.services</groupId>
			<artifactId>secure-data-manager-integration</artifactId>
			<version>${project.version}</version>
		</dependency>
		<!-- Configuration engine - Shares Module -->
		<dependency>
			<groupId>com.scytl.products.ov</groupId>
			<artifactId>config-shares</artifactId>
			<exclusions>
				<exclusion>
					<groupId>org.apache.logging.log4j</groupId>
					<artifactId>log4j-slf4j-impl</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.logging.log4j</groupId>
					<artifactId>log4j-core</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-log4j12</artifactId>
				</exclusion>
			</exclusions>
        </dependency>

		<!-- Jersey REST client + Jackson support -->
		<dependency>
			<groupId>org.glassfish.jersey.core</groupId>
			<artifactId>jersey-client</artifactId>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-json-jackson</artifactId>
		</dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.jaxrs</groupId>
			<artifactId>jackson-jaxrs-json-provider</artifactId>
		</dependency>

		<!-- Canonizer to avoid sanitizer filter issues -->
		<dependency>
			<groupId>org.owasp.esapi</groupId>
			<artifactId>esapi</artifactId>
		</dependency>
		<dependency>
			<groupId>org.beanshell</groupId>
            <artifactId>bsh-core</artifactId>            
		</dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>

		<!-- Orient DB -->
		<dependency>
			<groupId>com.orientechnologies</groupId>
			<artifactId>orientdb-graphdb</artifactId>
			<exclusions>
				<exclusion>
					<groupId>org.codehaus.groovy</groupId>
					<artifactId>groovy</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
        
        <!-- Bouncy Castle -->
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk15on</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-jdk15on</artifactId>
        </dependency>

		<!-- Testing -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jmockit</groupId>
			<artifactId>jmockit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<exclusions>
				<exclusion>
					<groupId>org.hamcrest</groupId>
					<artifactId>hamcrest-core</artifactId>
				</exclusion>
			</exclusions>
			<scope>test</scope>
		</dependency>
        <!-- ov-commons -->
		<dependency>
			<groupId>com.scytl.products.ov.channel.commons.lib</groupId>
			<artifactId>ov-commons-lib</artifactId>
		</dependency>
		<dependency>
			<groupId>com.scytl.products.ov.channel.commons.lib</groupId>
			<artifactId>ov-commons-lib-persistence</artifactId>
		</dependency>
		<dependency>
			<groupId>com.scytl.products.ov.channel.commons</groupId>
			<artifactId>ov-commons-sign</artifactId>
		</dependency>
		<dependency>
			<groupId>com.scytl.products.ov.channel.commons</groupId>
			<artifactId>ov-commons-beans</artifactId>
		</dependency>
        <dependency>
            <groupId>com.scytl.products.ov.channel.commons</groupId>
            <artifactId>ov-commons-infrastructure</artifactId>
        </dependency>
        <dependency>
            <groupId>com.scytl.products.ov.channel.commons</groupId>
            <artifactId>ov-commons-dto</artifactId>
        </dependency>
        <dependency>
            <groupId>com.scytl.products.ov.sdm</groupId>
            <artifactId>ov-secure-data-manager-commons</artifactId>
        </dependency>

    </dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>properties-maven-plugin</artifactId>
				<version>1.0-alpha-2</version>
				<executions>
					<execution>
						<phase>generate-resources</phase>
						<goals>
							<goal>write-active-profile-properties</goal>
						</goals>
						<configuration>
							<outputFile>${project.build.outputDirectory}/config/services/smartcard.properties</outputFile>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>e2e</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<properties>
				<smartcards.profile>e2e</smartcards.profile>
			</properties>
		</profile>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<smartcards.profile>default</smartcards.profile>
			</properties>
		</profile>
	</profiles>
</project>
