<?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">
  <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.usc</groupId>
  <artifactId>usc-channel-impl</artifactId>
  <version>1.3.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 :: usc :: ${project.artifactId}</name>
  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>usc-channel-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.mdsal.model</groupId>
      <artifactId>ietf-inet-types-2013-07-15</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-handler</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcprov-jdk15on</artifactId>
    </dependency>
    <dependency>
      <groupId>com.typesafe.akka</groupId>
      <artifactId>akka-actor_${scala.version}</artifactId>
    </dependency>
    <dependency>
      <groupId>com.typesafe.akka</groupId>
      <artifactId>akka-cluster_${scala.version}</artifactId>
    </dependency>
    <dependency>
      <groupId>com.typesafe.akka</groupId>
      <artifactId>akka-remote_${scala.version}</artifactId>
    </dependency>
    <dependency>
      <groupId>com.typesafe.akka</groupId>
      <artifactId>akka-testkit_${scala.version}</artifactId>
    </dependency>
    <dependency>
      <groupId>com.typesafe.akka</groupId>
      <artifactId>akka-osgi_${scala.version}</artifactId>
    </dependency>
    <dependency>
      <groupId>com.typesafe.akka</groupId>
      <artifactId>akka-slf4j_${scala.version}</artifactId>
    </dependency>
    <dependency>
      <groupId>org.opendaylight.controller</groupId>
      <artifactId>sal-clustering-commons</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.jettison</groupId>
      <artifactId>jettison</artifactId>
    </dependency>
  </dependencies>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.version}</version>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
        	<groupId>org.eclipse.m2e</groupId>
        	<artifactId>lifecycle-mapping</artifactId>
        	<version>1.0.0</version>
        	<configuration>
        		<lifecycleMappingMetadata>
        			<pluginExecutions>
        				<pluginExecution>
        					<pluginExecutionFilter>
        						<groupId>org.jacoco</groupId>
        						<artifactId>
        							jacoco-maven-plugin
        						</artifactId>
        						<versionRange>
        							[0.7.2.201409121644,)
        						</versionRange>
        						<goals>
        							<goal>prepare-agent</goal>
        						</goals>
        					</pluginExecutionFilter>
        					<action>
        						<ignore/>
        					</action>
        				</pluginExecution>
        				<pluginExecution>
        					<pluginExecutionFilter>
        						<groupId>
        							org.opendaylight.yangtools
        						</groupId>
        						<artifactId>
        							yang-maven-plugin
        						</artifactId>
        						<versionRange>
        							[1.1.4-Carbon,)
        						</versionRange>
        						<goals>
        							<goal>generate-sources</goal>
        						</goals>
        					</pluginExecutionFilter>
        					<action>
        						<ignore/>
        					</action>
        				</pluginExecution>
        			</pluginExecutions>
        		</lifecycleMappingMetadata>
        	</configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
    </testResources>
    <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.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>
                <artifact>
                  <file>${project.build.directory}/classes/etc/usc/certificates/client.key.pem</file>
                  <type>pem</type>
                  <classifier>clientkey</classifier>
                </artifact>
                <artifact>
                  <file>${project.build.directory}/classes/etc/usc/certificates/client.pem</file>
                  <type>pem</type>
                  <classifier>client</classifier>
                </artifact>
                <artifact>
                  <file>${project.build.directory}/classes/etc/usc/certificates/rootCA.pem</file>
                  <type>pem</type>
                  <classifier>rootCA</classifier>
                </artifact>
                <artifact>
                  <file>${project.build.directory}/classes/etc/usc/usc.properties</file>
                  <type>properties</type>
                  <classifier>usc</classifier>
                </artifact>
                <artifact>
                  <file>${project.build.directory}/classes/etc/usc/akka.conf</file>
                  <type>conf</type>
                  <classifier>akka</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/usc.git</connection>
    <developerConnection>scm:git:ssh://git.opendaylight.org:29418/usc.git</developerConnection>
    <url>https://wiki.opendaylight.org/view/USC:Main</url>
    <tag>HEAD</tag>
  </scm>

  <!--
      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>
