<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>org.flywaydb.flyway-test-extensions</groupId>
		<artifactId>parent</artifactId>
		<version>4.0.1</version>
		<relativePath>../parent/pom.xml</relativePath>
	</parent>

    <artifactId>flyway-dbunit-test</artifactId>

    <name>${project.artifactId}</name>
    <description>
        Implementation for dbunit support and spring 4.
        If spring 3 support needed please use flyway-dbunit-spring3-test.
        If spring 4 support needed please use flyway-dbunit-spring4-test.
    </description>


    <packaging>jar</packaging>

	<properties>
		<version.dbunit>2.4.9</version.dbunit>
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.6</maven.compiler.target>
    </properties>

	<dependencies>
		<dependency>
			<groupId>org.flywaydb.flyway-test-extensions</groupId>
			<artifactId>flyway-spring-test</artifactId>
			<version>${project.version}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${version.junit}</version>
		</dependency>
		<dependency>
			<groupId>org.dbunit</groupId>
			<artifactId>dbunit</artifactId>
			<version>${version.dbunit}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<version>${version.h2}</version>
			<scope>test</scope>
		</dependency>
        <!-- dbunit internal need a slf4j implementation -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>${version.slf4j}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

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

	<profiles>
		<profile>
			<id>h2-test</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<systemPropertyVariables>
								<jdbc.driver>org.h2.Driver</jdbc.driver>
								<jdbc.url>jdbc:h2:nio:${project.build.directory}/db/flywaytest.db</jdbc.url>
								<jdbc.username>h2_test</jdbc.username>
								<jdbc.password>h2_test</jdbc.password>
								<flyway.locations>basetest</flyway.locations>
                                <flyway.driver>org.h2.Driver</flyway.driver>
                                <flyway.url>jdbc:h2:nio:${project.build.directory}/db/flywaytest.db</flyway.url>
                                <flyway.user>h2_test</flyway.user>
                                <flyway.password>h2_test</flyway.password>
                            </systemPropertyVariables>
							<includes>
								<include>**/*DBunitTest.java</include>
							</includes>
							<threadCount>1</threadCount>
							<runOrder>alphabetical</runOrder>
							<perCoreThreadCount>false</perCoreThreadCount>
							<redirectTestOutputToFile>false</redirectTestOutputToFile>
						</configuration>
						<goals>
							<goal>test</goal>
						</goals>
						<executions>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>oracle-test</id>
			<dependencies>
				<dependency>
					<groupId>com.oracle</groupId>
					<artifactId>ojdbc5</artifactId>
					<scope>test</scope>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<systemPropertyVariables>
								<jdbc.driver>oracle.jdbc.driver.OracleDriver</jdbc.driver>
								<jdbc.url>jdbc:oracle:thin:@localhost:1521/XE</jdbc.url>
								<jdbc.username>OC_TEST</jdbc.username>
								<jdbc.password>OC_TEST</jdbc.password>
								<flyway.locations>basetest</flyway.locations>
                                <flyway.driver>oracle.jdbc.driver.OracleDriver</flyway.driver>
                                <flyway.url>jdbc:oracle:thin:@localhost:1521/XE</flyway.url>
                                <flyway.user>OC_TEST</flyway.user>
                                <flyway.password>OC_TEST</flyway.password>
                            </systemPropertyVariables>
							<includes>
								<include>**/*DBunitTest.java</include>
							</includes>
							<threadCount>1</threadCount>
							<runOrder>alphabetical</runOrder>
							<perCoreThreadCount>false</perCoreThreadCount>
							<redirectTestOutputToFile>false</redirectTestOutputToFile>
						</configuration>
						<goals>
							<goal>test</goal>
						</goals>
						<executions>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
