<?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>xyz.xpcoder.common.retrofit2</groupId>
    <artifactId>converter-fastjson</artifactId>
    <version>1.0</version>

    <name>converter-fastjson</name>
    <description>retrofit2 converter-fastjson</description>
    <url>https://github.com/xp-code/converter-fastjson</url>
    <organization>
        <name>xp-coder</name>
        <url>https://github.com/xp-code</url>
    </organization>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:xp-code/converter-fastjson.git</connection>
        <developerConnection>scm:git:git@github.com:xp-code/converter-fastjson.git</developerConnection>
        <url>https://github.com/xp-code/converter-fastjson</url>
    </scm>

    <developers>
        <developer>
            <name>xpcoder</name>
            <email>xpcoder823@gmail.com</email>
        </developer>
    </developers>

    <properties>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
        <maven-compiler-plugin.version>3.6.2</maven-compiler-plugin.version>

        <mockwebserver.version>3.10.0</mockwebserver.version>
        <junit.version>4.12</junit.version>
        <junit.jupiter.version>5.2.0</junit.jupiter.version>
        <junit.vintage.version>${junit.version}.0</junit.vintage.version>
        <junit.platform.version>1.2.0</junit.platform.version>

        <fastjson.version>1.2.49</fastjson.version>
        <retrofit.version>2.4.0</retrofit.version>

        <gpg.executable>gpg2</gpg.executable>

    </properties>


    <dependencies>

        <dependency>
            <groupId>com.squareup.retrofit2</groupId>
            <artifactId>retrofit</artifactId>
            <version>${retrofit.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>${fastjson.version}</version>
            <optional>true</optional>
        </dependency>

        <!--test start-->

        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>mockwebserver</artifactId>
            <version>${mockwebserver.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
            <version>${junit.version}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
            <version>${junit.jupiter.version}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
            <version>${junit.jupiter.version}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-engine</artifactId>
            <version>${junit.platform.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>${junit.platform.version}</version>
            <scope>test</scope>
        </dependency>

        <!--test end-->

    </dependencies>

    <profiles>
        <profile>
            <id>oss</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>

            <build>
                <plugins>
                    <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.9.1</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>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>oss</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>oss</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>

        </profile>
    </profiles>


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.7</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>oss</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <!--<plugin>-->
                <!--<artifactId>maven-surefire-plugin</artifactId>-->
                <!--<version>2.19.1</version>-->
                <!--<configuration>-->
                    <!--<includes>-->
                        <!--<include>**/Test*.java</include>-->
                        <!--<include>**/*Test.java</include>-->
                        <!--<include>**/*Tests.java</include>-->
                        <!--<include>**/*TestCase.java</include>-->
                    <!--</includes>-->
                    <!--<properties>-->
                        <!--&lt;!&ndash; <includeTags>fast</includeTags> &ndash;&gt;-->
                        <!--<excludeTags>slow</excludeTags>-->
                        <!--&lt;!&ndash;-->
                        <!--<configurationParameters>-->
                            <!--junit.jupiter.conditions.deactivate = *-->
                        <!--</configurationParameters>-->
                        <!--&ndash;&gt;-->
                    <!--</properties>-->
                <!--</configuration>-->
                <!--<dependencies>-->
                    <!--<dependency>-->
                        <!--<groupId>org.junit.platform</groupId>-->
                        <!--<artifactId>junit-platform-surefire-provider</artifactId>-->
                        <!--<version>${junit.platform.version}</version>-->
                    <!--</dependency>-->
                <!--</dependencies>-->
            <!--</plugin>-->
        </plugins>
    </build>
</project>