<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2021 PANTHEON.tech, s.r.o. 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.gnmi</groupId>
        <artifactId>gnmi-parent</artifactId>
        <version>3.0.0</version>
        <relativePath>../../gnmi-parent/pom.xml</relativePath>
    </parent>

    <artifactId>gnmi-device-simulator</artifactId>
    <version>3.0.0</version>
    <name>${project.groupId}:${project.artifactId}</name>
    <url>https://lf-opendaylight.atlassian.net/wiki/spaces/ODL/pages/489062430/gNMI+project</url>

    <properties>
        <application.main.class>org.opendaylight.gnmi.simulatordevice.main.GnmiSimulatorApp</application.main.class>
        <slf4j.version>2.0.17</slf4j.version>
        <protobuf.version>3.25.8</protobuf.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.beust</groupId>
            <artifactId>jcommander</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
            <version>${protobuf.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java-util</artifactId>
            <version>${protobuf.version}</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-api</artifactId>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-netty</artifactId>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-stub</artifactId>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-common</artifactId>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-transport</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcpkix-jdk18on</artifactId>
            <version>${bouncycastle.version}</version>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk18on</artifactId>
            <version>${bouncycastle.version}</version>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bctls-jdk18on</artifactId>
            <version>${bouncycastle.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jdt</groupId>
            <artifactId>org.eclipse.jdt.annotation</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.gnmi</groupId>
            <artifactId>gnmi-commons</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.gnmi</groupId>
            <artifactId>gnmi-proto</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.gnmi</groupId>
            <artifactId>openconfig-models</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-common-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-dom-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-dom-inmemory-datastore</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.mdsal</groupId>
            <artifactId>mdsal-dom-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>binding-spec</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>concepts</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>openconfig-model-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>util</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yang-common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yang-data-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yang-data-util</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yang-model-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yang-model-ri</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yang-model-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yang-model-util</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yang-parser-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yang-parser-reactor</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yang-parser-rfc7950</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yang-parser-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yang-source-ir</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yang-xpath-impl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>yin-source-dom</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>binding-data-codec-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.opendaylight.yangtools</groupId>
            <artifactId>binding-data-codec-dynamic</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>odl-gnmi-simulator-app</id>
            <activation>
                <file>
                    <exists>src/main/java</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <configuration>
                            <archive>
                                <manifest>
                                    <mainClass>${application.main.class}</mainClass>
                                    <useUniqueVersions>false</useUniqueVersions>
                                    <classpathPrefix>lib/</classpathPrefix>
                                    <addClasspath>true</addClasspath>
                                </manifest>
                            </archive>
                            <excludes>
                                <exclude>/assembly/**</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-dependencies</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>copy-dependencies</goal>
                                </goals>
                                <configuration>
                                    <includeScope>runtime</includeScope>
                                    <outputDirectory>${project.build.directory}/lib</outputDirectory>
                                    <silent>true</silent>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Copy additional project-specific resources, typically json config files. -->
                    <plugin>
                        <artifactId>maven-resources-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-resources</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <resources>
                                        <resource>
                                            <directory>src/main/assembly/resources</directory>
                                            <filtering>false</filtering>
                                        </resource>
                                    </resources>
                                    <outputDirectory>${project.build.directory}/assembly/resources</outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
