<?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.60</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>hawtio-wildfly</artifactId>
  <packaging>war</packaging>
  <name>${project.artifactId}</name>
  <description>hawtio :: Wildfly Web Application</description>

  <properties>
    <guava.version>15.0</guava.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>${servlet-api-version}</version>
      <scope>provided</scope>
    </dependency>

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

    <!-- need a newer version of commons-logging -->
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>${commons-logging-version}</version>
    </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>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>${war-plugin-version}</version>
        <configuration>
          <packagingExcludes>**/lib/slf4j*.jar,**/lib/commons-logging-*.jar,**/classes/log4j.properties,**/lib/guava-*.jar,**/lib/maven-aether-provider-*.jar,**/lib/maven-model-*.jar,**/lib/maven-model-builder-*.jar,**/lib/maven-repository-metadata-*.jar,**/lib/netty-*.jar,**/lib/org.apache.aries.blueprint*.jar,**/lib/plexus-classworlds-*.jar,**/lib/plexus-component-annotations-*.jar,**/lib/plexus-interpolation-*.jar,**/lib/plexus-utils-*.jar,**/lib/wagon-ahc-*.jar,**/lib/wagon-provider-api-*.jar,**/lib/xbean-reflect-*.jar,**/lib/hawtio-git-*.jar</packagingExcludes>
          <failOnMissingWebXml>false</failOnMissingWebXml>
        </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>
