<?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>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.3.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <groupId>cn.iofan</groupId>
    <artifactId>dutool-spring-boot-starter</artifactId>
    <version>1.0.0</version>

    <name>dutool-spring-boot-starter</name>
    <url>https://github.com/allen198411/dutool</url>
    <description>common tools</description>

    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>4.0.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>4.0.1</version>
        </dependency>

        <!-- 解决编译时，报程序包javax.servlet不存在的错误 -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>4.0.1</version>
            <!-- 只在编译和测试的时候用 -->
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

    </dependencies>

    <!--licenses信息-->
    <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信息-->
    <scm>
        <url>https://github.com/allen198411/dutool</url>
        <connection>https://github.com/allen198411/dutool.git</connection>
        <developerConnection>https://github.com/allen198411</developerConnection>
    </scm>

    <!--发布者信息-->
    <developers>
        <developer>
            <name>allen</name>
            <email>allen@qq.com</email>
            <url>https://github.com/allen198411</url>
        </developer>
    </developers>

    <!-- 发布管理信息 -->
    <distributionManagement>
        <repository>
            <!-- 这里的id必须要和全局配置中的release id 一致 -->
            <id>releases</id>
            <name>Nexus Release Repository</name>
            <!-- 这里就是在创建issue成功后，对方回复的release发布地址-->
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <!-- 这里的id必须要和全局配置中的snapshot id 一致 -->
            <id>snapshots</id>
            <name>Nexus Snapshot Repository</name>
            <!-- 这里就是在创建issue成功后，对方回复的snapshot发布地址-->
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!--staging puglin,用于自动执行发布阶段(免手动)-->
                    <!--                    <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>-->
                    <!-- resources plugin,Maven 资源插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- doc plugin,Maven API文档生成插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <!-- java8版本导致javadoc打包编译失败时候，添加-->
                                <configuration>
                                    <failOnError>false</failOnError>
                                    <doclint>none</doclint>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- gpg plugin,用于签名认证 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- compiler plugin,Maven 编译插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.1</version>
                        <configuration>
                            <source>1.8</source>
                            <target>1.8</target>
                        </configuration>
                    </plugin>
                    <!-- release plugin,用于发布到release仓库部署插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5.3</version>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <repository>
                    <id>releases</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>

                <snapshotRepository>
                    <id>snapshots</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>
    </profiles>



</project>