<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.2.4</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <groupId>com.codingapi.springboot</groupId>
    <artifactId>springboot-parent</artifactId>
    <version>3.2.0</version>

    <url>https://github.com/codingapi/springboot-framewrok</url>
    <name>springboot-parent</name>
    <description>springboot-parent project for Spring Boot</description>

    <properties>
        <java.version>17</java.version>

        <!-- maven properties-->
        <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
        <maven.compile.source>17</maven.compile.source>
        <maven.compile.target>17</maven.compile.target>
        <maven.source.plugin>3.0.1</maven.source.plugin>
        <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
        <maven.javadoc.plugin>3.6.1</maven.javadoc.plugin>
        <nexus.staging.maven.plugin>1.6.13</nexus.staging.maven.plugin>
        <maven.gpg.plugin>3.1.0</maven.gpg.plugin>
        <codingapi.framework.version>${project.version}</codingapi.framework.version>
        <fastjson.version>2.0.42</fastjson.version>
        <jsonwebtoken.jjwt.version>0.12.5</jsonwebtoken.jjwt.version>
        <commons-io.version>2.15.0</commons-io.version>
        <commons-dbutils.version>1.8.1</commons-dbutils.version>
        <commons-text.version>1.11.0</commons-text.version>
        <org.reflections.version>0.10.2</org.reflections.version>
        <perf4j.version>0.9.16</perf4j.version>
        <bcprov-jdk18on.version>1.77</bcprov-jdk18on.version>
        <commons-crypto.version>1.2.0</commons-crypto.version>
        <snakeyaml.version>2.2</snakeyaml.version>
        <apache-groovy.version>4.0.15</apache-groovy.version>
        <h2.version>2.2.224</h2.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>


        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>${h2.version}</version>
            </dependency>


            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk18on</artifactId>
                <version>${bcprov-jdk18on.version}</version>
            </dependency>

            <dependency>
                <groupId>org.reflections</groupId>
                <artifactId>reflections</artifactId>
                <version>${org.reflections.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-crypto</artifactId>
                <version>${commons-crypto.version}</version>
            </dependency>

            <dependency>
                <groupId>org.perf4j</groupId>
                <artifactId>perf4j</artifactId>
                <version>${perf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>${fastjson.version}</version>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>

            <dependency>
                <groupId>io.jsonwebtoken</groupId>
                <artifactId>jjwt-api</artifactId>
                <version>${jsonwebtoken.jjwt.version}</version>
            </dependency>

            <dependency>
                <groupId>io.jsonwebtoken</groupId>
                <artifactId>jjwt-impl</artifactId>
                <version>${jsonwebtoken.jjwt.version}</version>
            </dependency>

            <dependency>
                <groupId>io.jsonwebtoken</groupId>
                <artifactId>jjwt-jackson</artifactId>
                <version>${jsonwebtoken.jjwt.version}</version>
            </dependency>

            <dependency>
                <groupId>com.codingapi.springboot</groupId>
                <artifactId>springboot-starter</artifactId>
                <version>${codingapi.framework.version}</version>
            </dependency>

            <dependency>
                <groupId>com.codingapi.springboot</groupId>
                <artifactId>springboot-starter-security</artifactId>
                <version>${codingapi.framework.version}</version>
            </dependency>

            <dependency>
                <groupId>com.codingapi.springboot</groupId>
                <artifactId>springboot-starter-id-generator</artifactId>
                <version>${codingapi.framework.version}</version>
            </dependency>

            <dependency>
                <groupId>com.codingapi.springboot</groupId>
                <artifactId>springboot-starter-data-fast</artifactId>
                <version>${codingapi.framework.version}</version>
            </dependency>

            <dependency>
                <groupId>commons-dbutils</groupId>
                <artifactId>commons-dbutils</artifactId>
                <version>${commons-dbutils.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-text</artifactId>
                <version>${commons-text.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.groovy</groupId>
                <artifactId>groovy</artifactId>
                <version>${apache-groovy.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.groovy</groupId>
                <artifactId>groovy-json</artifactId>
                <version>${apache-groovy.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.groovy</groupId>
                <artifactId>groovy-xml</artifactId>
                <version>${apache-groovy.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>
                <configuration>
                    <source>${maven.compile.source}</source>
                    <target>${maven.compile.target}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <compilerArgument>-Xlint:deprecation</compilerArgument>
                </configuration>
            </plugin>
        </plugins>
    </build>


    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <scm>
        <connection>scm:git:https://github.com/codingapi/springboot-framework.git</connection>
        <developerConnection>scm:git:https://github.com/codingapi/springboot-framework.git</developerConnection>
        <url>https://github.com/codingapi/springboot-framework</url>
        <tag>v${project.version}</tag>
    </scm>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>lorne</name>
            <email>wangliang@codingapi.com</email>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
    </developers>

    <profiles>
        <profile>
            <id>dev</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>springboot-starter</module>
                <module>springboot-starter-security</module>
                <module>springboot-starter-data-fast</module>
            </modules>
        </profile>

        <!-- mvn clean test -P travis-->
        <profile>
            <id>travis</id>

            <modules>
                <module>springboot-starter</module>
                <module>springboot-starter-security</module>
                <module>springboot-starter-data-fast</module>
            </modules>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.8.9</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.openclover</groupId>
                        <artifactId>clover-maven-plugin</artifactId>
                        <version>4.4.1</version>
                        <configuration>
                            <generateHtml>true</generateHtml>
                            <generateXml>true</generateXml>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>

        <profile>
            <!-- mvn clean deploy -P ossrh  -->
            <!-- gpg: signing failed: Inappropriate ioctl for device -->
            <!-- fix command : export GPG_TTY=$(tty)  -->
            <!-- https://github.com/keybase/keybase-issues/issues/2798 -->
            <id>ossrh</id>

            <modules>
                <module>springboot-starter</module>
                <module>springboot-starter-security</module>
                <module>springboot-starter-data-fast</module>
            </modules>



            <build>
                <plugins>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>${maven-compiler-plugin.version}</version>
                        <configuration>
                            <source>${maven.compile.source}</source>
                            <target>${maven.compile.target}</target>
                            <encoding>${project.build.sourceEncoding}</encoding>
                            <compilerArgument>-Xlint:deprecation</compilerArgument>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>


                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.13</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>


                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <additionalOptions>
                                <additionalOption>-Xdoclint:none</additionalOption>
                            </additionalOptions>
                        </configuration>
                    </plugin>


                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>


    </profiles>

</project>
