<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>au.gov.amsa.risky</groupId>
		<artifactId>parent</artifactId>
		<version>0.5.2</version>
	</parent>
	<artifactId>mariweb-archive-parser</artifactId>
	<name>${project.artifactId}</name>
	<description>Utilities for processing mariweb backup data (mysql scripts)</description>
	<properties>
		<directory>mariweb-itu</directory>
	</properties>
	<dependencies>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>${guava.version}</version>
		</dependency>
		<dependency>
			<groupId>au.gov.amsa.risky</groupId>
			<artifactId>ais</artifactId>
			<version>${project.parent.version}</version>
		</dependency>
		<dependency>
			<groupId>au.gov.amsa.risky</groupId>
			<artifactId>streams</artifactId>
			<version>${project.parent.version}</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.openjdk.jmh</groupId>
			<artifactId>jmh-core</artifactId>
			<version>${jmh.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.2.1</version>
				<executions>
					<execution>
						<goals>
							<goal>java</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<classpathScope>test</classpathScope>
					<mainClass>au.gov.amsa.mariweb.BackupReaderMain</mainClass>
					<arguments>
						<argument>${directory}</argument>
					</arguments>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>benchmark</id>
			<dependencies>
				<dependency>
					<groupId>org.openjdk.jmh</groupId>
					<artifactId>jmh-generator-annprocess</artifactId>
					<version>${jmh.version}</version>
					<scope>test</scope>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>exec-maven-plugin</artifactId>
						<version>${exec.version}</version>
						<executions>
							<execution>
								<id>run-benchmarks</id>
								<phase>integration-test</phase>
								<goals>
									<goal>exec</goal>
								</goals>
								<configuration>
									<classpathScope>test</classpathScope>
									<executable>java</executable>
									<arguments>
										<argument>-classpath</argument>
										<classpath />
										<argument>org.openjdk.jmh.Main</argument>
										<!-- -h for help -->
										<argument>-f</argument>
										<argument>1</argument>
										<argument>-i</argument>
										<argument>10</argument>
										<argument>-wi</argument>
										<argument>3</argument>
										<argument>-jvmArgs</argument>
										<argument>-Xmx512m</argument>
									</arguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
