<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (c) 2021 PANTHEON.tech  s.r.o. 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 https://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>io.lighty.core</groupId>
        <artifactId>lighty-parent</artifactId>
        <version>15.1.0</version>
        <relativePath>../lighty-parent</relativePath>
    </parent>

    <!--
        This is a parent suitable for packaging Yang models with their Java v1 bindings.
        The binding-parent from ODL activates too many unimportant plugins.
    -->
    <groupId>io.lighty.core</groupId>
    <artifactId>lighty-binding-parent</artifactId>
    <packaging>pom</packaging>
    <name>${project.groupId}:${project.artifactId}</name>
    <url>https://github.com/PANTHEONtech/lighty</url>

    <properties>
        <salGeneratorPath>target/generated-sources/mdsal-binding</salGeneratorPath>
        <yangFilesPath>src/main/yang</yangFilesPath>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>yang-binding</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-annotations</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jdt</groupId>
            <artifactId>org.eclipse.jdt.annotation</artifactId>
            <optional>true</optional>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Yangtools, generate yang -->
            <plugin>
                <groupId>org.opendaylight.yangtools</groupId>
                <artifactId>yang-maven-plugin</artifactId>
                <version>7.0.9</version>
                <dependencies>
                    <dependency>
                        <groupId>org.opendaylight.mdsal</groupId>
                        <artifactId>mdsal-binding-java-api-generator</artifactId>
                        <version>8.0.7</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>binding</id>
                        <goals>
                            <goal>generate-sources</goal>
                        </goals>
                        <configuration>
                            <inspectDependencies>true</inspectDependencies>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
