<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.ovopark.dc</groupId>
        <artifactId>dc-alarm</artifactId>
        <version>2.0.0.RC1</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    
    <artifactId>dc-alarm-service</artifactId>
    <version>2.0.0.RC1</version>
    <name>dc-alarm-service</name>
    <description>dc-alarm-service</description>
    <properties>
        <java.version>17</java.version>
        <docker-maven-plugin.version>0.44.0</docker-maven-plugin.version>
    </properties>
    
    <dependencies>
        
        <!--nacos-->
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
        </dependency>
        
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
        </dependency>
        <!--nacos-->
        <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-openfeign -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-openfeign</artifactId>
        </dependency>
        
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>log4j-api</artifactId>
                    <groupId>org.apache.logging.log4j</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>log4j-to-slf4j</artifactId>
                    <groupId>org.apache.logging.log4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        
        <!--测试依赖-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
        </dependency>
        
        <!--   持久层 -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
        </dependency>
        
        <!-- 本地依赖-->
        <dependency>
            <groupId>com.ovopark.dc</groupId>
            <artifactId>dc-alarm-transport</artifactId>
        </dependency>
        
        <dependency>
            <groupId>com.ovopark.dc</groupId>
            <artifactId>dc-alarm-repository</artifactId>
        </dependency>
        
        <dependency>
            <groupId>com.ovopark.dc</groupId>
            <artifactId>dc-alarm-core</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>log4j</artifactId>
                    <groupId>log4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        
        <dependency>
            <groupId>com.ovopark.dc</groupId>
            <artifactId>dc-alarm-healthcheck</artifactId>
        </dependency>
        
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
        </dependency>
        
        <dependency>
            <groupId>org.redisson</groupId>
            <artifactId>redisson</artifactId>
        </dependency>
        
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
        </dependency>
        
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>
        
        <dependency>
            <groupId>com.ovopark.dc</groupId>
            <artifactId>log-kafka-producer-sdk</artifactId>
        </dependency>
        
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
        </dependency>
        
        <dependency>
            <groupId>org.springframework.kafka</groupId>
            <artifactId>spring-kafka</artifactId>
        </dependency>
        
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>transmittable-thread-local</artifactId>
        </dependency>
        
        <dependency>
            <groupId>com.aliyun</groupId>
            <artifactId>alibabacloud-ecs20140526</artifactId>
        </dependency>
    </dependencies>
    
    <repositories>
        <repository>
            <id>nexus</id>
            <url>https://nexus.ovopark.com/nexus/content/groups/public/</url>
        </repository>
        <repository>
            <id>nexus-releases</id>
            <url>https://nexus.ovopark.com/nexus/content/repositories/releases/</url>
        </repository>
        <repository>
            <id>nexus-snapshots</id>
            <url>https://nexus.ovopark.com/nexus/content/repositories/snapshots/</url>
        </repository>
    </repositories>
    
    <!-- 插件地址 -->
    <pluginRepositories>
        <pluginRepository>
            <id>nexus</id>
            <name>Team Nexus Repository</name>
            <url>https://nexus.ovopark.com/nexus/content/groups/public/</url>
        </pluginRepository>
    </pluginRepositories>
    <distributionManagement>
        <repository>
            <id>nexus-releases</id>
            <url>https://nexus.ovopark.com/nexus/content/repositories/releases/</url>
        </repository>
        <snapshotRepository>
            <id>nexus-snapshots</id>
            <url>https://nexus.ovopark.com/nexus/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${spring.boot.version}</version>
                <configuration>
                    <mainClass>com.ovopark.dc.alarm.service.DcAlarmServiceApplication</mainClass>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>${docker-maven-plugin.version}</version>
                <configuration>
                    <!--registry地址,用于推送,拉取镜像-->
                    <registry>ovo-registry.cn-hangzhou.cr.aliyuncs.com</registry>
                    <!--认证配置,用于私有registry认证-->
                    <authConfig>
                        <push>
                            <username>guyue@ovopark</username>
                            <password>1QAZ2WSX3EDC..</password>
                        </push>
                    </authConfig>
                    <verbose>true</verbose>
                    <!--镜像相关配置,支持多镜像-->
                    <images>
                        <!-- 单个镜像配置 -->
                        <image>
                            <!--镜像名(含版本号)-->
                            <name>ovo-registry.cn-hangzhou.cr.aliyuncs.com/ovopark/${project.artifactId}:202406181319</name>
                            <!--别名:用于容器命名和在docker-compose.yml文件只能找到对应名字的配置-->
                            <!--                            <alias>${project.name}</alias>-->
                            <!--镜像build相关配置-->
                            <build>
                                <!--使用dockerFile文件-->
                                <dockerFile>${project.basedir}/Dockerfile</dockerFile>
                            </build>
                        </image>
                    </images>
                </configuration>
                <dependencies>
                    <!--该插件需要这个依赖-->
                    <dependency>
                        <groupId>commons-codec</groupId>
                        <artifactId>commons-codec</artifactId>
                        <version>${commons-codec.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

</project>
