<?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.agentsflex</groupId>
    <artifactId>parent</artifactId>
    <version>${revision}</version>
    <packaging>pom</packaging>

    <name>agents-flex</name>
    <url>https://agentsflex.com</url>
    <description>Agents-Flex is an elegant LLM Application Framework like LangChain with Java.</description>

    <issueManagement>
        <system>Github Issue</system>
        <url>https://github.com/agents-flex/agents-flex/issues</url>
    </issueManagement>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Michael Yang</name>
            <email>fuhai999@gmail.com</email>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
    </developers>
    <scm>
        <url>https://github.com/agents-flex/agents-flex</url>
        <connection>scm:git:https://github.com/agents-flex/agents-flex.git</connection>
        <developerConnection>scm:git:https://github.com/agents-flex/agents-flex.git</developerConnection>
    </scm>

    <modules>
        <module>agents-flex-bom</module>
        <module>agents-flex-core</module>
        <module>agents-flex-llm</module>
        <module>agents-flex-store</module>
        <module>agents-flex-document-parser</module>
        <module>agents-flex-spring-boot-starter</module>
        <module>agents-flex-chain</module>
        <module>agents-flex-image</module>
        <module>agents-flex-rerank</module>
        <module>agents-flex-search-engine</module>
    </modules>

    <properties>
        <!-- Agents-Flex Version -->
        <revision>1.3.4</revision>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <maven-flatten.version>1.3.0</maven-flatten.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <slf4j.version>1.7.29</slf4j.version>
        <junit.version>4.13.2</junit.version>
        <okhttp.version>4.9.3</okhttp.version>
        <fastjson.version>2.0.58</fastjson.version>
        <spring-boot.version>2.7.18</spring-boot.version>
        <kotlin.version>1.8.22</kotlin.version>
    </properties>


    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib</artifactId>
                <version>${kotlin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib-jdk8</artifactId>
                <version>${kotlin.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib-common</artifactId>
                <version>${kotlin.version}</version>
            </dependency>
            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>okhttp</artifactId>
                <version>${okhttp.version}</version>
            </dependency>

            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>okhttp-sse</artifactId>
                <version>${okhttp.version}</version>
            </dependency>

            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>${fastjson.version}</version>
            </dependency>

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

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>

            <!--agents-flex dependency management-->
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-core</artifactId>
                <version>${revision}</version>
            </dependency>

            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-bom</artifactId>
                <version>${revision}</version>
            </dependency>

            <!--document parser start-->
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-document-parser-poi</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-document-parser-pdfbox</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-document-parser-omniparse</artifactId>
                <version>${revision}</version>
            </dependency>
            <!--document parser end-->


            <!--image model start-->
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-image-gitee</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-image-openai</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-image-qianfan</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-image-qwen</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-image-siliconflow</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-image-stability</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-image-tencent</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-image-volcengine</artifactId>
                <version>${revision}</version>
            </dependency>
            <!--image model end-->


            <!--llm start-->
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-llm-chatglm</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-llm-coze</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-llm-deepseek</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-llm-gitee</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-llm-ollama</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-llm-openai</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-llm-qianfan</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-llm-qwen</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-llm-siliconflow</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-llm-spark</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-llm-tencent</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-llm-vllm</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-llm-volcengine</artifactId>
                <version>${revision}</version>
            </dependency>
            <!--llm end-->

            <!--chains start-->
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-chain-qlexpress</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-chain-groovy</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-chain-js</artifactId>
                <version>${revision}</version>
            </dependency>
            <!--chains end-->

            <!-- rerank start -->
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-rerank</artifactId>
                <version>${revision}</version>
            </dependency>

            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-rerank-default</artifactId>
                <version>${revision}</version>
            </dependency>

            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-rerank-gitee</artifactId>
                <version>${revision}</version>
            </dependency>
            <!-- rerank end -->


            <!--store start-->
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-store-aliyun</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-store-chroma</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-store-elasticsearch</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-store-milvus</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-store-opensearch</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-store-pgvector</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-store-qcloud</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-store-qdrant</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-store-redis</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-store-vectorex</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-store-vectorexdb</artifactId>
                <version>${revision}</version>
            </dependency>
            <!--store end-->

            <!--starter start-->
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-spring-boot-starter</artifactId>
                <version>${revision}</version>
            </dependency>
            <!--starter end-->

            <!--starter start-->
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-search-engine</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-search-engine-service</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-search-engine-es</artifactId>
                <version>${revision}</version>
            </dependency>
            <dependency>
                <groupId>com.agentsflex</groupId>
                <artifactId>agents-flex-search-engine-lucene</artifactId>
                <version>${revision}</version>
            </dependency>
            <!--starter end-->
        </dependencies>
    </dependencyManagement>


    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
        </resources>

        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>flatten-maven-plugin</artifactId>
                <version>${maven-flatten.version}</version>
                <configuration>
                    <updatePomFile>true</updatePomFile>
                    <flattenMode>oss</flattenMode>
                </configuration>
                <executions>
                    <execution>
                        <id>flatten</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>flatten</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>flatten.clean</id>
                        <phase>clean</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>


            <!-- Source -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                    <windowtitle>AgentsFlex</windowtitle>
                    <doctitle>AgentsFlex</doctitle>
                    <show>private</show>
                    <detectLinks>false</detectLinks>
                    <detectOfflineLinks>true</detectOfflineLinks>
                    <linksource>true</linksource>
                    <additionalparam>-Xdoclint:none</additionalparam>
                    <detectJavaApiLink>true</detectJavaApiLink>
                    <source>8</source>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Javadoc -->
            <!-- Gpg Signature -->
            <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>

            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.7.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>true</autoPublish>
                </configuration>
            </plugin>

        </plugins>
    </build>


    <!-- 跳过测试：mvn package -Dmaven.test.skip=true   -->
    <!-- 检测依赖最新版本：mvn versions:display-dependency-updates  -->
    <!-- 统一修改版本号：mvn versions:set -DnewVersion=3.0  -->
    <!-- mvn -N versions:update-child-modules  -->
    <!-- mvn versions:set -DnewVersion=2.0 -DprocessAllModules=true -DallowSnapshots=true -->

    <!-- mvn clean source:jar install -->
    <!-- mvn deploy -Dmaven.test.skip=true -e -P release -->
    <!-- mvn deploy -e -->

    <distributionManagement>
        <snapshotRepository>
            <id>central</id>
            <url>https://central.sonatype.com/</url>
        </snapshotRepository>
    </distributionManagement>

</project>
