<?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/xsd/maven-4.0.0.xsd">
  <parent>
    <groupId>org.opendaylight.odlparent</groupId>
    <artifactId>features-parent</artifactId>
    <version>1.8.4-Carbon</version>
    <relativePath>../..//odlparent/features-parent</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.opendaylight.lacp</groupId>
  <artifactId>features-lacp</artifactId>
  <packaging>jar</packaging>
  <name>${project.artifactId}</name>
  <version>1.3.4-Carbon</version>
  <description>Opendaylight Link Aggregation</description>
  <properties>
    <features.file>features.xml</features.file>
    <maven.test.skip>${skipTests}</maven.test.skip>
    <dluxapps.version>0.5.4-Carbon</dluxapps.version>
    <mdsal.version>1.5.4-Carbon</mdsal.version>
    <openflow.plugin.version>0.4.4-Carbon</openflow.plugin.version>
    <restconf.version>1.5.4-Carbon</restconf.version>
    <config.configfile.directory>etc/opendaylight/karaf</config.configfile.directory>
    <config.lacp.main.configfile>93-lacpmain.xml</config.lacp.main.configfile>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.opendaylight.openflowplugin</groupId>
      <artifactId>features-openflowplugin</artifactId>
      <version>${openflow.plugin.version}</version>
      <classifier>features</classifier>
      <type>xml</type>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.controller</groupId>
      <artifactId>features-mdsal</artifactId>
      <version>${mdsal.version}</version>
      <classifier>features</classifier>
      <type>xml</type>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.netconf</groupId>
      <artifactId>features-restconf</artifactId>
      <classifier>features</classifier>
      <version>${restconf.version}</version>
      <type>xml</type>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.dluxapps</groupId>
      <artifactId>features-dluxapps</artifactId>
      <version>${dluxapps.version}</version>
      <classifier>features</classifier>
      <type>xml</type>
    </dependency>
    <!-- bundles used by features directly -->
    <dependency>
      <groupId>org.opendaylight.lacp.main</groupId>
      <artifactId>lacpmain-model</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.lacp.main</groupId>
      <artifactId>lacp.main.impl</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.lacp.main</groupId>
      <artifactId>lacp.main.config</artifactId>
      <version>${project.version}</version>
      <type>xml</type>
      <classifier>config</classifier>
    </dependency>

    <!-- test to validate features.xml -->
    <dependency>
      <groupId>org.opendaylight.odlparent</groupId>
      <artifactId>features-test</artifactId>
      <version>1.8.4-Carbon</version>
    </dependency>
    <!-- dependency for opendaylight-karaf-empty for use by testing -->
    <dependency>
      <groupId>org.opendaylight.controller</groupId>
      <artifactId>opendaylight-karaf-empty</artifactId>
      <version>1.8.4-Carbon</version>
      <type>zip</type>
    </dependency>
  </dependencies>
  <build>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/features</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>filter</id>
            <goals>
              <goal>resources</goal>
            </goals>
            <phase>generate-resources</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-artifacts</id>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <phase>package</phase>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${project.build.directory}/classes/${features.file}</file>
                  <type>xml</type>
                  <classifier>features</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.16</version>
        <configuration>
          <systemPropertyVariables>
            <karaf.distro.groupId>org.opendaylight.controller</karaf.distro.groupId>
            <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
            <karaf.distro.version>1.8.4-Carbon</karaf.distro.version>
          </systemPropertyVariables>
          <dependenciesToScan>
           <dependency>org.opendaylight.odlparent:features-test</dependency>
          </dependenciesToScan>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
