<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2014-2015 Red Hat, Inc. and/or its affiliates
    and other contributors as indicated by the @author tags.

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

  <parent>
    <artifactId>hawkular-metrics-parent</artifactId>
    <groupId>org.hawkular.metrics</groupId>
    <version>0.7.0.Final</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>

  <artifactId>hawkular-metrics-api-jaxrs-1.1</artifactId>
  <packaging>war</packaging>

  <name>Hawkular Metrics JAX-RS 1.1 API</name>
  <description>JAX-RS 1.1 REST API Implementation</description>

  <properties>
    <enforcer.skip>true</enforcer.skip>

    <version.container.bom>6.4.0.Beta1</version.container.bom>
    <version.org.jboss.as.plugins.jboss-as-maven-plugin>7.7.Final</version.org.jboss.as.plugins.jboss-as-maven-plugin>
    <version.org.jboss.as.container>7.5.0.Final-redhat-15</version.org.jboss.as.container>
  </properties>

  <repositories>
    <repository>
      <id>eap_6_early_access</id>
      <url>https://maven.repository.redhat.com/earlyaccess/all/</url>
    </repository>
  </repositories>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.jboss.bom.eap</groupId>
        <artifactId>jboss-javaee-6.0-with-resteasy</artifactId>
        <version>${version.container.bom}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>

    <dependency>
      <groupId>org.hawkular.metrics</groupId>
      <artifactId>hawkular-metrics-api-common</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- AS7 provided -->
    <!-- Set the jboss-logging scope here since EAP6.4 BOM does not include jboss-logging -->
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging</artifactId>
      <!--
      This version is "almost" compatible with the version included in EAP6.4:
      we can't use logger methods with primitive arguments
      -->
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jaxrs</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-jackson-provider</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.servlet</groupId>
      <artifactId>jboss-servlet-api_3.0_spec</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.enterprise</groupId>
      <artifactId>cdi-api</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <finalName>hawkular-metrics-api-rest-1.1</finalName>
    <plugins>
      <plugin>
        <groupId>org.jboss.as.plugins</groupId>
        <artifactId>jboss-as-maven-plugin</artifactId>
        <version>${version.org.jboss.as.plugins.jboss-as-maven-plugin}</version>
        <configuration>
          <version>${version.org.jboss.as.container}</version>
          <port>${jboss-as.management.port}</port>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
          <webResources>
            <resource>
              <filtering>false</filtering>
              <directory>${basedir}/src/main/webapp</directory>
              <excludes>
                <exclude>WEB-INF/web.xml</exclude>
                <exclude>index.html</exclude>
              </excludes>
            </resource>
            <resource>
              <filtering>true</filtering>
              <directory>${basedir}/src/main/webapp</directory>
              <includes>
                <include>WEB-INF/web.xml</include>
                <include>index.html</include>
              </includes>
            </resource>
          </webResources>
        </configuration>
      </plugin>

    </plugins>
  </build>
</project>
