<?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>cn.bitfactory</groupId>
    <artifactId>bif-root</artifactId>
    <version>1.0.0</version>
    <modules>
        <module>bif-encryption</module>
        <module>bif-protocol-v4</module>
        <module>bif-core</module>
    </modules>

    <packaging>pom</packaging>
    <name>bif-root</name>
    <description>bif root</description>
    <url>https://github.com/caict-4iot-dev/bif-root</url>
    <!--开源协议...-->
    <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>
    <!--开发者信息-->
    <developers>
        <developer>
            <id>guoshijie</id>
            <name>guoshijie</name>
            <email>guoshijie@caict.ac.cn</email>
            <roles>
                <role>Project Manager</role>
                <role>Architect</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
    </developers>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
    </properties>

    <!--项目在github或其它托管平台的地址-->
    <scm>
        <connection>https://github.com/caict-4iot-dev/bif-root.git</connection>
        <developerConnection>scm:git:ssh://git@github.com:caict-4iot-dev/bif-root.git</developerConnection>
        <url>https://github.com/caict-4iot-dev/bif-root</url>
    </scm>

    <profiles>
        <profile>
            <!--注意,此id必须与setting.xml中指定的一致,不要自作聪明改它名字-->
            <id>release</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <!--发布到中央SNAPSHOT仓库插件-->
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.5.3</version>
                        <configuration>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <useReleaseProfile>false</useReleaseProfile>
                            <releaseProfiles>release</releaseProfiles>
                            <goals>deploy</goals>
                        </configuration>
                    </plugin>
                    <!--                    <plugin>-->
                    <!--                        <groupId>org.sonatype.plugins</groupId>-->
                    <!--                        <artifactId>nexus-staging-maven-plugin</artifactId>-->
                    <!--                        <version>1.6.7</version>-->
                    <!--                        <extensions>true</extensions>-->
                    <!--                        <configuration>-->
                    <!--                            <serverId>snapshot</serverId>-->
                    <!--                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>-->
                    <!--                            <autoReleaseAfterClose>true</autoReleaseAfterClose>-->
                    <!--                        </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>

                    <!--生成API文档插件-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <!-- JDK8必须使用下面的配置 -->
                                <configuration>
                                    <encoding>UTF-8</encoding>
                                    <charset>UTF-8</charset>
                                    <additionalparam>-Xdoclint:none</additionalparam>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <!--gpg插件-->
                    <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>

                </plugins>
            </build>

            <distributionManagement>
                <snapshotRepository>
                    <!--注意,此id必须与setting.xml中指定的一致-->
                    <id>release</id>
                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>release</id>
                    <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>
</project>
