<?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>net.polyv</groupId>
    <artifactId>polyv-java-sdk</artifactId>
    <version>1.2.0</version>
    <modules>
        <module>polyv-java-vod-sdk</module>
        <module>polyv-java-live-sdk</module>
        <module>polyv-java-sdk-common</module>
        <module>polyv-java-seminar-sdk</module>
        <module>polyv-java-vclass-sdk</module>
    </modules>

    <packaging>pom</packaging>
    <name>polyv-java-sdk</name>
    <description>保利威视频云JAVA SDK</description>
    <url>https://www.polyv.net/</url>


    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java-version>1.8</java-version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <slf4j.version>1.7.30</slf4j.version>
        <httpclient.version>4.5.13</httpclient.version>
        <fastjson.version>1.2.70</fastjson.version>
        <junit.version>4.12</junit.version>
        <lombok.version>1.18.16</lombok.version>
        <jacoco.version>0.8.0</jacoco.version>
        <allure-junit4.version>2.13.1</allure-junit4.version>
        <aspectjweaver.version>1.5.0</aspectjweaver.version>
        <swagger.version>1.6.2</swagger.version>
        <javadoc.opts>-Xdoclint:none</javadoc.opts>
    </properties>


    <dependencies>
        <!-- 基本工具 -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-annotations</artifactId>
            <version>${swagger.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${httpclient.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
            <version>${httpclient.version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>${fastjson.version}</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <!--        <dependency>-->
        <!--            <groupId>org.jacoco</groupId>-->
        <!--            <artifactId>jacoco-maven-plugin</artifactId>-->
        <!--            <version>${jacoco.version}</version>-->
        <!--        <scope>test</scope>-->
        <!--        </dependency>-->
        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-junit4</artifactId>
            <version>${allure-junit4.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>${aspectjweaver.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>


    <developers>
        <developer>
            <name>wujie</name>
            <email>wujie@polyv.net</email>
            <url>https://github.com/polyv/polyv-java-sdk</url>
        </developer>
        <developer>
            <name>wangzhikang</name>
            <email>wangzhikang@polyv.net</email>
            <url>https://github.com/polyv/polyv-java-sdk</url>
        </developer>
    </developers>
    <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>
    <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>
        </license>
    </licenses>
    <scm>
        <url>https://github.com/polyv/polyv-java-sdk.git</url>
        <connection>https://github.com/polyv/polyv-java-sdk.git</connection>
        <developerConnection>https://github.com/polyv/polyv-java-sdk</developerConnection>
    </scm>
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- 生成sources源码包的插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- 生成javadoc文档包的插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.2.0</version>
<!--                        <version>2.9</version>-->
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <charset>UTF-8</charset>
                            <locale>zh_CN</locale>
<!--                            <doclint>none</doclint>-->
<!--                                                        <additionalparam>-Xdoclint:none</additionalparam>-->
                        </configuration>
                    </plugin>
                    <!-- Gpg Signature -->
                    <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>
                </plugins>
            </build>
        </profile>
    </profiles>
    <build>
        <plugins>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.3</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
<!--                    <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>-->
                </configuration>
            </plugin>

            <!-- any other plugins -->
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.0</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.7.1</version>
                <configuration>
                    <skipTests>false</skipTests>
                    <!--表示执行任何子目录下所有命名以Test结尾的java类 -->
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                    <!--表示不执行任何子目录下所有命名以Test开头的java类 -->
                    <excludes>
                        <exclude>**/Test*.java</exclude>
                    </excludes>
                    <testFailureIgnore>true</testFailureIgnore>
                    <argLine>
                        <!--                        -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/1.5.4/aspectjweaver-1.5.4.jar"-->
                        -javaagent:"${settings.localRepository}/aspectj/aspectjweaver/1.5.0/aspectjweaver-1.5.0.jar"
                    </argLine>
                    <properties>
                        <property>
                            <name>listener</name>
                            <value>io.qameta.allure.junit4.AllureJunit4</value>
                        </property>
                    </properties>
                </configuration>
            </plugin>

        </plugins>
    </build>
</project>
