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

    Copyright 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>
    <groupId>org.hawkular.agent</groupId>
    <artifactId>hawkular-wildfly-agent-parent</artifactId>
    <version>0.13.2.Final</version>
  </parent>

  <artifactId>hawkular-wildfly-agent-feature-pack</artifactId>
  <packaging>pom</packaging>

  <name>Hawkular Agent: WildFly Agent Subsystem Feature Pack</name>
  <description>A feature pack to be able to deploy a Hawkular WildFly Agent in a WildFly server.</description>

  <properties>
    <version.org.wildfly.build>1.1.0.CR1</version.org.wildfly.build>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.hawkular.agent</groupId>
      <artifactId>hawkular-wildfly-agent</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- feature pack dependencies -->

    <dependency>
      <groupId>org.wildfly</groupId>
      <artifactId>wildfly-feature-pack</artifactId>
      <version>${version.org.wildfly}</version>
      <type>zip</type>
      <exclusions>
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.wildfly.build</groupId>
        <artifactId>wildfly-feature-pack-build-maven-plugin</artifactId>
        <version>${version.org.wildfly.build}</version>
        <executions>
          <execution>
            <id>feature-pack-build</id>
            <phase>compile</phase>
            <goals>
              <goal>build</goal>
            </goals>
            <configuration>
              <config-file>feature-pack-build.xml</config-file>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>assemble</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>assembly.xml</descriptor>
              </descriptors>
              <finalName>${project.build.finalName}</finalName>
              <appendAssemblyId>false</appendAssemblyId>
              <outputDirectory>${project.build.directory}</outputDirectory>
              <workDirectory>${project.build.directory}/assembly/work</workDirectory>
              <tarLongFileMode>gnu</tarLongFileMode>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
