<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>ch.uzh.ifi.ddis.ifp</groupId>
		<artifactId>cassandra-esper-parent</artifactId>
		<version>0.2.2</version>
		<relativePath>../</relativePath>
	</parent>

	<artifactId>cassandra-esper-integration-tests</artifactId>
	<name>Cassandra for Esper Integration Tests</name>

	<build>
		<plugins>
			<!-- skip unit test run, tests to be executed during integration-test -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.15</version>
				<configuration>
					<skip>true</skip>
				</configuration>
				<executions>
					<execution>
						<id>surefire-it</id>
						<phase>integration-test</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<skip>false</skip>
							<suiteXmlFiles>
								<suiteXmlFile>testng.xml</suiteXmlFile>
							</suiteXmlFiles>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>2.7.1</version>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cassandra-maven-plugin</artifactId>
				<version>1.2.1-1</version>
				<dependencies>
					<dependency>
						<groupId>org.xerial.snappy</groupId>
						<artifactId>snappy-java</artifactId>
						<version>1.0.4.1</version>
						<type>jar</type>
					</dependency>
				</dependencies>
				<configuration>
					<rpcAddress>127.0.0.1</rpcAddress>
					<rpcPort>9160</rpcPort>
					<jmxPort>7199</jmxPort>
					<storagePort>7000</storagePort>
					<stopPort>8081</stopPort>
					<clusterSize>1</clusterSize>
					<listenAddress>127.0.0.1</listenAddress>
					<!-- Without native transport local builds will fail. -->
					<yaml>start_native_transport: true</yaml>
					<keyspace>testks</keyspace>
					<cqlScript>src/it/resources/cassandra/load.cql</cqlScript>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>start-cluster</goal>
							<goal>delete</goal>
							<goal>cql-exec</goal>
							<goal>stop-cluster</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>

		<!-- Mark tests as integration tests by putting them into the 'it' folder 
			instead of the 'test' folder -->
		<testSourceDirectory>src/it/java</testSourceDirectory>
		<testResources>
			<testResource>
				<filtering>false</filtering>
				<directory>src/it/resources</directory>
			</testResource>
		</testResources>

	</build>
	
	<dependencies>

		<dependency>
			<groupId>org.apache.cassandra</groupId>
			<artifactId>cassandra-all</artifactId>
			<version>${cassandra.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.espertech</groupId>
			<artifactId>esper</artifactId>
			<version>${esper.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.datastax.cassandra</groupId>
			<artifactId>cassandra-driver-core</artifactId>
			<version>${cassandra-driver.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<version>6.8</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>ch.uzh.ifi.ddis.ifp</groupId>
			<artifactId>testng4esper</artifactId>
			<version>0.3.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.espertech</groupId>
			<artifactId>esperio-csv</artifactId>
			<version>${esper.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>ch.uzh.ifi.ddis.ifp</groupId>
			<artifactId>cassandra-esper</artifactId>
			<version>0.2.2</version>
		</dependency>
	</dependencies>

</project>
