<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: -->
<!--
 Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.

 This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<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.controller</groupId>
        <artifactId>config-parent</artifactId>
        <version>0.6.4-Carbon</version>
        <relativePath>../../..//controller/opendaylight/config/config-parent</relativePath>
    </parent>

  <modelVersion>4.0.0</modelVersion>
  <groupId>org.opendaylight.honeycomb.vbd</groupId>
  <artifactId>vbd-impl</artifactId>
  <version>1.1.4-Carbon</version>
  <packaging>bundle</packaging>
  <!-- <name> formatting is used by autorelease to parse and notify projects on
       build failure. Please do not modify this unless you have a good reason. -->
  <name>ODL :: vbd :: ${project.artifactId}</name>

  <properties>
    <config.file>src/main/config/vbd.xml</config.file>
    <netconf.version>1.2.4-Carbon</netconf.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.opendaylight.netconf</groupId>
        <artifactId>netconf-artifacts</artifactId>
        <version>${netconf.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>vbd-artifacts</artifactId>
        <version>1.1.4-Carbon</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>vbd-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.netconf</groupId>
      <artifactId>sal-netconf-connector</artifactId>
    </dependency>

  <dependency>
      <groupId>org.opendaylight.mdsal</groupId>
      <artifactId>mdsal-singleton-common-api</artifactId>
      <version>2.2.4-Carbon</version>
  </dependency>

    <!-- Testing Dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>


    <!--TODO: remove direct calling of builder-helper-maven-plugin. should be supported via profile in parent-->
    <build>
        <plugins>
            <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/config/vbd.xml</file>
                                    <type>xml</type>
                                    <classifier>config</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Export-Package>
                            org.opendaylight.vbd.impl.*
                        </Export-Package>
                        <Import-package>
                            *
                        </Import-package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-artifacts</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>${project.build.directory}/classes/startup.cfg</file>
                                    <type>cfg</type>
                                    <classifier>config</classifier>
                                </artifact>
                                <artifacts>
                                    <file>${project.build.directory}/classes/config/vbd.xml</file>
                                    <type>xml</type>
                                    <classifier>config</classifier>
                                </artifacts>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
