<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>net.java.dev.activeobjects</groupId>
        <artifactId>activeobjects-integration-profiles</artifactId>
        <version>0.9-m51</version>
        <relativePath>../activeobjects-integration-profiles</relativePath>
    </parent>

    <artifactId>activeobjects-integration-test</artifactId>
    <name>Active Objects - Integration testing</name>
    <description>This is where the integration testing of the Active Objects library is done!</description>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <ao.test.database>${ao.test.database}</ao.test.database>
                        <ao.test.tablenameconverter>${ao.test.tablenameconverter}</ao.test.tablenameconverter>
                        <ao.test.fieldnameconverter>${ao.test.fieldnameconverter}</ao.test.fieldnameconverter>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <!-- creates and drops databases before and after tests -->
            <plugin>
                <groupId>org.leberrigaud.maven.plugins</groupId>
                <artifactId>database-maven-plugin</artifactId>
                <configuration>
                    <skip>${db.skip}</skip>
                    <database>${ao.test.database}</database>
                    <name>ao_test</name>
                    <username>ao_user</username>
                    <password>ao_password</password>
                    <rootUsername>${db.username}</rootUsername>
                    <rootPassword>${db.password}</rootPassword>
                </configuration>
                <executions>
                    <execution>
                        <id>create-db</id>
                        <goals>
                            <goal>create</goal>
                        </goals>
                        <phase>process-test-resources</phase>
                    </execution>
                    <execution>
                        <id>drop-db</id>
                        <goals>
                            <goal>drop</goal>
                        </goals>
                        <phase>test</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>net.java.dev.activeobjects</groupId>
            <artifactId>activeobjects-core</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.java.dev.activeobjects</groupId>
            <artifactId>activeobjects-test</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.java.dev.activeobjects</groupId>
            <artifactId>activeobjects-integration-test-model</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
            <version>2.2.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.8.4</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <properties>
        <ao.test.tablenameconverter>camelcase</ao.test.tablenameconverter>
        <ao.test.fieldnameconverter>camelcase</ao.test.fieldnameconverter>
    </properties>
</project>
