<?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>org.redkalex</groupId>
    <artifactId>redkale-plugins</artifactId>
    <packaging>jar</packaging>
    <name>RedkalePluginsProject</name>
    <url>https://redkale.org</url>
    <description>Redkale-Plugins -- java framework</description>
    <version>2.8.1</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
		
        <junit.version>5.9.0</junit.version>
        <maven-jar-plugin.version>3.4.0</maven-jar-plugin.version>
        <maven-source-plugin.version>3.2.0</maven-source-plugin.version>
        <maven-compiler-plugin.version>3.9.0</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>3.0.0</maven-surefire-plugin.version>
        <maven-failsafe-plugin.version>3.0.0</maven-failsafe-plugin.version>
        <spotless-maven-plugin.version>3.1.0</spotless-maven-plugin.version>
        <palantir-java-format.version>2.83.0</palantir-java-format.version>

        <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
        <central-publishing-maven-plugin.version>0.9.0</central-publishing-maven-plugin.version>
        
        <jsqlparser.version>5.0</jsqlparser.version>
        <netty.version>4.1.108.Final</netty.version>
        <enjoy.version>5.1.3</enjoy.version>
        <snakeyaml.version>2.2</snakeyaml.version>
        <freemarker.version>2.3.32</freemarker.version>
        <slf4j.version>2.0.9</slf4j.version>
        <kafka.version>3.7.1</kafka.version> 
        <redisson.version>3.31.0</redisson.version>
        <vertx.version>4.5.8</vertx.version>
        <vertx-scram.version>2.1</vertx-scram.version>
        <mongodb.version>5.1.0</mongodb.version>
        <apollo-client.version>2.2.0</apollo-client.version>
        <nacos-client.version>2.2.4</nacos-client.version>
        <mysql.version>8.3.0</mysql.version>
        <postgresql.version>42.7.3</postgresql.version>
        <protobuf.version>4.28.2</protobuf.version>
    </properties>

    <dependencies>
        <dependency>  
            <groupId>org.redkale</groupId>  
            <artifactId>redkale</artifactId>  
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.jsqlparser</groupId>
            <artifactId>jsqlparser</artifactId>
            <version>${jsqlparser.version}</version>
        </dependency>
      
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
            <version>${protobuf.version}</version>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
            <version>${netty.version}</version>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency> 
        
        <dependency>
            <groupId>com.jfinal</groupId>
            <artifactId>enjoy</artifactId>
            <version>${enjoy.version}</version>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>${freemarker.version}</version>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jdk14</artifactId>
            <version>${slf4j.version}</version>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
       
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <version>${kafka.version}</version>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.redisson</groupId>
            <artifactId>redisson</artifactId>
            <version>${redisson.version}</version>
            <exclusions>   
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-redis-client</artifactId>
            <version>${vertx.version}</version> 
            <exclusions>   
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        
        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-pg-client</artifactId>
            <version>${vertx.version}</version> <!-- The performance of version 3.9.2 and above has dropped a lot -->
            <exclusions>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        
        <dependency>
            <groupId>com.ongres.scram</groupId>
            <artifactId>client</artifactId>
            <version>${vertx-scram.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-mysql-client</artifactId>
            <version>${vertx.version}</version>
            <exclusions>   
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        
        <dependency>
            <groupId>com.mysql</groupId>
            <artifactId>mysql-connector-j</artifactId>
            <version>${mysql.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.protobuf</groupId>
                    <artifactId>protobuf-java</artifactId>
                </exclusion>
            </exclusions>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>${postgresql.version}</version>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
        
        <dependency>
            <groupId>org.mongodb</groupId>
            <artifactId>mongodb-driver-reactivestreams</artifactId>
            <version>${mongodb.version}</version>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.ctrip.framework.apollo</groupId>
            <artifactId>apollo-client</artifactId>
            <version>${apollo-client.version}</version>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>

        <dependency>    
            <groupId>com.alibaba.nacos</groupId>
            <artifactId>nacos-client</artifactId>
            <version>${nacos-client.version}</version>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
                
        <dependency>    
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <version>${snakeyaml.version}</version>
            <optional>true</optional>
            <scope>provided</scope>
        </dependency>
                
    </dependencies>
	
    <licenses>     
        <license>      
            <name>Apache 2</name>       
            <url>https://www.apache.org/licenses/</url>     
            <distribution>repo</distribution>    
            <comments>Apache License</comments>     
        </license>     
    </licenses>
    
    <distributionManagement>
        <snapshotRepository>
            <id>central</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <developers>     
        <developer>      
            <id>Redkale-Plugins</id>     
            <name>redkale-plugins</name>       
            <email>redkale@qq.com</email>  
            <url>https://redkale.org</url>    
            <roles>     
                <role>Project Manager</role>     
                <role>Architect</role>     
            </roles>    
            <organization>redkale</organization>     
            <organizationUrl>https://redkale.org</organizationUrl>       
            <properties>     
                <dept>No</dept>     
            </properties>     
            <timezone>8</timezone>     
        </developer>     
    </developers>

    <scm>
        <url>https://github.com/redkale/redkale-plugins</url>
        <connection>scm:git:git@github.com/redkale/redkale-plugins.git</connection>
        <developerConnection>scm:git:git@github.com:redkale/redkale-plugins.git</developerConnection>
    </scm>
    
    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/redkale/redkale-plugins/issues</url>
    </issueManagement>
    
    <repositories>
        <repository>
            <id>snapshot</id>
            <url>https://central.sonatype.com/repository/maven-snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>                                
                <configuration>				
                    <encoding>UTF-8</encoding>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                    <showDeprecation>true</showDeprecation>
                </configuration>   
            </plugin>
           
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <forkMode>once</forkMode>
                    <argLine>-Dfile.encoding=UTF-8</argLine>
                </configuration>
            </plugin>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin.version}</version>
            </plugin>
            
            <!-- GPG 签名插件 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven-gpg-plugin.version}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <configuration>
                            <!-- signer bc /signer -->
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Sonatype Central 发布插件 -->
            <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>
                    <autoPublish>true</autoPublish> <!-- 设置为true可在校验通过后自动发布 -->
                </configuration>
            </plugin>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
            <plugin>
                <groupId>com.diffplug.spotless</groupId>
                <artifactId>spotless-maven-plugin</artifactId>
                <version>${spotless-maven-plugin.version}</version>
                <configuration>
                    <lineEndings>UNIX</lineEndings>
                    <formats>
                        <format>
                            <includes>
                                <include>src/**/java/**/*.java</include>
                            </includes>
                            <trimTrailingWhitespace/>
                            <endWithNewline/>
                            <indent>
                                <spaces>true</spaces>
                                <spacesPerTab>4</spacesPerTab>
                            </indent>
                        </format>
                    </formats>
                    <java>
                        <palantirJavaFormat>
                            <version>${palantir-java-format.version}</version>        
                            <style>PALANTIR</style>            
                            <formatJavadoc>true</formatJavadoc> 
                        </palantirJavaFormat>
                    </java>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>compile</phase>
                    </execution>
                </executions>
            </plugin>
           
        </plugins>
    </build>
    
</project>
