﻿<!--  Licensed to the Apache Software Foundation (ASF) under one or more contributor
    license agreements. See the NOTICE file distributed with this work for additional
    information regarding copyright ownership. The ASF licenses this file to
    you 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 http://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.  -->
<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>

    <!-- From apache: "Most projects will want to override some of these settings." -->
    <!-- for more information, see the documentation of this POM: http://maven.apache.org/pom/asf/ -->

    <groupId>ai.platon</groupId>
    <artifactId>pulsar-dependencies</artifactId>
    <name>Pulsar Dependencies</name>
    <version>4.9.3</version>
    <packaging>pom</packaging>

    <description>Pulsar Dependencies</description>

    <url>https://platon.ai</url>
    <inceptionYear>2014</inceptionYear>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <organization>
        <name>Enable AI to browse the web</name>
        <url>https://platon.ai</url>
    </organization>
    <developers>
        <developer>
            <name>Vincent Zhang</name>
            <email>ivincent.zhang@gmail.com</email>
            <organization>platon.ai</organization>
            <timezone>+8</timezone>
        </developer>
    </developers>
    <issueManagement>
        <system>GitHub</system>
        <url>https://www.github.com/platonai</url>
    </issueManagement>
    <scm>
        <connection>scm:git:https://github.com/platonai/Browser4.git</connection>
        <developerConnection>scm:git:https://github.com/platonai/Browser4.git</developerConnection>
        <url>https://github.com/platonai/Browser4.git</url>
    </scm>

    <distributionManagement>
        <repository>
            <id>central</id>
            <url>https://central.sonatype.com/api/v1/publisher</url>
        </repository>
    </distributionManagement>

    <dependencyManagement>
        <dependencies>

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

            <dependency>
                <groupId>org.jetbrains.kotlinx</groupId>
                <artifactId>kotlinx-coroutines-bom</artifactId>
                <version>${kotlin.coroutine.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-bom</artifactId>
                <version>${kotlin.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- Source: https://mvnrepository.com/artifact/com.google.guava/guava-bom -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava-bom</artifactId>
                <version>${guava.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-serialization</artifactId>
                <version>${kotlin.version}</version>
            </dependency>

            <!--  Tika for general document parsers  -->
            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-core</artifactId>
                <version>${tika.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-parser-html-module</artifactId>
                <version>${tika.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-parsers</artifactId>
                <version>${tika.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.jsoup</groupId>
                        <artifactId>jsoup</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>dev.langchain4j</groupId>
                <artifactId>langchain4j-bom</artifactId>
                <version>${langchain4j.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-text</artifactId>
                <version>${commons-text.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-math3</artifactId>
                <version>${commons-math3.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>${commons-collections4.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>${commons-logging.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>${commons-compress.version}</version>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-numbers-bom -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-numbers-bom</artifactId>
                <version>${commons-numbers-bom.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpcore</artifactId>
                <version>${httptrove4j-core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${httpclient.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>io.ktor</groupId>
                <artifactId>ktor-client-core</artifactId>
                <version>${ktor.version}</version>
            </dependency>
            <dependency>
                <groupId>io.ktor</groupId>
                <artifactId>ktor-client-core-jvm</artifactId>
                <version>${ktor.version}</version>
            </dependency>
            <dependency>
                <groupId>io.ktor</groupId>
                <artifactId>ktor-client-cio-jvm</artifactId>
                <version>${ktor.version}</version>
            </dependency>
            <dependency>
                <groupId>io.ktor</groupId>
                <artifactId>ktor-client-websockets</artifactId>
                <version>${ktor.version}</version>
            </dependency>
            <dependency>
                <groupId>io.ktor</groupId>
                <artifactId>ktor-client-cio</artifactId>
                <version>${ktor.version}</version>
            </dependency>
            <dependency>
                <groupId>io.ktor</groupId>
                <artifactId>ktor-serialization-kotlinx-json-jvm</artifactId>
                <version>${ktor.version}</version>
            </dependency>

            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>okhttp</artifactId>
                <version>4.12.0</version>
            </dependency>

            <!--  Commander line parser  -->
            <dependency>
                <groupId>com.beust</groupId>
                <artifactId>jcommander</artifactId>
                <version>${jcommander.version}</version>
            </dependency>
            <!--  Expression  -->
            <dependency>
                <groupId>com.udojava</groupId>
                <artifactId>EvalEx</artifactId>
                <version>${EvalEx.version}</version>
            </dependency>

            <!--  Logging, Tracking, Metrics  -->
            <!--  System monitor  -->
            <dependency>
                <groupId>com.github.oshi</groupId>
                <artifactId>oshi-core</artifactId>
                <version>${oshi-trove4j-core.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-core</artifactId>
                <version>${metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-graphite</artifactId>
                <version>${metrics.version}</version>
            </dependency>

            <dependency>
                <groupId>org.nibor.autolink</groupId>
                <artifactId>autolink</artifactId>
                <version>${autolink.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mockito.kotlin</groupId>
                <artifactId>mockito-kotlin</artifactId>
                <version>${mockito-kotlin.version}</version>
                <scope>test</scope>
            </dependency>

            <!-- MockBean and SpyBean, but for MockK instead of Mockito -->
            <!-- Be careful to keep consistent with spring-boot -->
            <!-- MockK for Kotlin-friendly mocking -->
            <dependency>
                <groupId>io.mockk</groupId>
                <artifactId>mockk</artifactId>
                <version>${mockk.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.mockk</groupId>
                <artifactId>mockk-jvm</artifactId>
                <version>${mockk.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.ninja-squad</groupId>
                <artifactId>springmockk</artifactId>
                <version>${springmockk.version}</version>
                <scope>test</scope>
            </dependency>

            <!-- Platon dependency -->
            <dependency>
                <groupId>ai.platon.pulsar</groupId>
                <artifactId>pulsar-h2</artifactId>
                <version>${pulsar-h2.version}</version>
            </dependency>
            <dependency>
                <groupId>ai.platon.pulsar</groupId>
                <artifactId>pulsar-jsoup</artifactId>
                <version>${pulsar-jsoup.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <properties>
        <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
        <central-publishing-maven-plugin.version>0.10.0</central-publishing-maven-plugin.version>
        <!-- Apache common libraries -->
        <!-- managed by spring-boot-dependencies -->
        <commons-io.version>2.16.1</commons-io.version>
        <commons-codec.version>1.17.0</commons-codec.version>
        <commons-text.version>1.11.0</commons-text.version>
        <commons-math3.version>3.6.1</commons-math3.version>
        <commons-numbers-bom.version>1.1</commons-numbers-bom.version>
        <commons-collections4.version>4.4</commons-collections4.version>
        <commons-logging.version>1.3.2</commons-logging.version>
        <commons-compress.version>1.26.2</commons-compress.version>

        <oshi-trove4j-core.version>6.6.6</oshi-trove4j-core.version>

        <xercesImpl.version>2.12.2</xercesImpl.version>
        <trove4j-core.version>3.3.1</trove4j-core.version>
        <trove4j.version>3.3.1</trove4j.version>
        <jodd-trove4j-core.version>3.5.2</jodd-trove4j-core.version>

        <!--  HTML parsing  -->
        <xerces.version>2.11.0</xerces.version>
        <nekohtml.version>1.9.22</nekohtml.version>
        <tika.version>2.9.0</tika.version>

        <!-- Web server -->
        <httptrove4j-core.version>4.4.15</httptrove4j-core.version>
        <httpclient.version>4.5.13</httpclient.version>

        <!-- keep consistent with io.modelcontextprotocol:kotlin-sdk-core-jvm:jar:0.8.1 -->
        <ktor.version>3.2.3</ktor.version>

        <EvalEx.version>2.0</EvalEx.version>
        <jcommander.version>1.82</jcommander.version>

        <guava.version>33.6.0-jre</guava.version>

        <!-- AI -->
        <langchain4j.version>1.15.0</langchain4j.version>

        <!--  Misc Dependencies  -->
        <autolink.version>0.11.0</autolink.version>

        <!--  metrics analyze  -->
        <oshi.version>6.4.13</oshi.version>
        <!-- Dropwizard Metrics is an older, robust library, best for JVM-specific monitoring,
        but it lacks the dimensional (tagged) metrics and cloud-native integrations found in Micrometer. -->
        <metrics.version>4.2.12</metrics.version>

        <!-- Mockito is a popular and widely-used mocking framework for unit testing in Java. -->
        <!-- managed by spring-boot-dependencies -->
        <mockito-kotlin.version>5.4.0</mockito-kotlin.version>
        <!-- MockK is a powerful and flexible mocking library designed specifically for Kotlin. -->

        <junit5.version>5.12.1</junit5.version>
        <mockk.version>1.14.6</mockk.version>
        <springmockk.version>4.0.2</springmockk.version>
        <mockito-junit-jupiter.version>5.20.0</mockito-junit-jupiter.version>

        <!--  Language  -->
        <javaVersion>17</javaVersion>
        <kotlinVersion>2.2.21</kotlinVersion>

        <!--  Kotlin  -->
        <kotlin.version>${kotlinVersion}</kotlin.version>
        <maven.compiler.release>${javaVersion}</maven.compiler.release>
        <kotlin.compiler.jvmTarget>${javaVersion}</kotlin.compiler.jvmTarget>

        <kotlin.coroutine.version>1.10.2</kotlin.coroutine.version>
        <kotlin-statistics.version>1.2.1</kotlin-statistics.version>

        <spring-boot.version>4.0.5</spring-boot.version>

        <!-- Pulsar dependency -->
        <pulsar-h2.version>1.4.197</pulsar-h2.version>
        <pulsar-jsoup.version>1.14.3</pulsar-jsoup.version>
    </properties>

    <profiles>
        <!-- Deploy profile for Central Portal -->
        <profile>
            <id>deploy</id>
            <build>
                <plugins>

                    <!-- GPG signing -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>${central-publishing-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
