<?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">
<!--    <parent>-->
<!--        <artifactId>nuls-sdk</artifactId>-->
<!--        <groupId>io.nuls.sdk</groupId>-->
<!--        <version>1.2.1</version>-->
<!--    </parent>-->

    <modelVersion>4.0.0</modelVersion>
    <groupId>io.nuls.sdk</groupId>
    <artifactId>sdk-contract-vm</artifactId>
    <version>2.1.0.RELEASE</version>

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

    <!--<distributionManagement>
        <repository>
            <id>maven-releases</id>
            <url>http://nexus.nuls.center/nexus/content/repositories/releases/</url>
        </repository>
        <snapshotRepository>
            <id>maven-snapshots</id>
            <url>http://nexus.nuls.center/nexus/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>-->

        <parent>
            <groupId>org.sonatype.oss</groupId>
            <artifactId>oss-parent</artifactId>
            <version>7</version>
        </parent>
        <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>
            <tag>2.1.0.RELEASE</tag>
            <url>https://github.com/nuls-io/nuls-sdk</url>
            <connection>https://github.com/nuls-io/nuls-sdk.git</connection>
            <developerConnection>https://nuls.io</developerConnection>
        </scm>
        <developers>
            <developer>
                <name>PierreLuo</name>
                <email>luohao@nuls.io</email>
                <organization>nuls-io</organization>
            </developer>
        </developers>
        <distributionManagement>
            <snapshotRepository>
                <!-- 这个id需要在setting.xml中设置  -->
                <id>ossrh</id>
                <name>OSS Snapshots Repository</name>
                <!-- 这里的url就是Issue中回复的snapshots 的repo地址-->
                <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            </snapshotRepository>
            <repository>
                <id>ossrh</id>
                <name>OSS Staging Repository</name>
                <!-- 这里的url就是Issue中回复的staging 的repo地址-->
                <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
            </repository>
        </distributionManagement>
        <profiles>
            <profile>
                <id>disable-javadoc-doclint</id>
                <activation>
                    <jdk>[1.8,)</jdk>
                </activation>
                <!-- java8版本导致javadoc打包编译失败时候，添加-->
                <properties>
                    <javadoc.opts>-Xdoclint:none</javadoc.opts>
                </properties>
            </profile>

            <profile>
                <id>release</id>
                <build>
                    <plugins>

                        <plugin>
                            <groupId>org.sonatype.plugins</groupId>
                            <artifactId>nexus-staging-maven-plugin</artifactId>
                            <version>1.6.8</version>
                            <extensions>true</extensions>
                            <configuration>
                                <serverId>ossrh</serverId>
                                <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                                <autoReleaseAfterClose>true</autoReleaseAfterClose>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-release-plugin</artifactId>
                            <version>2.3.2</version>
                            <configuration>
                                <autoVersionSubmodules>true</autoVersionSubmodules>
                                <useReleaseProfile>false</useReleaseProfile>
                                <releaseProfiles>release</releaseProfiles>
                                <goals>deploy</goals>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <version>3.0</version>
                            <configuration>
                                <source>1.8</source>
                                <target>1.8</target>
                            </configuration>
                        </plugin>
                        <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>
                        <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-javadoc-plugin</artifactId>
                            <version>2.10.4</version>
                            <executions>
                                <execution>
                                    <id>attach-javadocs</id>
                                    <phase>package</phase>
                                    <goals>
                                        <goal>jar</goal>
                                    </goals>
                                    <!-- java8版本导致javadoc打包编译失败时候，添加-->
                                    <configuration>
                                        <additionalparam>${javadoc.opts}</additionalparam>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </build>
            </profile>
        </profiles>
</project>