<?xml version="1.0" encoding="UTF-8"?>

<!--
 Copyright (c) 2015 Red Hat, Inc. and/or its affiliates.

 This program and the accompanying materials are made
 available under the terms of the Eclipse Public License 2.0
 which is available at https://www.eclipse.org/legal/epl-2.0/

 SPDX-License-Identifier: EPL-2.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>
        <artifactId>test-apps</artifactId>
        <groupId>org.jberet.test-apps</groupId>
        <version>2.2.0.Final</version>
    </parent>

    <artifactId>purgeMongoRepository</artifactId>

    <dependencies>
        <dependency>
            <groupId>org.jberet.test-apps</groupId>
            <artifactId>common</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- dependency for kill-and-restart tests -->
        <dependency>
            <groupId>org.jberet.test-apps</groupId>
            <artifactId>purgeInMemoryRepository</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jberet.test-apps</groupId>
            <artifactId>chunkPartition</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.mongodb</groupId>
            <artifactId>mongo-java-driver</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>${jvmArgs}</argLine>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <configuration>
                    <argLine>${jvmArgs}</argLine>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>**/*Mongo*.java</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>allTests</id>
            <activation>
                <property>
                    <name>allTests</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-failsafe-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
