<?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>io.gitee.sidihuo</groupId>
    <artifactId>sse</artifactId>
    <version>0.0.5.0</version>
    <packaging>jar</packaging>

    <name>sse</name>
    <description>okhttp3 sse</description>
    <url>https://gitee.com/sidihuo/sse</url>


    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>

        <server.id.value>ossrh</server.id.value>

        <maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
        <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
        <maven-source-plugin.version>2.2.1</maven-source-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>

    </properties>

    <dependencies>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.24</version>
            <!--运行期间不需要这个jar包，所以不需要打进jar/war包-->
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.9</version>
        </dependency>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>2.0.41</version>
        </dependency>

        <!--引入以此依赖会自动引入logback-classic.x.x.x.jar logback-core.x.x.x.jar slf4j-api-x.x.x.jar-->
        <!--spring boot 2 及其以下版本使用 slf4j 1.7.x  logback 1.2.x  注意适配关系-->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.2.13</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>5.3.29</version>
        </dependency>

        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp-sse</artifactId>
            <version>4.9.3</version>
        </dependency>

    </dependencies>

    <!-- 许可证信息 -->
    <licenses>
        <!-- Apache许可证 -->
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <!-- SCM信息 -> git在gitee上托管 -->
    <scm>
        <connection>scm:git:gitee://gitee.com/sidihuo/sse</connection>
        <developerConnection>scm:git:ssh://gitee.com/sidihuo/sse.git</developerConnection>
        <url>https://gitee.com/sidihuo/sse</url>
    </scm>

    <developers>
        <developer>
            <name>sidihuo</name>
            <email>sidihuo@163.com</email>
            <url>https://gitee.com/sidihuo</url>
        </developer>
    </developers>


    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>

            <!--管理仓库信息-->
            <distributionManagement>
                <snapshotRepository>
                    <id>${server.id.value}</id>
                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>${server.id.value}</id>
                    <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>

            <build>
                <plugins>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.20</version>
                        <configuration>
                            <skipTests>true</skipTests>
                        </configuration>
                    </plugin>

                    <!--用于与 Sonatype Nexus 仓库进行集成，方便在 Maven 构建过程中进行部署和发布操作-->
<!--                    <plugin>-->
<!--                        <groupId>org.sonatype.plugins</groupId>-->
<!--                        <artifactId>nexus-staging-maven-plugin</artifactId>-->
<!--                        <version>${nexus-staging-maven-plugin.version}</version>-->
<!--                        <extensions>true</extensions>-->
<!--                        <configuration>-->
<!--                            <serverId>${server.id.value}</serverId>-->
<!--                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>-->
<!--                            <autoReleaseAfterClose>true</autoReleaseAfterClose>-->
<!--                            <stagingProgressTimeoutMinutes>40</stagingProgressTimeoutMinutes>-->
<!--                        </configuration>-->
<!--                    </plugin>-->
                    <!--Maven编译插件-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!--Javadoc插件，用于生成Javadoc文档-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>

                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!--GPG签名插件-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.4.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <tokenAuth>true</tokenAuth>
                            <autoPublish>true</autoPublish>
                            <waitUntil>published</waitUntil>
                        </configuration>
                    </plugin>

                </plugins>
            </build>

        </profile>
    </profiles>


    <!--    放到电脑本地的maven的setting.xml中去-->
    <!--    <servers>-->
    <!--        <server>-->
    <!--            <id>ossrh</id>-->
    <!--            <username>JIRA账号</username>-->
    <!--            <password>JIRA密码</password>-->
    <!--        </server>-->
    <!--    </servers>-->

    <!--    申请发布 jira https://issues.sonatype.org/browse/OSSRH-98353-->
    <!--    close，release https://s01.oss.sonatype.org/#stagingRepositories-->

    <!--    https://central.sonatype.com/publishing-->


</project>
