<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>uk.co.stfo</groupId>
	<artifactId>substeps-adriver</artifactId>
	<version>0.2.2</version>

	<packaging>jar</packaging>
	<name>A-Driver Substeps</name>
	<description>A-Driver alternative to Webdriver SubSteps</description>

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:git@github.com:stuforbes/substeps-adriver.git</connection>
		<url>scm:git:git@github.com:stuforbes/substeps-adriver.git</url>
		<developerConnection>scm:git:git@github.com:stuforbes/substeps-adriver.git</developerConnection>
		<tag>HEAD</tag>
	</scm>

	<developers>
		<developer>
			<id>stuforbes</id>
			<name>Stu Forbes</name>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
	</developers>

	<properties>
		<selenium.version>2.31.0</selenium.version>

		<hamcrest.version>1.3</hamcrest.version>
		<junit.version>4.10</junit.version>

		<substeps.api.version>1.1.0</substeps.api.version>
		<substeps.core.version>1.1.0</substeps.core.version>
		<substeps.runners.version>1.1.0</substeps.runners.version>
		<substeps.glossary.version>1.1.0</substeps.glossary.version>
	</properties>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>2.8</version>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.1</version>
				<configuration>
					<mavenExecutorId>forked-path</mavenExecutorId>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
					<showDeprecation>true</showDeprecation>
					<showWarnings>true</showWarnings>
					<fork>true</fork>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.8.1</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											com.technophobia.substeps
										</groupId>
										<artifactId>
											substeps-glossary-builder
										</artifactId>
										<versionRange>
											[1.1.0,)
										</versionRange>
										<goals>
											<goal>generate-docs</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<dependencies>
		<dependency>
			<groupId>com.technophobia.substeps</groupId>
			<artifactId>substeps-core-api</artifactId>
			<version>${substeps.api.version}</version>
		</dependency>

		<dependency>
			<groupId>uk.co.stfo</groupId>
			<artifactId>adriver</artifactId>
			<version>0.2.2</version>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.6.4</version>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.6.4</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
		</dependency>


		<!-- TEST DEPENDENCIES -->

		<!-- Dependency on core must be TEST scope only -->
		<dependency>
			<groupId>com.technophobia.substeps</groupId>
			<artifactId>substeps-core</artifactId>
			<version>${substeps.core.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>com.technophobia.substeps</groupId>
			<artifactId>substeps-junit-runner</artifactId>
			<version>${substeps.runners.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-core</artifactId>
			<version>${hamcrest.version}</version>

		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-library</artifactId>
			<version>${hamcrest.version}</version>

		</dependency>


		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-java</artifactId>
			<version>${selenium.version}</version>
		</dependency>

		<dependency>
			<groupId>com.github.detro.ghostdriver</groupId>
			<artifactId>phantomjsdriver</artifactId>
			<version>1.0.3</version>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.1</version>
		</dependency>

		<dependency>
			<groupId>org.jmock</groupId>
			<artifactId>jmock</artifactId>
			<version>2.6.0</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.jmock</groupId>
			<artifactId>jmock-junit4</artifactId>
			<version>2.6.0</version>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<profiles>
		<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.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>generate-glossary</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>com.technophobia.substeps</groupId>
						<artifactId>substeps-glossary-builder</artifactId>
						<version>${substeps.glossary.version}</version>

						<executions>
							<execution>
								<id>build-substeps-adriver-glossary</id>
								<phase> process-test-resources</phase>
								<goals>
									<goal>generate-docs</goal>
								</goals>
							</execution>
						</executions>

						<configuration>
							<stepImplementationClassNames>
								<param>uk.co.stfo.adriver.substeps.step.ActionADriverStepImplementations</param>
								<param>uk.co.stfo.adriver.substeps.step.AssertionADriverStepImplementations</param>

								<param>uk.co.stfo.adriver.substeps.step.FinderADriverStepImplementations</param>
								<param>uk.co.stfo.adriver.substeps.step.FormADriverStepImplementations</param>
							</stepImplementationClassNames>

							<glossaryPublisher implementation="com.technophobia.substeps.glossary.JsonSubstepsPublisher">
								<outputFile>${project.build.directory}/stepimplementations.json</outputFile>
							</glossaryPublisher>

						</configuration>


						<dependencies>
							<dependency>
								<groupId>org.slf4j</groupId>
								<artifactId>slf4j-log4j12</artifactId>
								<version>1.6.4</version>
							</dependency>
						</dependencies>

					</plugin>
				</plugins>
			</build>
		</profile>

	</profiles>

</project>
