<?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.odlparent</groupId>
    <artifactId>odlparent</artifactId>
    <version>1.4.2-Helium</version>
    <relativePath></relativePath>
  </parent>

  <groupId>org.opendaylight.ovsdb</groupId>
  <artifactId>commons</artifactId>
  <name>OVSDB Parent POM</name>
  <version>1.2.0-Helium</version>
  <packaging>pom</packaging>
  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>

  <properties>
    <!-- ODL repository / plugin repository -->
    <nexusproxy>http://nexus.opendaylight.org/content</nexusproxy>
    <!-- Surefire/Failsafe Arguments -->
    <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
    <!-- OVSB Component Versions -->
    <ovsdb.library.version>1.0.0-Helium</ovsdb.library.version>
    <ovsdb.plugin.version>1.0.0-Helium</ovsdb.plugin.version>
    <plugin.shell.version>1.0.0-Helium</plugin.shell.version>
    <openstack.netvirt.version>1.0.0-Helium</openstack.netvirt.version>
    <openstack.netvirt.providers.version>1.0.0-Helium</openstack.netvirt.providers.version>
    <ovsdb.northbound.version>0.6.0-Helium</ovsdb.northbound.version>
    <schema.openvswitch.version>1.0.0-Helium</schema.openvswitch.version>
    <schema.hardwarevtep.version>1.0.0-Helium</schema.hardwarevtep.version>
    <ovsdb.ofextension.version>1.0.0-Helium</ovsdb.ofextension.version>
    <utils.mdsal.openflow>1.0.0-Helium</utils.mdsal.openflow>
    <ovsdb.ovssfc.version>0.0.1-Helium</ovsdb.ovssfc.version>
    <!-- Skip Coverage and IT by default -->
    <skip.coverage>true</skip.coverage>
    <skip.integrationtest>true</skip.integrationtest>
    <skip.karaf>false</skip.karaf>
    <skip.distribution>false</skip.distribution>
    <!-- The directory where maven was executed -->
    <root.directory>${env.PWD}</root.directory>
    <!-- UT reports are per-module -->
    <sonar.jacoco.reportPath>target/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
    <!-- IT report is aggregated to enable PAX Exam coverage to be logged -->
    <sonar.jacoco.itReportPath>${root.directory}/target/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
    <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
    <!-- Override the JaCoCo version in ODL Parent -->
    <jacoco.version>0.6.4.201312101107</jacoco.version>
    <!-- ODL Dependency Versions -->
    <containermanager.version>0.5.2-Helium</containermanager.version>
    <forwardingrulesmanager.version>0.6.0-Helium</forwardingrulesmanager.version>
    <networkconfig.neutron.version>0.4.2-Helium</networkconfig.neutron.version>
    <clustering.services.version>0.5.1-Helium</clustering.services.version>
    <sal.version>0.8.1-Helium</sal.version>
    <sal.connection.version>0.1.2-Helium</sal.connection.version>
    <sal.networkconfiguration.version>0.0.3-Helium</sal.networkconfiguration.version>
    <mdsal.version>1.1-Helium</mdsal.version>
    <openflowplugin.version>0.0.3-Helium</openflowplugin.version>
    <openflowplugin-nicira.version>0.0.3-Helium</openflowplugin-nicira.version>
    <openflowplugin-extension.version>0.0.3-Helium</openflowplugin-extension.version>
    <openflowjava-nicira.version>0.0.3-Helium</openflowjava-nicira.version>
    <openflowjava-extension.version>0.0.3-Helium</openflowjava-extension.version>
    <openflowjava.version>0.5-Helium</openflowjava.version>
    <controller.config.version>0.2.5-Helium</controller.config.version>
    <switchmanager.api.version>0.7.1-Helium</switchmanager.api.version>
    <yangtools.version>0.6.2-Helium</yangtools.version>
    <northbound.commons.version>0.4.2-Helium</northbound.commons.version>
    <checkstyle.rules.version>0.0.3-Helium</checkstyle.rules.version>
    <!-- 3rd Pary Dependency Versions -->
    <commons.collection.version>1.0</commons.collection.version>
    <portlet.version>2.0</portlet.version>
    <powermock.version>1.5.2</powermock.version>
    <httpcomponents.version>4.2.1</httpcomponents.version>
    <karaf.shell.version>3.0.0</karaf.shell.version>
    <odl.karaf.base.version>1.4.2-Helium</odl.karaf.base.version>
    <nsf.version>0.4.2-Helium</nsf.version>
    <sfc-model.version>0.0.1-Helium</sfc-model.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>${commons.collection.version}</version>
      </dependency>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-all</artifactId>
        <version>${netty.version}</version>
      </dependency>
      <dependency>
        <groupId>javax.portlet</groupId>
        <artifactId>portlet-api</artifactId>
        <version>${portlet.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore-nio</artifactId>
        <version>${httpcomponents.version}</version>
      </dependency>
      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-module-junit4</artifactId>
        <version>${powermock.version}</version>
      </dependency>
      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-api-mockito</artifactId>
        <version>${powermock.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>clustering.services</artifactId>
        <version>${clustering.services.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>sal</artifactId>
        <version>${sal.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>sal.connection</artifactId>
        <version>${sal.connection.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>sal.networkconfiguration</artifactId>
        <version>${sal.networkconfiguration.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>containermanager</artifactId>
        <version>${containermanager.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>forwardingrulesmanager</artifactId>
        <version>${forwardingrulesmanager.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>networkconfig.neutron</artifactId>
        <version>${networkconfig.neutron.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>sal-binding-api</artifactId>
        <version>${mdsal.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>sal-common-util</artifactId>
        <version>${mdsal.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>switchmanager</artifactId>
        <version>${switchmanager.api.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller.model</groupId>
        <artifactId>model-flow-base</artifactId>
        <version>${mdsal.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller.model</groupId>
        <artifactId>model-flow-statistics</artifactId>
        <version>${mdsal.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller.model</groupId>
        <artifactId>model-flow-service</artifactId>
        <version>${mdsal.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller.model</groupId>
        <artifactId>model-inventory</artifactId>
        <version>${mdsal.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.yangtools</groupId>
        <artifactId>yang-binding</artifactId>
        <version>${yangtools.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.yangtools</groupId>
        <artifactId>features-test</artifactId>
        <version>${yangtools.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>opendaylight-karaf-empty</artifactId>
        <version>1.4.2-Helium</version>
        <type>zip</type>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.controller</groupId>
        <artifactId>commons.northbound</artifactId>
        <version>${northbound.commons.version}</version>
      </dependency>
      <dependency>
          <groupId>org.opendaylight.controller</groupId>
          <artifactId>config-api</artifactId>
          <version>${controller.config.version}</version>
      </dependency>
      <dependency>
          <groupId>org.opendaylight.openflowjava</groupId>
          <artifactId>openflow-protocol-api</artifactId>
          <version>${openflowjava.version}</version>
      </dependency>
      <dependency>
          <groupId>org.opendaylight.openflowjava</groupId>
          <artifactId>openflow-protocol-spi</artifactId>
          <version>${openflowjava.version}</version>
      </dependency>
        <dependency>
            <groupId>org.opendaylight.openflowjava</groupId>
            <artifactId>openflow-protocol-impl</artifactId>
            <version>${openflowjava.version}</version>
        </dependency>
      <dependency>
          <groupId>org.opendaylight.openflowjava</groupId>
          <artifactId>util</artifactId>
          <version>${openflowjava.version}</version>
      </dependency>
      <dependency>
          <groupId>org.opendaylight.openflowplugin</groupId>
          <artifactId>openflowjava-extension-nicira-api</artifactId>
          <version>${openflowjava-nicira.version}</version>
      </dependency>
      <dependency>
          <groupId>org.opendaylight.openflowplugin</groupId>
          <artifactId>openflowjava-extension-nicira</artifactId>
          <version>${openflowjava-nicira.version}</version>
      </dependency>
      <dependency>
          <groupId>org.opendaylight.openflowplugin</groupId>
          <artifactId>openflowplugin-extension-api</artifactId>
          <version>${openflowplugin-extension.version}</version>
      </dependency>
      <dependency>
          <groupId>org.opendaylight.openflowplugin</groupId>
          <artifactId>openflowplugin-extension-nicira</artifactId>
          <version>${openflowplugin-nicira.version}</version>
      </dependency>
      <dependency>
          <groupId>org.opendaylight.openflowplugin</groupId>
          <artifactId>openflowplugin</artifactId>
          <version>${openflowplugin.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.ovsdb</groupId>
        <artifactId>library</artifactId>
        <version>${ovsdb.library.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.ovsdb</groupId>
        <artifactId>plugin</artifactId>
        <version>${ovsdb.plugin.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.ovsdb</groupId>
        <artifactId>plugin-shell</artifactId>
        <version>${plugin.shell.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.ovsdb</groupId>
        <artifactId>ovssfc</artifactId>
        <version>${ovsdb.ovssfc.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.ovsdb</groupId>
        <artifactId>openstack.net-virt</artifactId>
        <version>${openstack.netvirt.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.ovsdb</groupId>
        <artifactId>openstack.net-virt-providers</artifactId>
        <version>${openstack.netvirt.providers.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.ovsdb</groupId>
        <artifactId>northbound</artifactId>
        <version>${ovsdb.northbound.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.ovsdb</groupId>
        <artifactId>schema.hardwarevtep</artifactId>
        <version>${schema.hardwarevtep.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.ovsdb</groupId>
        <artifactId>schema.openvswitch</artifactId>
        <version>${schema.openvswitch.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.ovsdb</groupId>
        <artifactId>plugin-mdsal-adapter</artifactId>
        <version>${ovsdb.plugin.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.ovsdb</groupId>
        <artifactId>of-extension.nx-ofjava</artifactId>
        <version>${ovsdb.ofextension.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.ovsdb</groupId>
        <artifactId>of-extension.nx-sal</artifactId>
        <version>${ovsdb.ofextension.version}</version>
      </dependency>
      <dependency>
        <groupId>org.opendaylight.sfc</groupId>
        <artifactId>sfc-model</artifactId>
        <version>${sfc-model.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <source>${java.version.source}</source>
            <target>${java.version.target}</target>
            <testSource>${java.version.source}</testSource>
            <testTarget>${java.version.target}</testTarget>
          </configuration>
        </plugin>
        <!-- This configuration should move to ODL-Parent -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${checkstyle.version}</version>
          <configuration>
            <failsOnError>true</failsOnError>
            <configLocation>controller/checkstyle.xml</configLocation>
            <consoleOutput>true</consoleOutput>
            <includeTestSourceDirectory>true</includeTestSourceDirectory>
            <sourceDirectory>${project.basedir}</sourceDirectory>
            <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat</includes>
            <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,\/</excludes>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.opendaylight.controller</groupId>
              <artifactId>checkstyle</artifactId>
              <version>0.0.3-Helium</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>check</id>
              <goals>
                <goal>check</goal>
              </goals>
              <phase>process-sources</phase>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.version}</version>
          <configuration>
            <skip>${skip.coverage}</skip>
          </configuration>
          <executions>
            <execution>
              <id>pre-unit-test</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
              <configuration>
                <destFile>${sonar.jacoco.reportPath}</destFile>
              </configuration>
            </execution>
            <execution>
              <id>pre-integration-test</id>
              <goals>
                <goal>prepare-agent-integration</goal>
              </goals>
              <configuration>
                <destFile>${sonar.jacoco.itReportPath}</destFile>
                <append>true</append>
                <skip>${skip.integrationtest}</skip>
              </configuration>
            </execution>
            <execution>
              <id>post-unit-test</id>
              <goals>
                <goal>report</goal>
              </goals>
              <configuration>
                <dataFile>${sonar.jacoco.reportPath}</dataFile>
              </configuration>
            </execution>
            <execution>
              <id>post-integration-test</id>
              <goals>
                <goal>report-integration</goal>
              </goals>
              <configuration>
                <dataFile>${sonar.jacoco.itReportPath}</dataFile>
                <skip>${skip.integrationtest}</skip>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven.surefire.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${failsafe.version}</version>
          <executions>
            <execution>
              <id>failsafe-integration-tests</id>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
              <configuration>
                <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
                <skipTests>${skip.integrationtest}</skipTests>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.opendaylight.yangtools</groupId>
          <artifactId>yang-maven-plugin</artifactId>
          <version>${yangtools.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>generate-sources</goal>
              </goals>
              <configuration>
                <!-- directory containing yang files to parse and generate code -->
                <yangFilesRootDir>src/main/yang</yangFilesRootDir>
                <codeGenerators>
                  <generator>
                    <codeGeneratorClass>
                      org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
                    </codeGeneratorClass>
                    <!-- directory into which generated files will be placed -->
                    <outputBaseDir>
                      target/generated-sources/sal
                    </outputBaseDir>
                  </generator>
                </codeGenerators>
                <inspectDependencies>true</inspectDependencies>
              </configuration>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>org.opendaylight.yangtools</groupId>
              <artifactId>maven-sal-api-gen-plugin</artifactId>
              <version>${yangtools.version}</version>
              <type>jar</type>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.7</version>
          <executions>
            <execution>
              <phase>generate-sources</phase>
              <goals>
                <goal>add-source</goal>
              </goals>
              <configuration>
                <sources>
                  <source>target/generated-sources/sal</source>
                </sources>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
  <scm>
    <connection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</connection>
    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/ovsdb.git</developerConnection>
    <tag>HEAD</tag>
    <url>https://wiki.opendaylight.org/view/OVSDB_Integration:Main</url>
  </scm>

  <repositories>
    <!-- Opendaylight public group -->
    <repository>
      <id>opendaylight-public</id>
      <name>opendaylight-public</name>
      <url>${nexusproxy}/groups/public/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
    </repository>
    <!-- OpenDayLight Released artifact -->
    <repository>
      <id>opendaylight-release</id>
      <name>opendaylight-release</name>
      <url>http://nexus.opendaylight.org/content/repositories/opendaylight.release/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
      </releases>
    </repository>
    <!-- OpenDayLight Snapshot artifact -->
    <repository>
      <id>opendaylight-snapshot</id>
      <name>opendaylight-snapshot</name>
      <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </repository>
  </repositories>

  <pluginRepositories>
    <!-- Opendaylight public group -->
    <pluginRepository>
      <id>opendaylight-public</id>
      <name>opendaylight-public</name>
      <url>${nexusproxy}/groups/public/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
    </pluginRepository>
    <!-- OpenDayLight Released artifact -->
    <pluginRepository>
      <id>opendaylight-release</id>
      <name>opendaylight-release</name>
      <url>http://nexus.opendaylight.org/content/repositories/opendaylight.release/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
      </releases>
    </pluginRepository>
    <!-- OpenDayLight Snapshot artifact -->
    <pluginRepository>
      <id>opendaylight-snapshot</id>
      <name>opendaylight-snapshot</name>
      <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </pluginRepository>
  </pluginRepositories>

  <profiles>
    <profile>
      <id>integrationtest</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <properties>
        <skip.integrationtest>false</skip.integrationtest>
      </properties>
    </profile>
    <profile>
      <id>coverage</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <properties>
        <skip.coverage>false</skip.coverage>
      </properties>
    </profile>
    <profile>
      <id>jenkins</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <properties>
        <skip.distribution>true</skip.distribution>
        <root.directory>${env.WORKSPACE}</root.directory>
      </properties>
    </profile>
    <profile>
      <id>karaf</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <properties>
        <skip.karaf>false</skip.karaf>
      </properties>
    </profile>
  </profiles>
</project>
