<?xml version="1.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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>io.apicurio</groupId>
        <artifactId>apicurio-registry</artifactId>
        <version>2.6.12.redhat-00001</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>apicurio-registry-protobuf-schema-utilities</artifactId>
    <packaging>jar</packaging>
    <name>apicurio-registry-protobuf-schema-utilities</name>
    <properties>
    <quarkus.version>3.15.3.redhat-00002</quarkus.version>
  </properties>

    <dependencies>
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.google.api.grpc/proto-google-common-protos -->
        <dependency>
            <groupId>com.google.api.grpc</groupId>
            <artifactId>proto-google-common-protos</artifactId>
        </dependency>


        <dependency>
            <groupId>com.squareup.wire</groupId>
            <artifactId>wire-schema</artifactId>
        </dependency>

        <dependency>
            <groupId>com.squareup.wire</groupId>
            <artifactId>wire-schema-jvm</artifactId>
        </dependency>

        <dependency>
            <groupId>com.ibm.icu</groupId>
            <artifactId>icu4j</artifactId>
        </dependency>

        <dependency>
            <groupId>com.squareup.okio</groupId>
            <artifactId>okio-jvm</artifactId>
        </dependency>

        <dependency>
            <groupId>com.squareup.okio</groupId>
            <artifactId>okio-fakefilesystem</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java-util</artifactId>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- Used for Proto assertions in tests -->
        <dependency>
            <groupId>com.google.truth.extensions</groupId>
            <artifactId>truth-proto-extension</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <target>${maven.compiler.target}</target>
                    <release>${maven.compiler.target}</release>
                    <multiReleaseOutput>true</multiReleaseOutput>
                    <showDeprecation>false</showDeprecation>
                    <showWarnings>false</showWarnings>
                </configuration>
                <executions>
                    <execution>
                        <id>jdk8-support</id>
                        <goals><goal>compile</goal></goals>
                        <configuration>
                            <release>8</release>
                            <target>1.8</target>
                            <multiReleaseOutput>false</multiReleaseOutput>
                            <showDeprecation>false</showDeprecation>
                            <showWarnings>false</showWarnings>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Multi-Release>true</Multi-Release>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.7.1.redhat-00001</version>
                <executions>
                    <execution>
                        <phase>initialize</phase>
                        <goals>
                            <goal>detect</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>${proto-plugin.version}</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>gencode</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>compile</goal>
                            <goal>test-compile</goal>
                        </goals>
                        <configuration>
                            <protocArtifact>${protoc-artifact-common}</protocArtifact>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dist</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${project.basedir}/target/generated-test-sources/protobuf/</directory>
                                    <filtering>false</filtering>
                                    <excludes>
                                    </excludes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

    </build>

</project>
