<?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>
    <packaging>pom</packaging>

    <groupId>com.github.ollgei</groupId>
    <artifactId>parent</artifactId>
    <version>1.0.0.RC1</version>

    <name>ollgei-parent</name>
    <url>https://github.com/ollgei/ollgei-parents</url>
    <description>parent</description>
    <inceptionYear>2020</inceptionYear>

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

    <scm>
        <url>https://github.com/ollgei/ollgei-parents</url>
        <connection>scm:git:https://github.com/ollgei/ollgei-parents.git</connection>
        <developerConnection>scm:git:https://github.com/ollgei/ollgei-parents.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <!-- ollgei -->
    <mailingLists>
        <mailingList>
            <name>Development List</name>
            <subscribe>ollgei@sina.com</subscribe>
            <unsubscribe>ollgei@sina.com</unsubscribe>
            <post>ollgei@sina.com</post>
        </mailingList>
        <mailingList>
            <name>Commits List</name>
            <subscribe>ollgei@sina.com</subscribe>
            <unsubscribe>ollgei@sina.com</unsubscribe>
            <post>ollgei@sina.com</post>
        </mailingList>
        <mailingList>
            <name>Issues List</name>
            <subscribe>ollgei@sina.com</subscribe>
            <unsubscribe>ollgei@sina.com</unsubscribe>
            <post>ollgei@sina.com</post>
        </mailingList>
    </mailingLists>

    <developers>
        <developer>
            <id>ollgei.github.com</id>
            <name>Ollgei</name>
            <email>ollgei@sina.com</email>
            <url>https://github.com/ollgei</url>
            <organization>Ollgei Software, Inc.</organization>
            <organizationUrl>https://github.com/ollgei</organizationUrl>
        </developer>
    </developers>

    <issueManagement>
        <system>Github Issues</system>
        <url>https://github.com/ollgei/ollgei-parents/issues</url>
    </issueManagement>

    <properties>
        <!-- ollgei -->
        <ollgei-shaded-gson.version>2.8.6</ollgei-shaded-gson.version>
        <ollgei-shaded-guava.version>30.0.jre</ollgei-shaded-guava.version>
        <!-- swagger 2 & 3 -->
        <swagger2.version>2.1.4</swagger2.version>
        <swagger.version>1.5.24</swagger.version>
        <springfox2.version>2.10.5</springfox2.version>
        <springfox3.version>3.0.0</springfox3.version>
        <springdoc.version>1.4.8</springdoc.version>
        <spring4all-swagger.version>1.9.1.RELEASE</spring4all-swagger.version>
        <!-- plugins -->
        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
        <!-- project & plugin configuration -->
        <java.version>1.8</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <!-- privacy -->
        <privacy-snapshot.id>privacy-snapshots</privacy-snapshot.id>
        <privacy-snapshot.url>http://localhost/</privacy-snapshot.url>
        <privacy-release.id>privacy-releases</privacy-release.id>
        <privacy-release.url>http://localhost/</privacy-release.url>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- ollgei -->
            <dependency>
                <groupId>com.github.ollgei</groupId>
                <artifactId>shaded-gson</artifactId>
                <version>${ollgei-shaded-gson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.ollgei</groupId>
                <artifactId>shaded-guava</artifactId>
                <version>${ollgei-shaded-guava.version}</version>
            </dependency>
            <!-- swagger 2 & 3 -->
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-ui</artifactId>
                <version>${springdoc.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-webflux-ui</artifactId>
                <version>${springdoc.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-webmvc-core</artifactId>
                <version>${springdoc.version}</version>
            </dependency>
            <dependency>
                <groupId>com.spring4all</groupId>
                <artifactId>swagger-spring-boot-starter</artifactId>
                <version>${spring4all-swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-boot-starter</artifactId>
                <version>${springfox3.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger-ui</artifactId>
                <version>${springfox2.version}</version>
            </dependency>
            <dependency>
                <groupId>io.swagger.core.v3</groupId>
                <artifactId>swagger-annotations</artifactId>
                <version>${swagger2.version}</version>
            </dependency>
            <dependency>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-annotations</artifactId>
                <version>${swagger.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>dev</id>
            <dependencies>
                <dependency>
                    <groupId>org.springdoc</groupId>
                    <artifactId>springdoc-openapi-ui</artifactId>
                    <version>${springdoc.version}</version>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>dev-webflux</id>
            <dependencies>
                <dependency>
                    <groupId>org.springdoc</groupId>
                    <artifactId>springdoc-openapi-webflux-ui</artifactId>
                    <version>${springdoc.version}</version>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>release</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>${privacy-snapshot.id}</id>
                    <name>Privacy Nexus Snapshots</name>
                    <url>${privacy-snapshot.url}</url>
                </snapshotRepository>
                <repository>
                    <id>${privacy-release.id}</id>
                    <name>Privacy Nexus Repository</name>
                    <url>${privacy-release.url}</url>
                </repository>
            </distributionManagement>
        </profile>
        <profile>
            <id>release-nexus</id>
            <build>
                <plugins>
                    <!-- Javadoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.2.0</version>
                        <configuration>
                            <show>public</show>
                            <nohelp>true</nohelp>
                            <charset>UTF-8</charset>
                            <encoding>UTF-8</encoding>
                            <docencoding>UTF-8</docencoding>
                            <doclint>none</doclint>
                            <doctitle>GitHub Ollgei ${project.version} API</doctitle>
                            <windowtitle>GitHub Ollgei ${project.version} API</windowtitle>
                            <detectJavaApiLink>false</detectJavaApiLink>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadoc</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                    <goal>aggregate</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- GPG -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>attach-gpg</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>

            <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>
        </profile>
    </profiles>
</project>