<?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>oap-server</artifactId>
        <groupId>org.apache.skywalking</groupId>
        <version>${revision}</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>server-starter</artifactId>

    <properties>
        <generateGitPropertiesFilename>${project.basedir}/src/main/resources/version.properties
        </generateGitPropertiesFilename>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>server-core</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- OAL runtime core -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>oal-rt</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- OAL runtime core -->

        <!-- cluster module -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>cluster-standalone-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>cluster-zookeeper-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>cluster-kubernetes-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>cluster-consul-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>cluster-etcd-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>cluster-nacos-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- cluster module -->

        <!-- receiver module -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>skywalking-mesh-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>skywalking-management-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>skywalking-jvm-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>skywalking-trace-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>zipkin-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>zipkin-query-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>status-query-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>envoy-metrics-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>skywalking-clr-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>skywalking-profile-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>otel-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>skywalking-meter-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>skywalking-browser-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>skywalking-log-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>configuration-discovery-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>skywalking-event-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>skywalking-zabbix-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>skywalking-ebpf-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>skywalking-async-profiler-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>skywalking-telegraf-receiver-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>aws-firehose-receiver</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- receiver module -->

        <!-- fetcher module -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>kafka-fetcher-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>cilium-fetcher-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- fetcher module -->

        <!-- storage module -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>storage-jdbc-hikaricp-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>storage-banyandb-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- storage module -->

        <!-- queryBuild module -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>query-graphql-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>promql-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>logql-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- queryBuild module -->

        <!-- alarm module -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>server-alarm-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- telemetry -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>telemetry-prometheus</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- exporter -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>exporter</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- configuration -->
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>grpc-configuration-sync</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>configuration-apollo</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>configuration-zookeeper</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>configuration-etcd</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>configuration-consul</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>configuration-k8s-configmap</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>configuration-nacos</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.skywalking</groupId>
            <artifactId>storage-elasticsearch-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

    <build>
        <finalName>skywalking-oap</finalName>
        <plugins>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>application.yml</exclude>
                        <exclude>log4j2.xml</exclude>
                        <exclude>alarm-settings.yml</exclude>
                        <exclude>component-libraries.yml</exclude>
                        <exclude>gateways.yml</exclude>
                        <exclude>service-apdex-threshold.yml</exclude>
                        <exclude>endpoint-name-grouping.yml</exclude>
                        <exclude>metadata-service-mapping.yaml</exclude>
                        <exclude>trace-sampling-policy-settings.yml</exclude>
                        <exclude>hierarchy-definition.yml</exclude>
                        <exclude>bydb.dependencies.properties</exclude>
                        <exclude>bydb.yml</exclude>
                        <exclude>oal/</exclude>
                        <exclude>fetcher-prom-rules/</exclude>
                        <exclude>envoy-metrics-rules/</exclude>
                        <exclude>meter-analyzer-config/</exclude>
                        <exclude>openapi-definitions/</exclude>
                        <exclude>otel-rules/</exclude>
                        <exclude>ui-initialized-templates/</exclude>
                        <exclude>zabbix-rules/</exclude>
                        <exclude>lal/</exclude>
                        <exclude>log-mal-rules/</exclude>
                        <exclude>telegraf-rules/</exclude>
                        <exclude>cilium-rules/</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeScope>runtime</includeScope>
                            <outputDirectory>${project.build.directory}/oap-libs</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <version>4.9.10</version>
                <executions>
                    <execution>
                        <id>get-the-git-information</id>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                        <phase>initialize</phase>
                    </execution>
                </executions>
                <configuration>
                    <verbose>false</verbose>
                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
                    <generateGitPropertiesFilename>${generateGitPropertiesFilename}</generateGitPropertiesFilename>
                    <dateFormatTimeZone>UTC</dateFormatTimeZone>
                    <dateFormat>yyyyMMddHHmmss</dateFormat>
                    <failOnNoGitDirectory>false</failOnNoGitDirectory>
                    <includeOnlyProperties>
                        <includeOnlyProperty>^git.build.version$</includeOnlyProperty>
                        <includeOnlyProperty>^git.commit.id$</includeOnlyProperty>
                    </includeOnlyProperties>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
