<?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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.opendaylight.mdsal</groupId>
    <artifactId>binding-parent</artifactId>
    <version>0.13.3</version>
    <relativePath>..//mdsal/binding/binding-parent</relativePath>
  </parent>

  <groupId>org.opendaylight.sfc</groupId>
  <artifactId>sfc-parent</artifactId>
  <version>0.8.3</version>
  <name>sfc</name> <!-- Used by Sonar to set project name -->
  <packaging>pom</packaging>

  <!-- The following sections are for compatibility with Maven Central -->
  <description>Open Daylight SDN controller Service Function Chaining application</description>
  <url>https://wiki.opendaylight.org/view/Service_Function_Chaining:Main</url>
  <licenses>
    <license>
      <name>Eclipse Public License v1.0</name>
      <url>http://www.eclipse.org/legal/epl-v10.html</url>
    </license>
  </licenses>

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

  <modules>
    <module>artifacts</module>
    <module>sfc-model</module>
    <module>sfc-provider</module>
    <module>sfc-sb-rest</module>
    <module>sfclisp</module>
    <module>sfc-util</module>
    <module>sfc-classifiers</module>
    <module>sfc-ovs</module>
    <module>sfc-netconf</module>
    <module>sfc-vnfm-spi</module>
    <module>sfc-vnfm-tacker</module>
    <module>sfc-pot</module>
    <module>features</module>
    <module>sfc-statistics</module>
    <module>sfc-renderers</module>
    <module>sfc-genius</module>
    <module>sfc-shell</module>
  </modules>

  <profiles>
    <profile>
      <id>karaf</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>

      <modules>
        <module>karaf</module>
      </modules>
    </profile>
  </profiles>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- Build Plugin Versions -->
    <karaf.maven.version>3.0.1</karaf.maven.version>

    <config.version>0.9.3</config.version>
    <mdsal.version>1.8.3</mdsal.version>
    <netconf.parent.version>1.5.3</netconf.parent.version>
    <restconf.version>1.8.3</restconf.version>
    <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
    <mdsal.model.version>0.13.3</mdsal.model.version>
    <lispflowmapping.version>1.8.3</lispflowmapping.version>
    <ovsdb.southbound.version>1.7.3</ovsdb.southbound.version>
    <l2switch.version>0.8.3</l2switch.version>
    <genius.version>0.5.3</genius.version>
    <serviceutils.version>0.2.3</serviceutils.version>
    <infrautils.version>1.4.3</infrautils.version>

    <!-- Supporting Libraries -->
    <feature.openflowplugin.version>0.7.3</feature.openflowplugin.version>
    <openflowplugin.version>0.7.3</openflowplugin.version>

    <branding.version>1.7.3</branding.version>
    <pax.logging.service.version>1.8.2</pax.logging.service.version>
    <pax.logging.api.version>1.8.2</pax.logging.api.version>

    <!-- Test Libraries -->
    <junitparams.version>1.0.3</junitparams.version>
    <javafasterxml.version>3.1.5</javafasterxml.version>
  </properties>

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

      <dependency>
        <groupId>org.opendaylight.mdsal</groupId>
        <artifactId>mdsal-artifacts</artifactId>
        <version>2.5.3</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.mdsal.model</groupId>
        <artifactId>mdsal-model-artifacts</artifactId>
        <version>${mdsal.model.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- Controller infrastructure -->
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>mdsal-artifacts</artifactId>
        <version>${mdsal.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.netconf</groupId>
        <artifactId>restconf-artifacts</artifactId>
        <version>${restconf.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.netconf</groupId>
        <artifactId>netconf-artifacts</artifactId>
        <version>${netconf.parent.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.ovsdb</groupId>
        <artifactId>southbound-api</artifactId>
        <version>${ovsdb.southbound.version}</version>
      </dependency>

      <!-- Genius -->
      <dependency>
        <groupId>org.opendaylight.genius</groupId>
        <artifactId>mdsalutil-api</artifactId>
        <version>${genius.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.genius</groupId>
        <artifactId>interfacemanager-api</artifactId>
        <version>${genius.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.genius</groupId>
        <artifactId>itm-api</artifactId>
        <version>${genius.version}</version>
      </dependency>

      <!-- Service Utils -->
      <dependency>
        <groupId>org.opendaylight.serviceutils</groupId>
        <artifactId>serviceutils-artifacts</artifactId>
        <version>${serviceutils.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>

      <!-- Others -->
      <dependency>
        <groupId>org.ops4j.pax.cdi</groupId>
        <artifactId>pax-cdi-api</artifactId>
        <optional>true</optional>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <distributionManagement>
     <!-- OpenDayLight Released artifact -->
    <repository>
      <id>opendaylight-release</id>
      <url>${nexusproxy}/repositories/opendaylight.release</url>
    </repository>

    <!-- OpenDayLight Snapshot artifact -->
    <snapshotRepository>
      <id>opendaylight-snapshot</id>
      <url>${nexusproxy}/repositories/opendaylight.snapshot</url>
    </snapshotRepository>
  </distributionManagement>

  <dependencies>
    <dependency>
      <groupId>javax.inject</groupId>
      <artifactId>javax.inject</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <configuration>
          <failOnError>true</failOnError>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <configuration>
            <filesets>
              <fileset>
                <directory>${salGeneratorPath}</directory>
                <includes>
                  <include>**</include>
                </includes>
              </fileset>
            </filesets>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.8</version>
          <executions>
            <execution>
              <id>add-source</id>
              <phase>generate-sources</phase>
              <goals>
                <goal>add-source</goal>
              </goals>
              <configuration>
                <sources>
                  <source>${salGeneratorPath}</source>
                </sources>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <extensions>true</extensions>
          <configuration>
            <instructions>
              <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
            </instructions>
            <manifestLocation>${project.build.directory}/META-INF</manifestLocation>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>
