<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2018 Confluent Inc.
  ~
  ~ Licensed under the Confluent Community License (the "License"); you may not use
  ~ this file except in compliance with the License.  You may obtain a copy of the
  ~ License at
  ~
  ~ http://www.confluent.io/confluent-community-license
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  ~ WARRANTIES OF ANY KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations under the License.
  -->

<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.confluent.ksql</groupId>
        <artifactId>ksqldb-parent</artifactId>
        <version>7.3.15</version>
    </parent>

    <artifactId>ksqldb-package</artifactId>
    <packaging>pom</packaging>
    <name>ksqldb-package</name>

    <!-- Dependencies are required only to ensure this module is built last. -->
    <dependencies>
       <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-cli</artifactId>
            <version>${io.confluent.ksql.version}</version>
        </dependency>
        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-common</artifactId>
            <version>${io.confluent.ksql.version}</version>
        </dependency>
        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-parser</artifactId>
            <version>${io.confluent.ksql.version}</version>
        </dependency>
        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-metastore</artifactId>
            <version>${io.confluent.ksql.version}</version>
        </dependency>
        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-engine</artifactId>
            <version>${io.confluent.ksql.version}</version>
        </dependency>
        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-tools</artifactId>
            <version>${io.confluent.ksql.version}</version>
        </dependency>
        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-rest-app</artifactId>
            <version>${io.confluent.ksql.version}</version>
        </dependency>
        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-serde</artifactId>
            <version>${io.confluent.ksql.version}</version>
        </dependency>
        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-version-metrics-client</artifactId>
            <version>${io.confluent.ksql.version}</version>
        </dependency>

        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-examples</artifactId>
            <version>${io.confluent.ksql.version}</version>
        </dependency>

        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-functional-tests</artifactId>
            <version>${io.confluent.ksql.version}</version>
        </dependency>

        <!-- Required for ksqldb-test-runner -->

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <classifier>test</classifier>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <scope>compile</scope>
        </dependency>

      <!-- Required for running tests -->

      <dependency>
        <groupId>io.confluent.ksql</groupId>
        <artifactId>ksqldb-test-util</artifactId>
        <version>${io.confluent.ksql.version}</version>
        <scope>test</scope>
      </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>src/assembly/development.xml</descriptor>
                        <descriptor>src/assembly/package.xml</descriptor>
                    </descriptors>
                    <archive>
                        <manifest>
                            <mainClass>io.confluent.ksql.Ksql</mainClass>
                        </manifest>
                    </archive>
                    <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>standalone</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <configuration>
                            <descriptors>
                                <descriptor>src/assembly/standalone.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
