<?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.11.redhat-00001</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>apicurio-registry-utils-exportConfluent</artifactId>
    <packaging>jar</packaging>
    <name>apicurio-registry-utils-exportConfluent</name>
    <properties>
    <quarkus.version>3.15.3.redhat-00002</quarkus.version>
  </properties>

    <dependencies>

        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-arc</artifactId>
        </dependency>
        
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-junit5</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>

        <dependency>
            <groupId>io.apicurio</groupId>
            <artifactId>apicurio-registry-utils-import-export</artifactId>
        </dependency>

        <!-- https://mvnrepository.com/artifact/io.confluent/kafka-schema-registry-client -->
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>kafka-schema-registry-client</artifactId>
            <version>7.7.2</version>
        </dependency>
    </dependencies>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${version.puppycrawl}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <configLocation>../../.checkstyle/simple.xml</configLocation>
                            <headerLocation>../../.checkstyle/java.header</headerLocation>
                            <suppressionsLocation>../../.checkstyle/suppressions.xml</suppressionsLocation>
                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
                            <encoding>UTF-8</encoding>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <plugin>
                <groupId>io.smallrye</groupId>
                <artifactId>jandex-maven-plugin</artifactId>
                <version>${jandex.version}</version>
                <executions>
                  <execution>
                    <id>make-index</id>
                    <goals>
                      <goal>jandex</goal>
                    </goals>
                  </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.redhat.quarkus.platform</groupId>
                <artifactId>quarkus-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
                <version>3.15.3.redhat-00002</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <configuration>
                            <target>
                                <copy file="${project.build.directory}/${project.artifactId}-${project.version}-runner.jar" tofile="${project.build.directory}/${project.artifactId}-${project.version}.jar" />
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <attach>true</attach>  <!-- we want attach & deploy these to Maven -->
                            <descriptors>
                                <descriptor>src/main/assembly/exportConfluent.xml</descriptor>
                            </descriptors>
                            <tarLongFileMode>${tar.long.file.mode}</tarLongFileMode>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
