<!--
  Copyright (c) 2014 "Kaazing Corporation," (www.kaazing.com)

  This file is part of Robot.

  Robot is free software: you can redistribute it and/or modify
  it under the terms of the GNU Affero General Public License as
  published by the Free Software Foundation, either version 3 of the
  License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU Affero General Public License for more details.

  You should have received a copy of the GNU Affero General Public License
  along with this program. If not, see <http://www.gnu.org/licenses />.
  -->
<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>org.kaazing</groupId>
        <artifactId>robot.parent</artifactId>
		<version>0.0.0.2</version>
	</parent>

	<artifactId>robot.junit</artifactId>
	<version>0.0.0.2</version>
	<packaging>jar</packaging>

	<name>robot/junit</name>
	<url>https://github.com/kaazing/robot</url>
	<description>
        Robot junit
    </description>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<checkstyle.config.location>../config/checkstyle/checkstyle.xml</checkstyle.config.location>
	</properties>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>[4.10,5.0)</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.kaazing</groupId>
			<artifactId>robot.control</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>commons-cli</groupId>
			<artifactId>commons-cli</artifactId>
			<version>1.2</version>
		</dependency>

		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.17</version>
		</dependency>

	</dependencies>

	<build>
		<resources>
			<!-- Copy .rpt files from the src/test/scripts/ directory into target/test-classes/META-INF/robot-scripts/ -->
			<resource>
				<directory>${basedir}/src/test/scripts</directory>
				<includes>
					<include>**/*.rpt</include>
				</includes>
				<targetPath>${project.build.testOutputDirectory}/META-INF/robot-scripts</targetPath>
			</resource>
			<resource>
				<directory>${basedir}/src/main/resources</directory>
			</resource>
			<resource>
				<directory>${basedir}/src/test/resources</directory>
			</resource>
		</resources>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>1.3.1</version>
				<executions>
					<execution>
						<id>enforce-versions</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireJavaVersion>
									<version>1.7</version>
								</requireJavaVersion>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>2.17</version>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>2.11</version>
				<executions>
					<execution>
						<id>validate</id>
						<phase>validate</phase>
						<configuration>
							<encoding>UTF-8</encoding>
							<!-- checkstyle doesn't like lambdas and exceptions and bails -->
							<consoleOutput>true</consoleOutput>
							<failsOnError>false</failsOnError>
							<failOnViolation>false</failOnViolation>
						</configuration>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.9.1</version>
				<configuration>
					<doctitle><![CDATA[<h1>Robot Protocol Testing Tool</h1>]]></doctitle>
					<bottom><![CDATA[<i>Copyright &#169; 2014 Kaazing, Inc. All Rights Reserved.</i>]]></bottom>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.2.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>verify</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.kaazing</groupId>
				<artifactId>robot-maven-plugin</artifactId>
				<version>${project.version}</version>
				<!-- Uncomment if you want to use a different version of the robot <dependencies> 
					<dependency> <groupId>org.kaazing</groupId> <artifactId>org.kaazing.robot</artifactId>
					<version>[2.0.0.0,2.1.0.0)</version> </dependency> </dependencies> -->
				<executions>
					<execution>
						<id>robot</id>
						<goals>
							<goal>start</goal>
							<goal>stop</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>

</project>
