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

    <prerequisites>
        <maven>3.0.4</maven>
    </prerequisites>

    <parent>
        <groupId>org.opendaylight.odlparent</groupId>
        <artifactId>odlparent</artifactId>
        <version>1.5.0-Lithium</version>
        <relativePath>../odlparent/odlparent</relativePath>
    </parent>

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

    <!-- The following sections are for compatability 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>

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

        <!-- Java Versions -->
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>

        <!-- Build Plugin Versions -->
        <maven.resources.version>2.6</maven.resources.version>
        <maven.helper.version>1.8</maven.helper.version>
        <maven.dependency.version>2.6</maven.dependency.version>
        <maven.exec.version>1.3.2</maven.exec.version>
        <karaf.maven.version>3.0.1</karaf.maven.version>

        <ietf.model.version>2010.09.24.7-Lithium</ietf.model.version>
        <ietf.yang.types.version>2013.07.15.7-Lithium</ietf.yang.types.version>
        <ietf.topology.version>2013.10.21.7-Lithium</ietf.topology.version>
        <yang.ext.version>2013.09.07.7-Lithium</yang.ext.version>
        <config.version>0.3.0-Lithium</config.version>
        <mdsal.version>1.2.0-Lithium</mdsal.version>
        <controller.model.version>1.2.0-Lithium</controller.model.version>
        <build.helper.version>1.8</build.helper.version>
        <netconf.parent.version>0.3.0-Lithium</netconf.parent.version>
        <config.parent.version>0.3.0-Lithium</config.parent.version>
        <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>
        <salGeneratorPath>src/main/yang-gen-sal</salGeneratorPath>
        <config.version>0.3.0-Lithium</config.version>

        <yangtools.version>0.7.0-Lithium</yangtools.version>
        <yangtools.binding.version>0.7.0-Lithium</yangtools.binding.version>

        <lispflowmapping.version>1.2.0-Lithium</lispflowmapping.version>
        <ovsdb.southbound.version>1.1.0-Lithium</ovsdb.southbound.version>

        <!-- Supporting Libraries -->
        <feature.openflowplugin.version>0.1.0-Lithium</feature.openflowplugin.version>

        <branding.version>1.1.0-Lithium</branding.version>
        <karaf.resources.version>1.5.0-Lithium</karaf.resources.version>
        <feature.test.version>1.5.0-Lithium</feature.test.version>
        <karaf.empty.version>1.5.0-Lithium</karaf.empty.version>
        <pax.logging.service.version>1.8.2</pax.logging.service.version>
        <pax.logging.api.version>1.8.2</pax.logging.api.version>
        <!--<webconsole.version>3.0.1</webconsole.version>-->

        <!-- Test Libraries -->
        <powermock.version>1.5.6</powermock.version>
    </properties>

    <distributionManagement>
        <!-- OpenDayLight Released artifact -->
        <repository>
            <id>opendaylight-release</id>
            <url>http://nexus.opendaylight.org/content/repositories/opendaylight.release</url>
        </repository>
        <!-- OpenDayLight Snapshot artifact -->
        <snapshotRepository>
            <id>opendaylight-snapshot</id>
            <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot</url>
        </snapshotRepository>
        <!-- Site deployment -->
        <!-- site>
             <id>website</id>
             <url>${sitedeploy}</url>
             </site -->
    </distributionManagement>

    <modules>
        <module>sfc-model</module>
        <module>sfc-provider</module>
        <module>sfc-test-consumer</module>
        <module>sfc-ui</module>
        <module>sfc-sb-rest</module>
        <module>sfclisp</module>
        <module>sfcofl2</module>
        <module>sfc-ovs</module>
        <module>sfc-netconf</module>
        <module>sfc-config</module>
        <module>sfc-jsonconfig</module>
        <module>features-sfc-sb-rest</module>
        <module>features-sfclisp</module>
        <module>features-sfcofl2</module>
        <module>features-sfc-ovs</module>
        <module>features-sfc-netconf</module>
        <module>features</module>
        <module>sfc-karaf</module>
    </modules>

    <dependencies>
        <!-- Sonar -->
        <dependency>
            <groupId>org.codehaus.sonar-plugins.java</groupId>
            <artifactId>sonar-jacoco-listeners</artifactId>
            <version>${sonar-jacoco-listeners.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>prepare-ut-agent</id>
                        <phase>process-test-classes</phase>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            <destFile>${sonar.jacoco.reportPath}</destFile>
                        </configuration>
                    </execution>
                    <execution>
                        <id>prepare-it-agent</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            <destFile>${sonar.jacoco.itReportPath}</destFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${enforcer.version}</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.1.1</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${compiler.version}</version>
                    <configuration>
                        <source>1.7</source>
                        <target>1.7</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.ops4j.pax.exam</groupId>
                    <artifactId>maven-paxexam-plugin</artifactId>
                    <version>${paxexam.plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <configuration>
                        <filesets>
                            <fileset>
                                <directory>${jmxGeneratorPath}</directory>
                                <includes>
                                    <include>**</include>
                                </includes>
                            </fileset>
                            <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>${build.helper.version}</version>
                    <executions>
                        <execution>
                            <id>add-source</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>add-source</goal>
                            </goals>
                            <configuration>
                                <sources>
                                    <source>${jmxGeneratorPath}</source>
                                    <source>${salGeneratorPath}</source>
                                </sources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.opendaylight.yangtools</groupId>
                    <artifactId>yang-maven-plugin</artifactId>
                    <version>0.7.0-Lithium</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${maven.bundle.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <instructions>
                            <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
                        </instructions>
                        <manifestLocation>${project.build.directory}/META-INF</manifestLocation>
                    </configuration>
                </plugin>
                <plugin>
                   <groupId>org.jacoco</groupId>
                   <artifactId>jacoco-maven-plugin</artifactId>
                   <version>${jacoco.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
