<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2015 Huawei, 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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.opendaylight.controller</groupId>
    <artifactId>config-parent</artifactId>
    <version>0.6.4-Carbon</version>
    <relativePath>../..//controller/opendaylight/config/config-parent</relativePath>
  </parent>

  <groupId>org.opendaylight.nemo</groupId>
  <artifactId>nemo-impl</artifactId>
  <version>1.2.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 :: nemo :: ${project.artifactId}</name>

  <properties>
    <sonar.jacoco.reportPath>target/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
    <sonar.jacoco.itReportPath>target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.opendaylight.mdsal.model</groupId>
      <artifactId>ietf-inet-types-2013-07-15</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.mdsal.model</groupId>
      <artifactId>ietf-yang-types-20130715</artifactId>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>nemo-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>net.sourceforge.collections</groupId>
      <artifactId>collections-generic</artifactId>
      <version>4.01</version>
    </dependency>
    <dependency>
      <groupId>net.sf.jung</groupId>
      <artifactId>jung-api</artifactId>
      <version>2.0.1</version>
    </dependency>
    <dependency>
      <groupId>net.sf.jung</groupId>
      <artifactId>jung-graph-impl</artifactId>
      <version>2.0.1</version>
    </dependency>
    <dependency>
      <groupId>net.sf.jung</groupId>
      <artifactId>jung-algorithms</artifactId>
      <version>2.0.1</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
        <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.opendaylight.yangtools</groupId>
        <artifactId>yang-maven-plugin</artifactId>
        <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>
              </codeGenerators>
              <inspectDependencies>true</inspectDependencies>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>maven-sal-api-gen-plugin</artifactId>
            <version>0.10.4-Carbon</version>
            <type>jar</type>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-ClassPath>.,{maven-dependencies}</Bundle-ClassPath>
            <Import-Package>*;resolution:=optional</Import-Package>
            <Embed-Dependency>
              collections-generic,jung-api,jung-graph-impl,jung-algorithms
            </Embed-Dependency>
            <Embed-Transitive>true</Embed-Transitive>
            <Embed-Directory>lib</Embed-Directory>
            <Embed-StripGroup>true</Embed-StripGroup>
            <_failok>true</_failok>
            <_nouses>true</_nouses>
          </instructions>
          <manifestLocation>${project.build.outputDirectory}/META-INF</manifestLocation>
        </configuration>
      </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/etc/opendaylight/karaf/config.xml</file>
                  <type>xml</type>
                  <classifier>config</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>pre-unit-test</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
            <configuration>
              <destFile>${sonar.jacoco.reportPath}</destFile>
            </configuration>
          </execution>
          <execution>
            <id>post-unit-test</id>
            <goals>
              <goal>report</goal>
            </goals>
            <configuration>
              <dataFile>${sonar.jacoco.reportPath}</dataFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <scm>
    <connection>scm:git:ssh://git.opendaylight.org:29418/nemo.git</connection>
    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/nemo.git</developerConnection>
    <url>https://wiki.opendaylight.org/view/NEMO:Main</url>
    <tag>HEAD</tag>
  </scm>
</project>
