<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>parent</artifactId>
		<version>2.2</version>
		<relativePath>../parent/pom.xml</relativePath>
	</parent>
	<artifactId>flyway-test-sample-spring3</artifactId>
	<name>${project.artifactId}</name>
	<description>
        Example how to use flyway-spring-test with spring 3.1.
    </description>
	<packaging>jar</packaging>

	<url>http://code.google.com/p/flyway-test-extensions/</url>
	<licenses>
		<license>
			<name>Apache 2</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
			<comments>A business-friendly OSS license</comments>
		</license>
	</licenses>
	<scm>
		<url>http://code.google.com/p/flyway-test-extensions/source/browse/</url>
		<connection>scm:hg:https://flyway-test-extensions.googlecode.com/hg/</connection>
		<developerConnection>scm:hg:file:///work/flyway-test-extensions-release</developerConnection>
	</scm>
	<developers>
		<developer>
			<id>Florian</id>
			<name>florian.g.w.e4</name>
		</developer>
	</developers>
	<distributionManagement>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>http://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Nexus Release Repository</name>
			<url>http://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>



	<properties>
    </properties>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${version.junit}</version>
			<scope>test</scope>
		</dependency>
        <dependency>
			<groupId>com.googlecode.flyway-test-extensions</groupId>
			<artifactId>flyway-spring-test</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<version>${version.h2}</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>
	<build>
		<pluginManagement>
           <plugins>
           <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.9</version>
            </plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
					<groupId>com.googlecode.maven-gcu-plugin</groupId>
					<artifactId>maven-gcu-plugin</artifactId>
					<version>1.1</version>
			</plugin>
           </plugins>
		 </pluginManagement>
		 <plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.1.2</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>verify</phase>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		 	<plugin>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.2.2</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<mavenExecutorId>forked-path</mavenExecutorId>
					<preparationGoals>clean install</preparationGoals>
				</configuration>
			</plugin>
			<plugin>
				<groupId>com.mycila.maven-license-plugin</groupId>
				<artifactId>maven-license-plugin</artifactId>
				<version>1.9.0</version>
				<inherited>false</inherited>
				<configuration>
					<header>${basedir}/../license.txt</header>
					<aggregate>true</aggregate>
					<failIfMissing>true</failIfMissing>
					<encoding>UTF-8</encoding>
					<excludes>
						<exclude>.hg*</exclude>
						<exclude>**/*.sh</exclude>
						<exclude>**/*.txt</exclude>
						<exclude>**/*.cnf</exclude>
						<exclude>**/*.releaseBackup</exclude>
					</excludes>
					<strictCheck>true</strictCheck>
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>format</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<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}-test-sources.jar</file>
							<summary>Flyway Spring Version 3.x Test Extension Sample (sources)</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>sampletest3</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>**/*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>
                    <version>${version.oracle}</version>
                    <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>sampletest3</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>**/*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>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.4</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<!--suppress MavenModelInspection -->
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
