<?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>com.github.taccisum</groupId>
    <artifactId>pigeon-parent</artifactId>
    <version>0.1</version>
    <packaging>pom</packaging>

    <name>Pigeon BOM</name>
    <description>Manage common dependencies and profiles between pigeon and it's plugins.</description>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://mit-license.org/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <url>https://github.com/pigeon-cp/pigeon-parent</url>

    <developers>
        <developer>
            <name>taccisum</name>
            <email>514162920@qq.com</email>
            <url>https://taccisum.github.io</url>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/pigeon-cp/pigeon-parent</url>
        <connection>https://github.com/pigeon-cp/pigeon-parent.git</connection>
        <developerConnection>https://github.com/pigeon-cp</developerConnection>
    </scm>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>

        <!-- core dependencies version -->
        <spring-boot.version>2.3.0.RELEASE</spring-boot.version>
        <guava.version>30.1-jre</guava.version>
        <domain-core.version>0.4.0</domain-core.version>
        <pf4j-spring.version>0.7.0</pf4j-spring.version>
        <pf4j.version>3.6.0</pf4j.version>
        <commons-csv.version>1.9.0</commons-csv.version>
        <commons-io.version>2.11.0</commons-io.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.pf4j</groupId>
            <artifactId>pf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.pf4j</groupId>
            <artifactId>pf4j-spring</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.github.taccisum</groupId>
            <artifactId>domain-core</artifactId>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.pf4j</groupId>
                <artifactId>pf4j</artifactId>
                <version>${pf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.pf4j</groupId>
                <artifactId>pf4j-spring</artifactId>
                <version>${pf4j-spring.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.taccisum</groupId>
                <artifactId>domain-core</artifactId>
                <version>${domain-core.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.taccisum</groupId>
                <artifactId>pigeon-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-csv</artifactId>
                <version>${commons-csv.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>

            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-parent</artifactId>
                <version>${spring-boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>release</id>
            <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</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>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>gpg</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <generatePom>true</generatePom>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
</project>