<?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.mayfly</groupId>
    <artifactId>mayfly-parent</artifactId>
    <version>1.2.0</version>
    <packaging>pom</packaging>
    
    <name>Mayfly Parent</name>
    <description>Enterprise Model Router for Spring AI - 基于Spring AI的企业级模型路由增强插件</description>
    <url>https://github.com/Insect-sounds0487/mayfly</url>
    
    <modules>
        <module>mayfly-core</module>
        <module>mayfly-router</module>
        <module>mayfly-loadbalancer</module>
        <module>mayfly-failover</module>
        <module>mayfly-circuitbreaker</module>
        <module>mayfly-monitor</module>
        <module>mayfly-runtime</module>
        <module>mayfly-adapter</module>
        <module>mayfly-spring-boot-starter</module>
        <module>mayfly-spring-ai-bridge</module>
    </modules>
    
    <properties>
        <java.version>17</java.version>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <spring-boot.version>3.2.4</spring-boot.version>
        <spring-ai.version>1.0.0-M6</spring-ai.version>
        <resilience4j.version>2.1.0</resilience4j.version>
        <micrometer.version>1.12.4</micrometer.version>
        <lombok.version>1.18.30</lombok.version>
        <slf4j.version>2.0.12</slf4j.version>
    </properties>
    
    <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.springframework.ai</groupId>
                <artifactId>spring-ai-bom</artifactId>
                <version>${spring-ai.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            
            <dependency>
                <groupId>io.mayfly</groupId>
                <artifactId>mayfly-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            
            <dependency>
                <groupId>io.mayfly</groupId>
                <artifactId>mayfly-router</artifactId>
                <version>${project.version}</version>
            </dependency>
            
            <dependency>
                <groupId>io.mayfly</groupId>
                <artifactId>mayfly-loadbalancer</artifactId>
                <version>${project.version}</version>
            </dependency>
            
            <dependency>
                <groupId>io.mayfly</groupId>
                <artifactId>mayfly-failover</artifactId>
                <version>${project.version}</version>
            </dependency>
            
            <dependency>
                <groupId>io.mayfly</groupId>
                <artifactId>mayfly-circuitbreaker</artifactId>
                <version>${project.version}</version>
            </dependency>
            
            <dependency>
                <groupId>io.mayfly</groupId>
                <artifactId>mayfly-adapter</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.mayfly</groupId>
                <artifactId>mayfly-runtime</artifactId>
                <version>${project.version}</version>
            </dependency>
            
            <dependency>
                <groupId>io.mayfly</groupId>
                <artifactId>mayfly-monitor</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.mayfly</groupId>
                <artifactId>mayfly-spring-ai-bridge</artifactId>
                <version>${project.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    
    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>
        
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>${spring-boot.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.11.0</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                        <annotationProcessorPaths>
                            <path>
                                <groupId>org.projectlombok</groupId>
                                <artifactId>lombok</artifactId>
                                <version>${lombok.version}</version>
                            </path>
                        </annotationProcessorPaths>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.2.5</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.14</version>
                </plugin>
                <plugin>
                    <groupId>org.pitest</groupId>
                    <artifactId>pitest-maven</artifactId>
                    <version>1.15.2</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.pitest</groupId>
                            <artifactId>pitest-junit5-plugin</artifactId>
                            <version>1.2.1</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <targetClasses>
                            <param>io.mayfly.*</param>
                        </targetClasses>
                        <targetTests>
                            <param>io.mayfly.*</param>
                        </targetTests>
                        <excludedMethods>
                            <param>equals</param>
                            <param>hashCode</param>
                            <param>toString</param>
                            <param>canEqual</param>
                        </excludedMethods>
                        <outputFormats>
                            <param>HTML</param>
                            <param>XML</param>
                        </outputFormats>
                        <mutationThreshold>80</mutationThreshold>
                        <coverageThreshold>80</coverageThreshold>
                        <threads>4</threads>
                        <avoidCallsTo>
                            <param>java.util.logging</param>
                            <param>org.slf4j</param>
                        </avoidCallsTo>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    
    <repositories>
        <repository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
    
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>
    
    <developers>
        <developer>
            <name>Mayfly Team</name>
            <email>git@xsjyby.asia</email>
        </developer>
    </developers>
    
    <scm>
        <connection>scm:git:git://github.com/Insect-sounds0487/mayfly.git</connection>
        <developerConnection>scm:git:ssh://github.com/Insect-sounds0487/mayfly.git</developerConnection>
        <url>https://github.com/Insect-sounds0487/mayfly</url>
    </scm>
</project>