<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>hu.blackbelt.mapper</groupId>
    <artifactId>mapper-parent</artifactId>
    <version>1.0.3</version>
  </parent>
  <groupId>hu.blackbelt.mapper</groupId>
  <artifactId>kar</artifactId>
  <version>1.0.3</version>
  <packaging>kar</packaging>
  <name>Mapper Karaf KAR assembly</name>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>features</artifactId>
      <version>${project.version}</version>
      <type>xml</type>
      <classifier>features</classifier>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-feature</id>
            <phase>process-resources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>features</artifactId>
                  <classifier>features</classifier>
                  <type>xml</type>
                  <version>${project.version}</version>
                  <overWrite>false</overWrite>
                  <outputDirectory>${project.build.directory}/unpacked-feature</outputDirectory>
                  <destFileName>feature.xml</destFileName>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.karaf.tooling</groupId>
        <artifactId>karaf-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <featuresFile>${project.build.directory}/unpacked-feature/feature.xml</featuresFile>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
