<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>ais</artifactId>
	<name>${project.artifactId}</name>
	<description>Utilities for parsing AIS NMEA and XML messages and for processing AIS message streams.</description>
	<dependencies>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>${guava.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.17</version>
			<exclusions>
				<exclusion>
					<groupId>com.sun.jmx</groupId>
					<artifactId>jmxri</artifactId>
				</exclusion>
				<exclusion>
					<groupId>com.sun.jdmk</groupId>
					<artifactId>jmxtools</artifactId>
				</exclusion>
				<exclusion>
					<groupId>javax.mail</groupId>
					<artifactId>mail</artifactId>
				</exclusion>
				<exclusion>
					<groupId>javax.jms</groupId>
					<artifactId>jms</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.4</version>
		</dependency>

		<dependency>
			<groupId>io.reactivex</groupId>
			<artifactId>rxjava</artifactId>
			<version>${rxjava.version}</version>
		</dependency>
		<dependency>
			<groupId>io.reactivex</groupId>
			<artifactId>rxjava-string</artifactId>
			<version>${rxjava.string.version}</version>
		</dependency>
		<dependency>
			<groupId>com.github.davidmoten</groupId>
			<artifactId>rxjava-extras</artifactId>
			<version>${rxjava.extras.version}</version>
		</dependency>
		<dependency>
			<groupId>com.github.davidmoten</groupId>
			<artifactId>rxjava-slf4j</artifactId>
			<version>${rxjava.slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>${project.parent.groupId}</groupId>
			<artifactId>streams</artifactId>
			<version>${project.parent.version}</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>${project.parent.groupId}</groupId>
			<artifactId>formats</artifactId>
			<version>${project.parent.version}</version>
			<optional>true</optional>
		</dependency>

		<!-- test/benchmark deps -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.easymock</groupId>
			<artifactId>easymock</artifactId>
			<version>3.3</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.openjdk.jmh</groupId>
			<artifactId>jmh-core</artifactId>
			<version>${jmh.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>au.gov.amsa.risky</groupId>
			<artifactId>formats</artifactId>
			<version>${project.parent.version}</version>
		</dependency>
		<!-- 
		<dependency>
			<groupId>dk.dma.ais.lib</groupId>
			<artifactId>ais-lib-messages</artifactId>
			<version>2.2-SNAPSHOT</version>
			<scope>test</scope>
		</dependency>
		 -->
	</dependencies>

	<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>
		<profile>
			<id>bin</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>exec-maven-plugin</artifactId>
						<version>${exec.version}</version>
						<executions>
							<execution>
								<goals>
									<goal>java</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<classpathScope>test</classpathScope>
							<mainClass>au.gov.amsa.ais.rx.NmeaGzToBinaryFixesMain</mainClass>
							<systemProperties>
								<systemProperty>
									<key>input</key>
									<value>${input}</value>
								</systemProperty>
								<systemProperty>
									<key>output</key>
									<value>${output}</value>
								</systemProperty>
								<systemProperty>
									<key>pattern</key>
									<value>${pattern}</value>
								</systemProperty>
							</systemProperties>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
