<?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.iqiny.silly</groupId>
    <artifactId>silly-parent</artifactId>
    <version>1.1.2-RELEASE</version>

    <modules>
        <module>bom</module>
        <module>common</module>
        <module>core</module>
        <module>activiti-5151</module>
        <module>activiti-5210</module>
        <module>all</module>
        <module>starter</module>
        <module>mybatisplus-233</module>
        <module>mybatisplus-312</module>
        <module>spring</module>
    </modules>
    <packaging>pom</packaging>
    <name>silly-parent</name>
    <description>top silly project pom.xml file</description>
    <url>http://silly.iqiny.com</url>

    <properties>
        <!-- Compiler settings properties -->
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <!-- Maven plugins -->
        <maven.test.skip>false</maven.test.skip>
        <jacoco-maven-plugin.version>0.8.3</jacoco-maven-plugin.version>
        <flatten-maven-plugin.version>1.1.0</flatten-maven-plugin.version>
        <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
        <maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
        <p3c-pmd.version>1.3.6</p3c-pmd.version>
        <maven-pmd-plugin.version>3.8</maven-pmd-plugin.version>
        <maven-javadoc-plugin.version>3.0.0</maven-javadoc-plugin.version>
        <maven-source-plugin.version>2.2.1</maven-source-plugin.version>
        <protobuf-maven-plugin.version>0.5.0</protobuf-maven-plugin.version>
        <license-maven-plugin.version>3.0</license-maven-plugin.version>
        <maven-checkstyle-plugin.version>3.1.1</maven-checkstyle-plugin.version>

    </properties>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>iqiny</id>
            <name>qiny</name>
            <email>qy-1994-2008@163.com.com</email>
            <url>https://gitee.com/iqiny/silly</url>
        </developer>
    </developers>

    <organization>
        <name>iqiny</name>
        <url>https://gitee.com/iqiny/silly</url>
    </organization>

    <issueManagement>
        <system>gitee</system>
        <url>https://gitee.com/iqiny/silly/issues</url>
    </issueManagement>

    <scm>
        <url>https://gitee.com/iqiny/silly</url>
        <connection>https://gitee.com/iqiny/silly.git</connection>
        <developerConnection>https://gitee.com/iqiny/silly</developerConnection>
    </scm>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.iqiny.silly</groupId>
                <artifactId>silly-bom</artifactId>
                <version>1.1.2-RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- license 声明 -->
                    <plugin>
                        <groupId>com.mycila</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <version>${license-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>remove</goal>
                                    <goal>format</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <quiet>true</quiet>
                            <header>${user.dir}/style/copyright</header>
                            <includes>
                                <include>**/src/main/java/**</include>
                                <include>**/src/test/java/**</include>
                            </includes>
                            <excludes>
                                <exclude>**/generated/**</exclude>
                            </excludes>
                            <strictCheck>true</strictCheck>
                            <mapping>
                                <java>SLASHSTAR_STYLE</java>
                            </mapping>
                        </configuration>
                    </plugin>
                    <!-- 发布Jar到Maven仓库 Begin -->
                    <!--生成Source jar文件-->
                    <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>
                    <!--生成Javadoc，关闭doclint,避免注解检查不通过-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <configuration>
                            <charset>UTF-8</charset>
                            <failOnError>false</failOnError>
                            <doclint>none</doclint>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <phase>package</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <!--Maven 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>
                    <!--Nexus Staging Maven插件是将组件部署到oss_silly并将其发布到Central Repository的推荐方法-->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>oss_silly</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <!-- release plugin,用于发布到release仓库部署插件 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>2.4.2</version>
                    </plugin>
                    <!-- 发布Jar到Maven仓库 End -->
                </plugins>
            </build>

            <distributionManagement>
                <snapshotRepository>
                    <id>oss_silly</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>oss_silly</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>

    <build>
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.5.0.Final</version>
            </extension>
        </extensions>
        <plugins>
            <!-- Source -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</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-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M3</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[3.3.9,)</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
