<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>9</version>
  </parent>
  <groupId>com.aliyun.openservices</groupId>
  <artifactId>aliyun-log</artifactId>
  <version>0.6.120</version>
  <packaging>jar</packaging>
  <name>Aliyun LOG Java SDK</name>
  <url>http://www.aliyun.com</url>
  <description>Aliyun LOG Java SDK</description>
  <licenses>
    <license>
      <name>The Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <scm>
    <url>https://github.com/aliyun/aliyun-log-java-sdk</url>
    <connection>scm:git:git@gitlab.alibaba-inc.com:sls/aliyun-log-java-sdk.git</connection>
    <developerConnection>scm:git:git@gitlab.alibaba-inc.com:sls/aliyun-log-java-sdk.git
        </developerConnection>
  </scm>
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>
  <developers>
    <developer>
      <id>aliyunproducts</id>
      <name>Aliyun Log development team</name>
      <email>aliyunsdk@aliyun.com</email>
    </developer>
  </developers>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.alibaba</groupId>
      <artifactId>fastjson</artifactId>
      <version>1.2.83_noneautotype</version>
    </dependency>
    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
      <version>2.5.0</version>
    </dependency>
    <dependency>
      <groupId>net.jpountz.lz4</groupId>
      <artifactId>lz4</artifactId>
      <version>1.3.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>4.5.1</version>
    </dependency>
    <dependency>
      <groupId>com.github.luben</groupId>
      <artifactId>zstd-jni</artifactId>
      <version>1.5.6-3</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <configuration>
          <forceCreation>true</forceCreation>
          <excludes>
            <exclude>com/aliyun/openservices/log/sample</exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <excludes>
            <exclude>**/oms/**</exclude>
            <exclude>**/odps/**</exclude>
          </excludes>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.2</version>
        <configuration>
          <parallel>classes</parallel>
          <threadCount>128</threadCount>
          <forkCount>2C</forkCount>
          <reuseForks>true</reuseForks>
          <argLine>-Xmx2048m -Dfile.encoding=UTF-8</argLine>
          <excludes>
            <exclude>**/odps/**</exclude>
            <exclude>**/oms/**</exclude>
            <exclude>com.aliyun.openservices.log.functiontest.CnameFunctionTest.java</exclude>
            <exclude>com.aliyun.openservices.log.functiontest.LogstoreReplicationTest.java</exclude>
            <exclude>com.aliyun.openservices.log.functiontest.AuditJobFunctionTest.java</exclude>
            <exclude>com.aliyun.openservices.log.functiontest.ResourceGroupFunctionTest.java</exclude>
            <exclude>com.aliyun.openservices.log.functiontest.ExportOdpsTest.java</exclude>
            <exclude>com.aliyun.openservices.log.functiontest.ExportOSSTest.java</exclude>
            <exclude>com.aliyun.openservices.log.functiontest.LogstoreTest.java</exclude>
            <exclude>com.aliyun.openservices.log.functiontest.RebuildIndexFunctionTest.java</exclude>
            <exclude>com.aliyun.openservices.log.functiontest.RandomDataTest.java</exclude>
            <exclude>com.aliyun.openservices.log.functiontest.SlsClientUnitTest.java</exclude>
            <exclude>com.aliyun.openservices.log.functiontest.java</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.9.0</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8</version>
        <configuration>
          <encoding>UTF-8</encoding>
          <excludePackageNames>com.aliyun.openservices.log.http.*</excludePackageNames>
          <tags>
            <tag>
              <name>author</name>
              <placement>X</placement>
            </tag>
          </tags>
          <additionalparam>-Xdoclint:none</additionalparam>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.4</version>
        <configuration>
          <artifactSet>
            <excludes>
              <exclude>net.jpountz.lz4:lz4:jar:</exclude>
            </excludes>
          </artifactSet>
          <relocations>
            <relocation>
              <pattern>com.google.protobuf</pattern>
              <shadedPattern>com.aliyun.log.thirdparty.com.google.protobuf
                            </shadedPattern>
            </relocation>
            <relocation>
              <pattern>com.alibaba.fastjson</pattern>
              <shadedPattern>com.aliyun.log.thirdparty.com.alibaba:fastjson</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.http</pattern>
              <shadedPattern>com.aliyun.log.thirdparty.org.apache.http</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.commons</pattern>
              <shadedPattern>com.aliyun.log.thirdparty.org.apache.commons</shadedPattern>
            </relocation>
          </relocations>
          <filters>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>META-INF/*.SF</exclude>
                <exclude>META-INF/*.DSA</exclude>
                <exclude>META-INF/*.RSA</exclude>
                <exclude>**/pom.xml</exclude>
              </excludes>
            </filter>
          </filters>
          <shadedClassifierName>jar-with-dependencies</shadedClassifierName>
          <shadedArtifactAttached>true</shadedArtifactAttached>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.3</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>sonatype-nexus-staging</serverId>
          <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>3.3.1</version>
        <configuration>
          <skipTests>true</skipTests>
        </configuration>
      </plugin>
    </plugins>
  </reporting>
</project>