<?xml version="1.0" encoding="UTF-8"?>
<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>

    <groupId>com.jdcloud.logs</groupId>
    <artifactId>log-api</artifactId>
    <version>0.2.0</version>

    <name>JDCloud LOG Java SDK</name>
    <url>http://jdcloud.com</url>
    <description>JDCloud LOG Java SDK</description>

    <developers>
        <developer>
            <name>liubai</name>
            <email>liubai@jd.com</email>
        </developer>
    </developers>
    <scm>
        <url>https://github.com/JDCloudLogs/log-java-sdk</url>
        <connection>scm:git:https://github.com/JDCloudLogs/log-java-sdk</connection>
        <developerConnection>scm:git:git@github.com/JDCloudLogs/log-java-sdk.git</developerConnection>
        <tag>HEAD</tag>
    </scm>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <protobuf.version>2.5.0</protobuf.version>
        <lz4.version>1.3.0</lz4.version>
        <jdcloud.sdk.version>2.2.2</jdcloud.sdk.version>
        <junit.version>4.12</junit.version>
        <protobuf.plugin.version>0.6.1</protobuf.plugin.version>

        <maven.compiler.source>6</maven.compiler.source>
        <maven.compiler.target>6</maven.compiler.target>

        <os-maven-plugin.version>1.7.0</os-maven-plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
            <version>${protobuf.version}</version>
        </dependency>
        <dependency>
            <groupId>net.jpountz.lz4</groupId>
            <artifactId>lz4</artifactId>
            <version>${lz4.version}</version>
        </dependency>
        <dependency>
            <groupId>com.jdcloud.sdk</groupId>
            <artifactId>core</artifactId>
            <version>${jdcloud.sdk.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.alibaba</groupId>
                    <artifactId>fastjson</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
<!--        <extensions>-->
<!--            <extension>-->
<!--                <groupId>kr.motd.maven</groupId>-->
<!--                <artifactId>os-maven-plugin</artifactId>-->
<!--                <version>${os-maven-plugin.version}</version>-->
<!--            </extension>-->
<!--        </extensions>-->
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <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-gpg-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.7</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
<!--            <plugin>-->
<!--                <groupId>org.xolstice.maven.plugins</groupId>-->
<!--                <artifactId>protobuf-maven-plugin</artifactId>-->
<!--                <version>${protobuf.plugin.version}</version>-->
<!--                <extensions>true</extensions>-->
<!--                <configuration>-->
<!--                    &lt;!&ndash; 工具版本 &ndash;&gt;-->
<!--                    <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>-->
<!--                    &lt;!&ndash;默认值，proto源文件路径&ndash;&gt;-->
<!--                    <protoSourceRoot>src/main/protoc</protoSourceRoot>-->
<!--                    &lt;!&ndash;默认值，proto目标java文件路径&ndash;&gt;-->
<!--                    <outputDirectory>${project.basedir}/src/main/java</outputDirectory>-->
<!--                    &lt;!&ndash;设置是否在生成java文件之前清空outputDirectory的文件，默认值为true，设置为false时也会覆盖同名文件&ndash;&gt;-->
<!--                    <clearOutputDirectory>false</clearOutputDirectory>-->

<!--                </configuration>-->
<!--                <executions>-->
<!--                    <execution>-->
<!--                        &lt;!&ndash;在执行mvn compile的时候会执行以下操作&ndash;&gt;-->
<!--                        <phase>compile</phase>-->
<!--                        <goals>-->
<!--                            &lt;!&ndash;生成OuterClass类&ndash;&gt;-->
<!--                            <goal>compile</goal>-->
<!--                            &lt;!&ndash;生成Grpc类&ndash;&gt;-->
<!--                            &lt;!&ndash;goal>compile-custom</goal&ndash;&gt;-->
<!--                        </goals>-->
<!--                    </execution>-->
<!--                </executions>-->
<!--            </plugin>-->
        </plugins>
    </build>
</project>