<?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>io.github.limbo-world</groupId>
    <artifactId>flowjob</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>
    <description>flow-job调度框架</description>

    <modules>
        <module>api</module>
        <module>common</module>
        <module>broker-core</module>
        <module>broker-dao</module>
        <module>broker-application</module>
        <module>test</module>
        <module>worker-core</module>
        <module>worker-spring-boot-starter</module>
        <module>worker-spring-boot-demo</module>
    </modules>

    <organization>
        <name>Limbo Studio</name>
        <url>https://github.com/limbo-world</url>
    </organization>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0</url>
            <comments>
                Copyright 2020-2025 the original author or authors.

                Licensed under the Apache License, Version 2.0 (the "License");
                you may not use this file except in compliance with the License.
                You may obtain a copy of the License at

                https://www.apache.org/licenses/LICENSE-2.0

                Unless required by applicable law or agreed to in writing, software
                distributed under the License is distributed on an "AS IS" BASIS,
                WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
                implied.

                See the License for the specific language governing permissions and
                limitations under the License.
            </comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>Brozen</id>
            <name>Brozen Lau</name>
            <email>brozen.lau@gmail.com</email>
            <organization>Limbo Studio</organization>
            <organizationUrl>https://github.com/limbo-world</organizationUrl>
        </developer>
    </developers>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <spring.boot>2.4.6</spring.boot>
        <spring.doc>1.5.6</spring.doc>
        <swagger>2.1.7</swagger>
        <netty>4.1.59.Final</netty>
        <okhttp>3.14.9</okhttp>
        <retrofit2>2.9.0</retrofit2>
        <jackson>2.12.1</jackson>
        <lombok>1.18.16</lombok>
        <slf4j>1.7.30</slf4j>
        <jsr330>1</jsr330>
        <commons.io>2.6</commons.io>
        <commons.collections4>4.4</commons.collections4>
        <junit>4.13.1</junit>
        <mockito>3.6.28</mockito>
        <commons.lang3>3.11</commons.lang3>
        <guava>31.1-jre</guava>
        <cron>9.1.6</cron>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- BOM Start-->
            <dependency>
                <groupId>io.github.limbo-world</groupId>
                <artifactId>flowjob-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.github.limbo-world</groupId>
                <artifactId>flowjob-broker-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.github.limbo-world</groupId>
                <artifactId>flowjob-common</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.github.limbo-world</groupId>
                <artifactId>flowjob-broker-dao</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.github.limbo-world</groupId>
                <artifactId>flowjob-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.github.limbo-world</groupId>
                <artifactId>flowjob-worker-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.github.limbo-world</groupId>
                <artifactId>flowjob-worker-spring-boot-starter</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!-- BOM End-->

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

            <!-- Netty BOM -->
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-bom</artifactId>
                <version>${netty}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- Jackson BOM -->
            <dependency>
                <groupId>com.fasterxml.jackson</groupId>
                <artifactId>jackson-bom</artifactId>
                <version>${jackson}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- JSR & JEE -->
            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>2.0.1.Final</version>
            </dependency>
            <dependency>
                <groupId>javax.enterprise</groupId>
                <artifactId>cdi-api</artifactId>
                <version>1.0</version>
            </dependency>

            <!-- okhttp -->
            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>okhttp</artifactId>
                <version>${okhttp}</version>
            </dependency>
            <dependency>
                <groupId>com.squareup.retrofit2</groupId>
                <artifactId>retrofit</artifactId>
                <version>${retrofit2}</version>
            </dependency>
            <dependency>
                <groupId>com.squareup.retrofit2</groupId>
                <artifactId>converter-gson</artifactId>
                <version>${retrofit2}</version>
            </dependency>

            <!-- SpringDoc接口文档 & SwaggerV3 -->
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-ui</artifactId>
                <version>${spring.doc}</version>
            </dependency>
            <dependency>
                <groupId>org.springdoc</groupId>
                <artifactId>springdoc-openapi-webflux-ui</artifactId>
                <version>${spring.doc}</version>
            </dependency>
            <dependency>
                <groupId>io.swagger.core.v3</groupId>
                <artifactId>swagger-annotations</artifactId>
                <version>${swagger}</version>
            </dependency>

            <!-- Logger -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j}</version>
            </dependency>

            <!-- JSR 330 依赖注入 -->
            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>${jsr330}</version>
            </dependency>

            <!-- Utils -->
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons.io}</version>
            </dependency>
            <dependency>
                <groupId>com.cronutils</groupId>
                <artifactId>cron-utils</artifactId>
                <version>${cron}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>${commons.collections4}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons.lang3}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava}</version>
            </dependency>

            <!-- 单元测试 -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito}</version>
                <scope>test</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.1.2</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>3.3.0</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>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>

        </profile>
    </profiles>

    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

</project>
