<?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">

    <description>
        1. 常用工具集模块
    </description>

    <version>1.3.2</version>
    <groupId>com.iteaj</groupId>
    <artifactId>iutils</artifactId>

    <name>iutils</name>
    <packaging>jar</packaging>
    <modelVersion>4.0.0</modelVersion>
    <url>https://gitee.com/iteaj/iutils</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
        <url>https://gitee.com/iteaj/iutils</url>
        <connection>scm:git:https://gitee.com/iteaj/iutils.git</connection>
        <developerConnection>scm:git:https://gitee.com/iteaj/iutils.git</developerConnection>
    <tag>HEAD</tag>
  </scm>

    <developers>
        <developer>
            <name>iteaj</name>
            <email>iteaj@outlook.com</email>
            <url>http://www.iteaj.com</url>
        </developer>
    </developers>

    <properties>
        <encoding>UTF-8</encoding>
        <scope>provided</scope>
        <slf4j.version>1.7.32</slf4j.version>
        <jackson.version>2.12.5</jackson.version>
        <fastjson.version>1.2.78</fastjson.version>
        <httpclient.version>4.5.13</httpclient.version>
        <spring.version>3.2.18.RELEASE</spring.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

    <dependencies>

        <dependency>
            <optional>true</optional>
            <artifactId>httpclient</artifactId>
            <version>${httpclient.version}</version>
            <groupId>org.apache.httpcomponents</groupId>
        </dependency>

        <dependency>
            <optional>true</optional>
            <artifactId>httpmime</artifactId>
            <version>${httpclient.version}</version>
            <groupId>org.apache.httpcomponents</groupId>
        </dependency>

        <!-- Json -->
        <dependency>
            <optional>true</optional>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>${fastjson.version}</version>
        </dependency>

        <dependency>
            <optional>true</optional>
            <version>${jackson.version}</version>
            <artifactId>jackson-databind</artifactId>
            <groupId>com.fasterxml.jackson.core</groupId>
        </dependency>

        <!-- logger -->
        <dependency>
            <scope>${scope}</scope>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <!-- javax -->
        <dependency>
            <version>3.1.0</version>
            <optional>true</optional>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>

        <dependency>
            <scope>${scope}</scope>
            <groupId>com.sun.mail</groupId>
            <artifactId>javax.mail</artifactId>
            <version>1.5.6</version>
        </dependency>

        <!-- spring -->
        <dependency>
            <optional>true</optional>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
            <groupId>org.springframework</groupId>
            <exclusions>
                <exclusion>
                    <artifactId>spring-aop</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>spring-beans</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-expression</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <scope>test</scope>
            <version>4.12</version>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
    </dependencies>
    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>https://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.5</version>
                <configuration>
                    <skip>true</skip>
                </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-release-plugin</artifactId>
                <configuration>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <useReleaseProfile>false</useReleaseProfile>
                    <arguments>-Poss-release</arguments>
                    <providerImplementations>
                        <git>jgit</git>
                    </providerImplementations>
                    <username>${gitee.user}</username>
                    <password>${gitee.password}</password>
                    <tagBase>${project.version}-release</tagBase>
<!--                    <goals>-f pom.xml deploy</goals>-->
                </configuration>
                <dependencies>
                    <dependency>
                        <version>1.9.5</version>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-jgit</artifactId>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <properties>
                <scope>provided</scope>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>sonatype-nexus-staging</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>

                        <configuration>
                            <doclint>none</doclint>
                            <failOnError>false</failOnError>
                            <encoding>${chartset.UTF8}</encoding>
                            <charset>${chartset.UTF8}</charset>
                            <docencoding>${chartset.UTF8}</docencoding>
                        </configuration>
                    </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>
                        <configuration>
                            <passphrase>${gpg.passphrase}</passphrase>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
