<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: -->
<!--
 Copyright (c) 2014 Cisco Systems, 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.odlparent</groupId>
        <artifactId>bundle-parent</artifactId>
        <version>14.3.6</version>
        <relativePath/>
    </parent>

    <groupId>org.opendaylight.yangtools</groupId>
    <artifactId>binding-bundle-parent</artifactId>
    <version>15.1.2</version>
    <packaging>pom</packaging>
    <name>${project.artifactId}</name>
    <description>Binding Bundle parent (felix-based)</description>

    <properties>
        <spotbugs.onlyAnalyze>!org.opendaylight.yang.gen.-,!org.opendaylight.yang.svc.-</spotbugs.onlyAnalyze>
        <!-- FIXME: fix these up and set maven.javadoc.failOnWarnings=true -->
        <doclint>all,-missing</doclint>

        <!--
            maven-javadoc-plugin override of https://github.com/apache/maven-javadoc-plugin/issues/1180:

            -J-Duser.language= breaks JVM's detection of sun.jnu.encoding, rendering it unable to find references
            to UTF-8-named classes.

            We achieve the same effect by explicitly setting locale to "en". We are fine as long as javadoc tool
            ends up using sun.jnu.encoding=utf8.
        -->
        <forceRootLocale>false</forceRootLocale>
        <locale>en</locale>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.opendaylight.yangtools</groupId>
                <artifactId>bnd-parent</artifactId>
                <version>15.1.2</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <!-- https://bugs.opendaylight.org/show_bug.cgi?id=6252 -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>${project.build.directory}/generated-sources/spi</directory>
            </resource>
            <resource>
                <directory>${project.build.directory}/generated-sources/yang</directory>
            </resource>
        </resources>
    </build>

    <profiles>
        <profile>
            <activation>
                <file>
                    <exists>src/main/yang</exists>
                </file>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.eclipse.jdt</groupId>
                    <artifactId>org.eclipse.jdt.annotation</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.opendaylight.yangtools</groupId>
                    <artifactId>binding-spec</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.opendaylight.yangtools</groupId>
                    <artifactId>yang-common</artifactId>
                </dependency>
            </dependencies>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.opendaylight.yangtools</groupId>
                            <artifactId>yang-maven-plugin</artifactId>
                            <version>15.1.2</version>
                            <dependencies>
                                <dependency>
                                    <groupId>org.opendaylight.yangtools</groupId>
                                    <artifactId>binding-codegen</artifactId>
                                    <version>15.1.2</version>
                                </dependency>
                            </dependencies>
                            <executions>
                                <execution>
                                    <id>binding</id>
                                    <goals>
                                        <goal>generate-sources</goal>
                                    </goals>
                                    <configuration>
                                        <inspectDependencies>true</inspectDependencies>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.opendaylight.yangtools</groupId>
                        <artifactId>yang-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <scm>
        <connection>scm:git:ssh://git.opendaylight.org:29418/yangtools.git</connection>
        <developerConnection>scm:git:ssh://git.opendaylight.org:29418/yangtools.git</developerConnection>
        <tag>HEAD</tag>
        <url>https://wiki.opendaylight.org/display/ODL/YANG+Tools</url>
    </scm>
</project>
