<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (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.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS 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">
    <parent>
        <artifactId>apm-collector</artifactId>
        <groupId>org.apache.skywalking</groupId>
        <version>5.0.0-alpha</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>apm-collector-boot</artifactId>
    <packaging>jar</packaging>

    <properties>
        <docker.image.name>skywalking/skywalking-collector</docker.image.name>
        <docker.image.version>${version}</docker.image.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <version>1.18</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>apm-collector-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- cluster provider -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>collector-cluster-redis-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>collector-cluster-standalone-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>collector-cluster-zookeeper-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- cluster provider -->
        <!-- grpc manager provider -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>collector-grpc-manager-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- grpc manager provider -->
        <!-- jetty manager provider -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>collector-jetty-manager-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- jetty manager provider -->
        <!-- naming jetty provider -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>collector-naming-jetty-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- naming jetty provider -->
        <!-- agent gRPC provider -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>agent-grpc-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- agent gRPC provider -->
        <!-- agent jetty provider -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>agent-jetty-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- agent jetty provider -->
        <!-- analysis provider -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>segment-parser-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>register-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>jvm-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>metric-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>alarm-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>baseline-computing-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- analysis provider -->
        <!-- ui provider -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>collector-ui-jetty-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- ui provider -->
        <!-- storage provider -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>collector-storage-es-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>collector-storage-h2-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- storage provider -->
        <!-- remote provider -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>collector-remote-grpc-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- remote provider -->
        <!-- cache provider -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>collector-cache-guava-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- cache provider -->
        <!-- configuration provider -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>collector-configuration-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- configuration provider -->
        <!-- alarm provider -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>alarm-provider</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- alarm provider -->
    </dependencies>

    <build>
        <finalName>skywalking-collector</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${compiler.version}</source>
                    <target>${compiler.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.4.3</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <excludes>
                        <exclude>application.yml</exclude>
                        <exclude>log4j2.xml</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/assembly.xml</descriptor>
                            </descriptors>
                            <outputDirectory>${project.basedir}/../../packages</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>${docker.plugin.version}</version>
                <configuration>
                    <skipDocker>false</skipDocker>
                    <imageName>${docker.image.name}</imageName>
                    <imageTags>
                        <imageTag>${docker.image.version}</imageTag>
                    </imageTags>
                    <dockerDirectory>${project.basedir}/docker</dockerDirectory>
                    <resources>
                        <resource>
                            <targetPath>/</targetPath>
                            <directory>${project.basedir}/../../packages</directory>
                            <include>${build.finalName}.tar.gz</include>
                        </resource>
                    </resources>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
