<?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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>30</version>
    <relativePath></relativePath>
  </parent>
  <groupId>org.apache.skywalking</groupId>
  <artifactId>apm</artifactId>
  <version>10.1.0</version>
  <packaging>pom</packaging>
  <name>apm</name>
  <url>https://github.com/apache/skywalking</url>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <mailingLists>
    <mailingList>
      <name>SkyWalking Developer List</name>
      <subscribe>dev-subscribe@skywalking.apache.org</subscribe>
      <unsubscribe>dev-unsubscribe@skywalking.apache.org</unsubscribe>
      <post>dev@skywalking.apache.org</post>
    </mailingList>
    <mailingList>
      <name>SkyWalking Commits</name>
      <subscribe>commits-subscribe@skywalking.apache.org</subscribe>
      <unsubscribe>commits-unsubscribe@skywalking.apache.org</unsubscribe>
      <post>commits@skywalking.apache.org</post>
    </mailingList>
  </mailingLists>
  <modules>
    <module>apm-protocol</module>
  </modules>
  <scm>
    <connection>scm:git:https://github.com/apache/skywalking.git</connection>
    <developerConnection>scm:git:https://github.com/apache/skywalking.git</developerConnection>
    <url>https://github.com/apache/skywalking</url>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/apache/skywalking/issues</url>
  </issueManagement>
  <properties>
    <byte-buddy.version>1.14.9</byte-buddy.version>
    <jmh.version>1.21</jmh.version>
    <maven-checkstyle-plugin.version>3.1.0</maven-checkstyle-plugin.version>
    <netty.version>4.1.108.Final</netty.version>
    <protoc-gen-grpc-java.plugin.version>1.42.1</protoc-gen-grpc-java.plugin.version>
    <javax.annotation-api.version>1.3.2</javax.annotation-api.version>
    <system-stubs.version>2.1.4</system-stubs.version>
    <os-maven-plugin.version>1.6.2</os-maven-plugin.version>
    <takari-maven-plugin.version>0.6.1</takari-maven-plugin.version>
    <gson.version>2.9.0</gson.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <powermock.version>2.0.9</powermock.version>
    <protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
    <junit.version>5.9.2</junit.version>
    <grpc.version>1.63.0</grpc.version>
    <org.apache.tomcat.annotations-api.version>6.0.53</org.apache.tomcat.annotations-api.version>
    <objenesis.version>3.1</objenesis.version>
    <maven-failsafe-plugin.version>3.0.0-M8</maven-failsafe-plugin.version>
    <com.google.protobuf.protoc.version>3.19.2</com.google.protobuf.protoc.version>
    <maven.compiler.source>11</maven.compiler.source>
    <checkstyle.fails.on.error>true</checkstyle.fails.on.error>
    <build-helper-maven-plugin.version>3.2.0</build-helper-maven-plugin.version>
    <skipUTs>false</skipUTs>
    <antlr.version>4.11.1</antlr.version>
    <flatten-plugin-version>1.6.0</flatten-plugin-version>
    <revision>10.1.0</revision>
    <lombok.version>1.18.30</lombok.version>
    <assertj-core.version>3.20.2</assertj-core.version>
    <maven.compiler.target>11</maven.compiler.target>
    <checkstyle.version>6.18</checkstyle.version>
    <netty-tcnative-boringssl-static.version>2.0.52.Final</netty-tcnative-boringssl-static.version>
    <project.build.outputTimestamp>1715298980</project.build.outputTimestamp>
    <delombok.output.dir>${project.build.directory}/delombok</delombok.output.dir>
    <cyclonedx-maven-plugin.version>2.8.0</cyclonedx-maven-plugin.version>
    <mockito-core.version>4.11.0</mockito-core.version>
    <argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
    <exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito-core.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-inline</artifactId>
        <version>${mockito-core.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-junit-jupiter</artifactId>
        <version>${mockito-core.version}</version>
        <scope>test</scope>
        <exclusions>
          <exclusion>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
          </exclusion>
          <exclusion>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy-agent</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>net.bytebuddy</groupId>
        <artifactId>byte-buddy</artifactId>
        <version>${byte-buddy.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>net.bytebuddy</groupId>
        <artifactId>byte-buddy-agent</artifactId>
        <version>${byte-buddy.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-reflect</artifactId>
        <version>${powermock.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${assertj-core.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>uk.org.webcompere</groupId>
        <artifactId>system-stubs-jupiter</artifactId>
        <version>${system-stubs.version}</version>
        <scope>test</scope>
        <exclusions>
          <exclusion>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
          </exclusion>
          <exclusion>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy-agent</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.openjdk.jmh</groupId>
        <artifactId>jmh-generator-annprocess</artifactId>
        <version>${jmh.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jaxb</groupId>
        <artifactId>jaxb-runtime</artifactId>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.antlr</groupId>
        <artifactId>antlr4-runtime</artifactId>
        <version>${antlr.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-inline</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-reflect</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.openjdk.jmh</groupId>
      <artifactId>jmh-core</artifactId>
      <version>${jmh.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>${lombok.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.annotation</groupId>
      <artifactId>javax.annotation-api</artifactId>
      <version>${javax.annotation-api.version}</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-failsafe-plugin</artifactId>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <argLine>${argLine}</argLine>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <configuration>
            <forceCreation>true</forceCreation>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <skip>${skipUTs}</skip>
            <argLine>${argLine}</argLine>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.antlr</groupId>
          <artifactId>antlr4-maven-plugin</artifactId>
          <version>${antlr.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>3.2.6</version>
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <phase>verify</phase>
              <goals>
                <goal>sign</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.cyclonedx</groupId>
          <artifactId>cyclonedx-maven-plugin</artifactId>
          <version>${cyclonedx-maven-plugin.version}</version>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>makeBom</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <configuration>
            <retryFailedDeploymentCount>5</retryFailedDeploymentCount>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>flatten-maven-plugin</artifactId>
          <version>${flatten-plugin-version}</version>
          <configuration>
            <flattenMode>resolveCiFriendliesOnly</flattenMode>
            <updatePomFile>true</updatePomFile>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>${os-maven-plugin.version}</version>
        <executions>
          <execution>
            <phase>initialize</phase>
            <goals>
              <goal>detect</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-java</id>
            <phase>validate</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>11</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${maven-checkstyle-plugin.version}</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>process-sources</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <configLocation>${maven.multiModuleProjectDirectory}/apm-checkstyle/checkStyle.xml</configLocation>
          <encoding>UTF-8</encoding>
          <consoleOutput>true</consoleOutput>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
          <failOnViolation>${checkstyle.fails.on.error}</failOnViolation>
          <sourceDirectories>
            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
            <sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory>
          </sourceDirectories>
          <resourceIncludes>**/*.properties,
                        **/*.sh,
                        **/*.bat,
                        **/*.yml,
                        **/*.yaml,
                        **/*.xml</resourceIncludes>
          <resourceExcludes>**/.asf.yaml,
                        **/.github/**</resourceExcludes>
          <excludes>**/target/generated-test-sources/**,
                        org/apache/skywalking/apm/network/register/v2/**/*.java,
                        org/apache/skywalking/apm/network/common/**/*.java,
                        org/apache/skywalking/apm/network/servicemesh/**/*.java,
                        org/apache/skywalking/apm/network/language/**/*.java,
                        org/apache/skywalking/oap/server/core/remote/grpc/proto/*.java,
                        org/apache/skywalking/oal/rt/grammar/*.java,
                        org/apache/skywalking/oap/server/exporter/grpc/*.java,
                        org/apache/skywalking/oap/server/configuration/service/*.java,
                        **/generated/*_jmhType*.java,
                        **/generated/*_jmhTest.java,
                        org/junit/**/*.java</excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok-maven-plugin</artifactId>
        <version>1.18.20.0</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>delombok</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
          <addOutputDirectory>false</addOutputDirectory>
          <outputDirectory>${delombok.output.dir}</outputDirectory>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <sourcepath>${delombok.output.dir};
                        ${project.build.directory}/generated-sources/protobuf/java;
                        ${project.build.directory}/generated-sources/protobuf/grpc-java;
                        ${project.build.directory}/generated-sources/antlr4;;</sourcepath>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.cyclonedx</groupId>
        <artifactId>cyclonedx-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-gpg-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>backend</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <modules>
        <module>oap-server</module>
        <module>oap-server-bom</module>
      </modules>
    </profile>
    <profile>
      <id>ui</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <modules>
        <module>apm-webapp</module>
      </modules>
    </profile>
    <profile>
      <id>dist</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <modules>
        <module>apm-dist</module>
      </modules>
    </profile>
    <profile>
      <id>all</id>
      <activation />
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>${exec-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>git submodule update</id>
                <phase>initialize</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <inherited>false</inherited>
                <configuration>
                  <executable>git</executable>
                  <arguments>
                    <argument>submodule</argument>
                    <argument>update</argument>
                    <argument>--init</argument>
                    <argument>--recursive</argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <modules>
        <module>oap-server</module>
        <module>oap-server-bom</module>
        <module>apm-webapp</module>
        <module>apm-dist</module>
      </modules>
    </profile>
  </profiles>
</project>
