<?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>top.beanshell</groupId>
    <artifactId>ram-captcha</artifactId>
    <name>ram-captcha</name>
    <version>1.0.0</version>
    <modules>
        <module>ram-captcha-api</module>
        <module>ram-captcha-service</module>
        <module>ram-captcha-dao-api</module>
        <module>ram-captcha-endpoint-console</module>
        <module>ram-captcha-common</module>
        <module>app-config</module>
        <module>app-container</module>
        <module>app-test</module>
        <module>ram-captcha-dao-mybatis</module>
    </modules>

    <packaging>pom</packaging>

    <description>
        Ram project base component for captcha.
    </description>

    <url>https://www.beanshell.top</url>

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

    <scm>
        <connection>https://github.com/mbc3320/ram-captcha.git</connection>
        <url>https://github.com/mbc3320/ram-captcha</url>
    </scm>
    <developers>
        <developer>
            <email>mobinchao@hotmail.com</email>
        </developer>
    </developers>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/mbc3320/ram-captcha/issues</url>
    </issueManagement>

    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <aggregate.report.dir>app-test/target/site/jacoco-aggregate/jacoco.xml</aggregate.report.dir>
        <skipTests>false</skipTests>
        <spring.boot.version>2.3.12.RELEASE</spring.boot.version>
        <ram-bom.version>1.0.2</ram-bom.version>
        <ram-common.version>1.1.0</ram-common.version>
        <ram-config-web.version>1.1.0</ram-config-web.version>
        <ram-config-redis.version>1.0.2</ram-config-redis.version>
        <ram-config-mybatis.version>1.0.2</ram-config-mybatis.version>
        <ram-config-beetlsql.version>1.0.2</ram-config-beetlsql.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>top.beanshell</groupId>
                <artifactId>ram-bom</artifactId>
                <version>${ram-bom.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>top.beanshell</groupId>
                <artifactId>ram-common</artifactId>
                <version>${ram-common.version}</version>
            </dependency>
            <dependency>
                <groupId>top.beanshell</groupId>
                <artifactId>ram-config-web</artifactId>
                <version>${ram-config-web.version}</version>
            </dependency>
            <dependency>
                <groupId>top.beanshell</groupId>
                <artifactId>ram-config-redis</artifactId>
                <version>${ram-config-redis.version}</version>
            </dependency>
            <dependency>
                <groupId>top.beanshell</groupId>
                <artifactId>ram-config-beetlsql</artifactId>
                <version>${ram-config-beetlsql.version}</version>
            </dependency>
            <dependency>
                <groupId>top.beanshell</groupId>
                <artifactId>ram-config-mybatis</artifactId>
                <version>${ram-config-mybatis.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- Javadoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.2.0</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- GPG -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <!-- config of package -->
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.6</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <!-- Source -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <configuration>
                    <skip>false</skip>
                </configuration>
            </plugin>
            <!-- jacoco 单元测试覆盖率统计插件 -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>pre-test</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <!-- deploy config of nexus repository -->
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

</project>