<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.modeshape</groupId>
        <artifactId>modeshape-persistence</artifactId>
        <version>5.2.0.Final</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <!-- The groupId and version values are inherited from parent -->
    <artifactId>modeshape-persistence-relational</artifactId>
    <packaging>jar</packaging>
    <name>ModeShape Relational Persistence Provider</name>
    <description>ModeShape Persistence Provider which stores content in relational databases</description>
    <url>http://www.modeshape.org</url>
    <dependencies>
        <!-- Used when no JNDI datasource is available -->
        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
        </dependency>
        <!-- Hikari requires SLF4j compile-time, ours is 'test' by default -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${version.org.slf4j}</version>
            <scope>compile</scope>
        </dependency>

        <!-- Force the use of H2 because as a default database -->
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <!--Start and run docker -->
            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>build-and-start</id>
                        <goals>
                            <goal>build</goal>
                            <goal>start</goal>
                        </goals>
                        <phase>pre-integration-test</phase>
                    </execution>
                    <execution>
                        <id>stop</id>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                        <phase>post-integration-test</phase>
                    </execution>
                </executions>
            </plugin>
            <!-- Run the integration tests-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
