<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://maven.apache.org/POM/4.0.0"
  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.confluent</groupId>
        <artifactId>common</artifactId>
        <version>7.8.4</version>
    </parent>
    <groupId>io.confluent</groupId>
    <artifactId>confluent-hub-client</artifactId>
    <version>7.8.4</version>
    <licenses>
        <license>
            <name>Confluent License Agreement</name>
            <url>https://www.confluent.io/legal/confluent-license-agreement/</url>
        </license>
    </licenses>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <descriptors>
                        <descriptor>src/assembly/package.xml</descriptor>
                    </descriptors>
                    <attach>false</attach>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>licenses-package</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.2.1</version>
                        <executions>
                            <execution>
                                <id>create-licenses</id>
                                <configuration>
                                    <mainClass>io.confluent.licenses.LicenseFinder</mainClass>
                                    <arguments>
                                        <!-- Note use of development instead of package so we pick up all dependencies. -->
                                        <argument>-i
                                            ${project.build.directory}/${project.build.finalName}-package/share/java/confluent-hub-client
                                        </argument>
                                        <argument>-o ${project.basedir}/licenses</argument>
                                        <argument>-f</argument>
                                        <argument>-h
                                            ${project.build.directory}/${project.build.finalName}-package/share/doc/confluent-hub-client/licenses.html
                                        </argument>
                                        <argument>-l
                                            ${project.build.directory}/${project.build.finalName}-package/share/doc/confluent-hub-client/licenses
                                        </argument>
                                        <argument>-n
                                            ${project.build.directory}/${project.build.finalName}-package/share/doc/confluent-hub-client/notices
                                        </argument>
                                        <argument>-t ${project.name}</argument>
                                        <argument>-x licenses-${io.confluent.hub-client.version}.jar</argument>
                                    </arguments>
                                </configuration>
                                <phase>package</phase>
                                <goals>
                                    <goal>java</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <includeProjectDependencies>true</includeProjectDependencies>
                            <includePluginDependencies>true</includePluginDependencies>
                            <executableDependency>
                                <groupId>io.confluent</groupId>
                                <artifactId>licenses</artifactId>
                            </executableDependency>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>io.confluent</groupId>
                                <artifactId>licenses</artifactId>
                                <version>${io.confluent.license-file-generator.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>licenses-source</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.2.1</version>
                        <executions>
                            <execution>
                                <id>create-licenses</id>
                                <configuration>
                                    <mainClass>io.confluent.licenses.LicenseFinder</mainClass>
                                    <arguments>
                                        <!-- Note use of development instead of package so we pick up all dependencies. -->
                                        <argument>-i
                                            ${project.build.directory}/${project.build.finalName}-package/share/java/confluent-hub-client
                                        </argument>
                                        <argument>-o ${project.basedir}/licenses</argument>
                                        <argument>-f</argument>
                                        <argument>-h ${project.basedir}/licenses.html</argument>
                                        <argument>-l ${project.basedir}/licenses</argument>
                                        <argument>-n ${project.basedir}/notices</argument>
                                        <argument>-t ${project.name}</argument>
                                        <argument>-x licenses-${io.confluent.license-file-generator.version}.jar</argument>
                                    </arguments>
                                </configuration>
                                <phase>package</phase>
                                <goals>
                                    <goal>java</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <includeProjectDependencies>true</includeProjectDependencies>
                            <includePluginDependencies>true</includePluginDependencies>
                            <executableDependency>
                                <groupId>io.confluent</groupId>
                                <artifactId>licenses</artifactId>
                            </executableDependency>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>io.confluent</groupId>
                                <artifactId>licenses</artifactId>
                                <version>${io.confluent.license-file-generator.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
                        <artifactId>maven-clean-plugin</artifactId>
                        <version>3.0.0</version>
                        <configuration>
                            <filesets>
                                <fileset>
                                    <directory>.</directory>
                                    <includes>
                                        <include>licenses.html</include>
                                        <directory>licenses/*.*</directory>
                                        <directory>notices/*.*</directory>
                                    </includes>
                                </fileset>
                            </filesets>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <properties>
        <airline.version>2.6.0</airline.version>
        <activation.version>1.1.1</activation.version>
        <checkstyle.suppressions.location>checkstyle/suppressions.xml</checkstyle.suppressions.location>
        <commons-configuration.version>1.10</commons-configuration.version>
        <commons-io.version>2.14.0</commons-io.version>
        <commons-logging.version>1.1.1</commons-logging.version>
        <hk2.version>2.5.0-b30</hk2.version>
        <jackson-annotations.version>${jackson.version}</jackson-annotations.version>
        <javax.inject.version>1</javax.inject.version>
        <javax.annotation-api.version>1.2</javax.annotation-api.version>
        <javax.ws.rs-api.version>2.0.1</javax.ws.rs-api.version>
        <jersey-client.version>2.34</jersey-client.version>
        <maven.artifact.version>3.3.3</maven.artifact.version>
        <slf4j-log4j12.version>1.7.25</slf4j-log4j12.version>
        <confluent-log4j.version>1.2.17-cp8</confluent-log4j.version>
        <confluent.maven.repo>https://packages.confluent.io/maven/</confluent.maven.repo>
        <io.confluent.hub-client.version>7.8.4</io.confluent.hub-client.version>
    </properties>

    <repositories>
        <repository>
            <id>confluent</id>
            <name>Confluent</name>
            <url>${confluent.maven.repo}</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
            <version>${jersey-client.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.glassfish.hk2</groupId>
                    <artifactId>osgi-resource-locator</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.glassfish.hk2.external</groupId>
                    <artifactId>javax.inject</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.glassfish.hk2.external</groupId>
                    <artifactId>aopalliance-repackaged</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.javassist</groupId>
                    <artifactId>javassist</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.inject</groupId>
            <artifactId>jersey-hk2</artifactId>
            <version>${jersey-client.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.rvesse</groupId>
            <artifactId>airline-help-bash</artifactId>
            <version>${airline.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.github.rvesse</groupId>
                    <artifactId>airline-examples</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-reload4j</artifactId>
        </dependency>
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>logredactor</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.1</version>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>${maven.artifact.version}</version>
            <exclusions>
              <exclusion>
                  <groupId>org.codehaus.plexus</groupId>
                  <artifactId>plexus-utils</artifactId>
              </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons-io.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-configuration</groupId>
            <artifactId>commons-configuration</artifactId>
            <version>${commons-configuration.version}</version>
        </dependency>
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>common-utils</artifactId>
            <version>${io.confluent.common.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.101tec</groupId>
                    <artifactId>zkclient</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.zookeeper</groupId>
                    <artifactId>zookeeper</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.github.stefanbirkner</groupId>
            <artifactId>system-rules</artifactId>
            <version>1.18.0</version>
            <scope>test</scope>
        </dependency>
        <!-- Not included in JDK9+ -->
        <dependency>
          <groupId>javax.activation</groupId>
          <artifactId>activation</artifactId>
          <version>${activation.version}</version>
        </dependency>
    </dependencies>

</project>
