<?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>

    <parent>
        <groupId>de.adorsys</groupId>
        <artifactId>docusafe</artifactId>
        <version>0.1.0</version>
    </parent>

    <artifactId>docusafe-service</artifactId>

    <dependencies>

        <dependency>
            <groupId>de.adorsys.cryptoutils</groupId>
            <artifactId>basetypes</artifactId>
            <version>${crypt.version}</version>
        </dependency>

        <!-- Encrypted object -->
        <dependency>
            <groupId>de.adorsys.cryptoutils</groupId>
            <artifactId>encobject</artifactId>
            <version>${crypt.version}</version>
        </dependency>
        <dependency>
            <groupId>de.adorsys.cryptoutils</groupId>
            <artifactId>jkeyutils</artifactId>
            <version>${crypt.version}</version>
        </dependency>
        <dependency>
            <groupId>de.adorsys.cryptoutils</groupId>
            <artifactId>filesystemstoreconnection</artifactId>
            <version>${crypt.version}</version>
        </dependency>

        <!-- bouncy castle -->
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk15on</artifactId>
            <version>1.54</version>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-jdk15on</artifactId>
            <version>1.54</version>
        </dependency>


        <dependency>
            <groupId>de.adorsys.cryptoutils</groupId>
            <artifactId>filesystemstoreconnection</artifactId>
            <version>${crypt.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>de.adorsys.cryptoutils</groupId>
            <artifactId>mongodbstoreconnection</artifactId>
            <version>${crypt.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>de.adorsys.cryptoutils</groupId>
            <artifactId>storeconnection-testsuite</artifactId>
            <version>${crypt.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>


    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>

            <!-- START needed for mongodb TESTS -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- Exclude integation tests from standards -->
                    <excludes>
                        <exclude>**/*Test.java</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <!-- Define execution for integration tests. -->
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <phase>integration-test</phase>
                        <configuration>
                            <excludes>
                                <exclude>none</exclude>
                            </excludes>
                            <includes>
                                <include>**/*Test.java</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- see https://github.com/joelittlejohn/embedmongo-maven-plugin -->
                <groupId>com.github.joelittlejohn.embedmongo</groupId>
                <artifactId>embedmongo-maven-plugin</artifactId>
                <version>0.3.5</version>
                <executions>
                    <execution>
                        <id>start</id>
                        <goals>
                            <goal>start</goal>
                        </goals>
                        <configuration>
                            <version>3.4.13</version>
                            <databaseDirectory>target/mongotest</databaseDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>stop</id>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- END needed for mongodb TESTS -->

        </plugins>
    </build>
    
</project>
