<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->
<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>

    <groupId>uk.co.baconi.substeps</groupId>
    <artifactId>restdriver-substeps</artifactId>
    <version>0.0.2</version>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>A rest driver implementation for Substeps, to provide a means of testing rest endpoints.</description>
    <url>https://github.com/beercan1989/substeps-restdriver</url>

    <parent>
        <groupId>uk.co.baconi</groupId>
        <artifactId>baconi-parent</artifactId>
        <version>0.0.1</version>
    </parent>

    <scm>
        <connection>scm:git:git@github.com:beercan1989/substeps-restdriver.git</connection>
        <developerConnection>scm:git:git@github.com:beercan1989/substeps-restdriver.git</developerConnection>
        <url>git@github.com:beercan1989/substeps-restdriver.git</url>
        <tag>0.0.2</tag>
    </scm>

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

    <developers>
        <developer>
            <id>beercan1989</id>
            <name>James Bacon</name>
            <email>james@baconi.co.uk</email>
            <url>https://github.com/beercan1989</url>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <properties>
        <!-- Core Properties -->
        <slf4j.version>1.7.12</slf4j.version>
        <substeps.version>1.1.2</substeps.version>
        <typesafe.config.version>1.3.0</typesafe.config.version>

        <!-- Rest Specific Properties -->
        <apache-http-client.version>4.5.1</apache-http-client.version>
        <jsonpath.version>2.0.0</jsonpath.version>

        <!-- Matchers -->
        <hamcrest.version>2.0.0.0</hamcrest.version>
        <junit.version>4.12</junit.version>

        <!-- Testing -->
        <spring.boot.version>1.2.6.RELEASE</spring.boot.version>
    </properties>

    <dependencies>
        <!-- Rest Specific Dependencies -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${apache-http-client.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>fluent-hc</artifactId>
            <version>${apache-http-client.version}</version>
        </dependency>

        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>${jsonpath.version}</version>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path-assert</artifactId>
            <version>${jsonpath.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-library</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>java-hamcrest</artifactId>
            <version>${hamcrest.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-junit</artifactId>
            <version>${hamcrest.version}</version>
        </dependency>

        <!-- Properties-->
        <dependency>
            <groupId>com.typesafe</groupId>
            <artifactId>config</artifactId>
            <version>${typesafe.config.version}</version>
        </dependency>

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

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>com.technophobia.substeps</groupId>
            <artifactId>substeps-junit-runner</artifactId>
            <version>${substeps.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.technophobia.substeps</groupId>
            <artifactId>substeps-core</artifactId>
            <version>${substeps.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>${spring.boot.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <tags>
                            <tag>
                                <name>example</name>
                                <placement>m</placement>
                                <head>Example:</head>
                            </tag>
                            <tag>
                                <name>section</name>
                                <placement>m</placement>
                                <head>Section:</head>
                            </tag>
                        </tags>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.technophobia.substeps</groupId>
                <artifactId>substeps-glossary-builder</artifactId>
                <version>${substeps.version}</version>

                <executions>
                    <execution>
                        <id>build-substeps-glossary</id>
                        <phase>process-classes</phase>

                        <goals>
                            <goal>generate-docs</goal>
                        </goals>
                    </execution>
                </executions>

                <configuration>
                    <stepImplementationClassNames>
                        <param>uk.co.baconi.substeps.restdriver.steps.impl.RestRequestBuilderStepImplementations</param>
                        <param>uk.co.baconi.substeps.restdriver.steps.impl.RestAssertionStepImplementations</param>

                        <param>uk.co.baconi.substeps.restdriver.steps.impl.json.RestJsonAssertionStepImplementations</param>
                        <param>uk.co.baconi.substeps.restdriver.steps.impl.json.RestJsonFinderStepImplementations</param>
                    </stepImplementationClassNames>

                    <glossaryPublisher implementation="com.technophobia.substeps.glossary.JsonSubstepsPublisher">
                        <outputFile>${project.build.directory}/classes/step-implementations.json</outputFile>
                    </glossaryPublisher>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>