<?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">
  <parent>
    <groupId>io.hawt</groupId>
    <artifactId>project</artifactId>
    <version>2.17.4</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>hawtio-embedded</artifactId>
  <name>${project.artifactId}</name>
  <description>hawtio :: hawtio-embedded</description>

  <dependencies>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-webapp</artifactId>
      <version>${jetty-version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-server</artifactId>
      <version>${jetty-version}</version>
    </dependency>

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

    <!-- testing -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>fluent-hc</artifactId>
      <version>${httpclient-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.hawt</groupId>
      <artifactId>hawtio-default</artifactId>
      <version>${project.version}</version>
      <type>war</type>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>${exec-maven-plugin-version}</version>
        <executions>
          <execution>
            <goals>
              <goal>java</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <mainClass>io.hawt.embedded.Main</mainClass>
          <classpathScope>test</classpathScope>
          <arguments>
            <argument>--warLocation</argument>
            <argument>${basedir}/../hawtio-default/target</argument>
            <argument>--port</argument>
            <argument>${jettyPort}</argument>
            <argument>--contextPath</argument>
            <argument>${context}</argument>
          </arguments>
          <systemProperties>
            <systemProperty>
              <key>basedir</key>
              <value>${basedir}</value>
            </systemProperty>
            <systemProperty>
              <key>hawtio.authenticationEnabled</key>
              <value>false</value>
            </systemProperty>
          </systemProperties>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
