<?xml version="1.0" encoding="UTF-8"?>
<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>com.tencent.polaris</groupId>
    <artifactId>polaris-common</artifactId>
    <version>1.10.5</version>
  </parent>
  <groupId>com.tencent.polaris</groupId>
  <artifactId>polaris-model</artifactId>
  <version>1.10.5</version>
  <name>Polaris Common Model</name>
  <description>Polaris Common Model JAR</description>
  <licenses>
    <license>
      <name>BSD 3-Clause License</name>
      <url>https://opensource.org/licenses/BSD-3-Clause</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <dependencies>
    <dependency>
      <groupId>com.tencent.polaris</groupId>
      <artifactId>polaris-protobuf</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.tencent.polaris</groupId>
      <artifactId>polaris-logging</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <id>bn1</id>
            <goals>
              <goal>create-timestamp</goal>
            </goals>
            <configuration>
              <timestampPropertyName>build.time</timestampPropertyName>
              <timestampFormat>yyyyMMddHHmm</timestampFormat>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>templating-maven-plugin</artifactId>
        <version>1.0.0</version>
        <executions>
          <execution>
            <id>filter-src</id>
            <goals>
              <goal>filter-sources</goal>
            </goals>
            <configuration>
              <sourceDirectory>src/main/templates</sourceDirectory>
              <outputDirectory>target/generated-sources/java/com/tencent/polaris/version</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>${maven.shaded.plugin.version}</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <includes>
                  <include>com.fasterxml:*</include>
                </includes>
                <includes>
                  <include>org.yaml:*</include>
                </includes>
                <includes>
                  <include>io.grpc:*</include>
                </includes>
                <includes>
                  <include>io.netty:*</include>
                </includes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>com.fasterxml</pattern>
                  <shadedPattern>shade.polaris.com.fasterxml</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.yaml</pattern>
                  <shadedPattern>shade.polaris.org.yaml</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>io.grpc</pattern>
                  <shadedPattern>shade.polaris.io.grpc</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>io.netty</pattern>
                  <shadedPattern>shade.polaris.io.netty</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>package</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
