<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright (c) 2020, 2022 Contributors to the Eclipse Foundation
   
    See the NOTICE file(s) distributed with this work for additional
    information regarding copyright ownership.
   
    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License 2.0 which is available at
    http://www.eclipse.org/legal/epl-2.0
   
    SPDX-License-Identifier: EPL-2.0
 -->
<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.eclipse.hono</groupId>
    <artifactId>hono-services</artifactId>
    <version>2.3.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>hono-service-device-registry-base</artifactId>
  <name>Hono Service Device Registry Base</name>
  <description>Base classes for implementing a Hono device registry.</description>
  <url>https://www.eclipse.org/hono</url>

  <properties>
    <docker.skip>true</docker.skip>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.eclipse.hono</groupId>
      <artifactId>hono-service-base</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.hono</groupId>
      <artifactId>hono-client-notification-kafka</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.hono</groupId>
      <artifactId>hono-client-notification-amqp</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.hono</groupId>
      <artifactId>hono-client-telemetry-amqp</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.hono</groupId>
      <artifactId>hono-client-telemetry-kafka</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-crypto</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.annotation</groupId>
      <artifactId>jakarta.annotation-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.hono</groupId>
      <artifactId>hono-client-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.hono</groupId>
      <artifactId>hono-client-telemetry</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>io.opentracing</groupId>
      <artifactId>opentracing-noop</artifactId>
    </dependency>
    <dependency>
      <groupId>io.smallrye.config</groupId>
      <artifactId>smallrye-config</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.bol</groupId>
      <artifactId>cryptvault</artifactId>
      <optional>true</optional>
    </dependency>

    <!-- testing -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-junit5</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcpkix-jdk18on</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!--
        Copy legal documents from "target/classes" folder to "target/test-classes" folder
        so that we make sure to include legal docs in test jar.
       -->
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy resources</id>
            <phase>process-resources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.outputDirectory}</outputDirectory>
              <resources>
                <resource>
                  <directory>${project.basedir}/src/main/resources</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
          <execution>
            <id>copy_legal_docs_for_test_jar</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.testOutputDirectory}/META-INF</outputDirectory>
              <resources>
                <resource>
                  <directory>${project.build.outputDirectory}/META-INF</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jboss.jandex</groupId>
        <artifactId>jandex-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>application.yml</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
