<?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>

    <parent>
        <groupId>se.thinkcode.wait</groupId>
        <artifactId>wait-plugin</artifactId>
        <version>1.2.0</version>
    </parent>

    <artifactId>test</artifactId>

    <build>
        <plugins>

            <plugin>
                <groupId>se.thinkcode.wait</groupId>
                <artifactId>http</artifactId>
                <version>${project.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>wait</goal>
                        </goals>
                        <configuration>
                            <url>http://localhost:4040//geo/rest/v1/gata</url>
                            <timeout>1000</timeout>
                            <headers>
                                <applicationId>Acceptance test</applicationId>
                            </headers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <configuration>
                            <target>
                                <property name="runtime_classpath" refid="maven.runtime.classpath"/>
                                <exec executable="java" spawn="true">
                                    <arg value="-classpath"/>
                                    <arg value="${runtime_classpath}"/>
                                    <arg value="se.thinkcode.wait.WaitServer"/>
                                </exec>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.sparkjava</groupId>
            <artifactId>spark-core</artifactId>
            <version>2.9.1</version>
        </dependency>
    </dependencies>

</project>
