<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (c) 2015 Ericsson, AB.  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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.opendaylight.topoprocessing</groupId>
    <artifactId>multitechnology-topology</artifactId>
    <version>0.4.2</version>
    <relativePath>../</relativePath>
  </parent>
  <artifactId>multitechnology-topology-model</artifactId>
  <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 :: topoprocessing :: ${project.artifactId}</name>
  <dependencies>
    <dependency>
      <groupId>org.opendaylight.mdsal</groupId>
      <artifactId>yang-binding</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.mdsal.model</groupId>
      <artifactId>ietf-topology</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.mdsal.model</groupId>
      <artifactId>ietf-ted</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.mdsal.model</groupId>
      <artifactId>yang-ext</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
            <Import-Package>org.opendaylight.yangtools.yang.binding.annotations, *</Import-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.opendaylight.yangtools</groupId>
        <artifactId>yang-maven-plugin</artifactId>
        <version>${yangtools.version}</version>
        <dependencies>
          <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>maven-sal-api-gen-plugin</artifactId>
            <version>${mdsal.model.version}</version>
            <type>jar</type>
          </dependency>
          <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>yang-binding</artifactId>
            <version>${mdsal.model.version}</version>
            <type>jar</type>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <goals>
              <goal>generate-sources</goal>
            </goals>
            <configuration>
              <yangFilesRootDir>src/main/yang</yangFilesRootDir>
              <codeGenerators>
                <generator>
                  <codeGeneratorClass>org.opendaylight.mdsal.binding.maven.api.gen.plugin.CodeGeneratorImpl</codeGeneratorClass>
                  <outputBaseDir>${salGeneratorPath}</outputBaseDir>
                </generator>
                <generator>
                  <codeGeneratorClass>org.opendaylight.mdsal.binding.yang.unified.doc.generator.maven.DocumentationGeneratorImpl</codeGeneratorClass>
                  <outputBaseDir>target/site/models</outputBaseDir>
                </generator>
                <generator>
                  <codeGeneratorClass>org.opendaylight.mdsal.binding.yang.wadl.generator.maven.WadlGenerator</codeGeneratorClass>
                  <outputBaseDir>target/site/models</outputBaseDir>
                </generator>
              </codeGenerators>
              <inspectDependencies>true</inspectDependencies>
            </configuration>
          </execution>
        </executions>

      </plugin>
    </plugins>
  </build>

  <!--
      Maven Site Configuration

      The following configuration is necessary for maven-site-plugin to
      correctly identify the correct deployment path for OpenDaylight Maven
      sites.
  -->
  <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>

  <distributionManagement>
    <site>
      <id>opendaylight-site</id>
      <url>${nexus.site.url}/${project.artifactId}/</url>
    </site>
  </distributionManagement>
</project>
