<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>com.googlecode.flyway-test-extensions</groupId>
		<artifactId>flyway-test-extensions</artifactId>
		<version>1.7.0</version>
	</parent>

	<groupId>com.googlecode.flyway-test-extensions</groupId>
	<artifactId>flyway-spring-test</artifactId>
	<version>1.7.0</version>
	<name>${project.artifactId}</name>
	<packaging>jar</packaging>

	<properties>
	</properties>
	<dependencies>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${version.spring}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<version>${version.spring}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${version.slf4j}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>${version.slf4j}</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>
		<dependency>
			<groupId>com.googlecode.flyway</groupId>
			<artifactId>flyway-core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<scope>compile</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>com.googlecode.maven-gcu-plugin</groupId>
				<artifactId>maven-gcu-plugin</artifactId>
				<executions>
					<execution>
						<phase>deploy</phase>
						<goals>
							<goal>upload</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<failsOnError>false</failsOnError>
					<projectName>flyway-test-extensions</projectName>
					<uploads>
						<upload>
							<file>${project.build.directory}/${project.artifactId}-${project.version}.jar</file>
							<summary>Flyway Spring Test Extension</summary>
							<labels>
								<label>Featured</label>
								<label>Type-Jar</label>
								<label>OpSys-All</label>
							</labels>
						</upload>
						<upload>
							<file>${project.build.directory}/${project.artifactId}-${project.version}-sources.jar</file>
							<summary>Flyway Spring Test Extension (sources)</summary>
							<labels>
								<label>Featured</label>
								<label>Type-Source</label>
								<label>OpSys-All</label>
							</labels>
						</upload>
						<upload>
							<file>${project.build.directory}/${project.artifactId}-${project.version}-test-sources.jar</file>
							<summary>Flyway Spring Test Extension (sources) local sample</summary>
							<labels>
								<label>Featured</label>
								<label>Type-Source</label>
								<label>OpSys-All</label>
							</labels>
						</upload>
					</uploads>
				</configuration>
			</plugin>
		</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>
							</systemPropertyVariables>
							<includes>
								<include>**/*JUnitTest.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>
							</systemPropertyVariables>
							<includes>
								<include>**/*JUnitTest.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>
