<?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>1.4.redhat-621070</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>sample</artifactId>
  <packaging>war</packaging>
  <name>${project.artifactId}</name>
  <description>hawtio :: Sample Web Application and Console</description>

  <dependencies>
    <dependency>
      <groupId>io.hawt</groupId>
      <artifactId>hawtio-default</artifactId>
      <version>${project.version}</version>
      <!--
        NOTE this WAR dependency type which enables this WAR to
        inherit all the plugins and content from the hawtio-default WAR
      -->
      <type>war</type>
    </dependency>

    <!-- lets mark dependencies from the WAR as provided to avoid jetty:run adding duplicates -->
    <dependency>
      <groupId>io.hawt</groupId>
      <artifactId>hawtio-core</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.hawt</groupId>
      <artifactId>hawtio-git</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>

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


    <!-- for some sample stuff to browse -->
    <dependency>
      <groupId>io.hawt.example.services</groupId>
      <artifactId>example-infinispan</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>io.hawt.example.services</groupId>
      <artifactId>example-dozer-models</artifactId>
      <version>${project.version}</version>
    </dependency>
<!--
    <dependency>
      <groupId>io.hawt</groupId>
      <artifactId>hawtio-watcher-spring-context</artifactId>
      <version>${project.version}</version>
    </dependency>
-->

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-jms</artifactId>
      <version>${camel-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-spring</artifactId>
      <version>${camel-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-jackson</artifactId>
      <version>${camel-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>activemq-client</artifactId>
      <version>${activemq-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>activemq-broker</artifactId>
      <version>${activemq-version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>activemq-camel</artifactId>
      <version>${activemq-version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>${spring-version}</version>
    </dependency>

<!--
    <dependency>
      <groupId>org.apache.xbean</groupId>
      <artifactId>xbean-spring</artifactId>
      <version>${xbean-version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <version>${spring-version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
      <version>${spring-version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
      <version>${spring-version}</version>
    </dependency>
-->
    <dependency>
      <groupId>com.sun</groupId>
      <artifactId>tools</artifactId>
      <version>1.6</version>
      <scope>system</scope>
      <systemPath>${toolsjar}</systemPath>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>${jetty-plugin-groupId}</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>${jetty-version}</version>
        <configuration>
          <webAppSourceDirectory>${project.build.directory}/${project.name}</webAppSourceDirectory>
          <scanIntervalSeconds>1</scanIntervalSeconds>
          <webAppConfig>
            <contextPath>${context}</contextPath>
          </webAppConfig>
          <connectors>
            <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
              <port>${jettyPort}</port>
              <maxIdleTime>60000</maxIdleTime>
            </connector>
          </connectors>
          <systemProperties>
            <systemProperty>
              <key>hawtio.config.dir</key>
              <value>${hawtio-config-dir}</value>
            </systemProperty>
            <systemProperty>
              <key>hawtio.config.repo</key>
              <value>${hawtio-config-repo}</value>
            </systemProperty>
          </systemProperties>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.0</version>
        <configuration>
          <port>9090</port>
          <path>${context}</path>
          <systemProperties></systemProperties>
          <useTestClasspath>false</useTestClasspath>
          <warSourceDirectory>${project.build.directory}/${project.name}-${project.version}</warSourceDirectory>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat6-maven-plugin</artifactId>
        <version>2.0</version>
        <configuration>
          <port>9090</port>
          <path>${context}</path>
          <systemProperties></systemProperties>
          <useTestClasspath>false</useTestClasspath>
          <warSourceDirectory>${project.build.directory}/${project.name}-${project.version}</warSourceDirectory>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>${basedir}/overlays</directory>
              <includes>
                <include>**/*.*</include>
              </includes>
              <followSymlinks>false</followSymlinks>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
