<?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">
    <parent>
        <artifactId>pqs-prepare</artifactId>
        <groupId>com.njcn</groupId>
        <version>1.0.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>prepare-boot</artifactId>
    <name>稳态预处理模块</name>
    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <org.projectlombok.version>1.18.12</org.projectlombok.version>
        <org.mapstruct.version>1.4.2.Final</org.mapstruct.version>
    </properties>


    <dependencies>
        <dependency>
            <groupId>com.njcn</groupId>
            <artifactId>common-swagger</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.njcn</groupId>
            <artifactId>common-microservice</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.njcn</groupId>
            <artifactId>common-redis</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.njcn</groupId>
            <artifactId>prepare-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!--pqs-influx-->
        <dependency>
            <groupId>com.njcn</groupId>
            <artifactId>pqs-influx</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.njcn</groupId>
            <artifactId>user-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.njcn</groupId>
            <artifactId>process-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.njcn</groupId>
            <artifactId>harmonic-api</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.njcn</groupId>
            <artifactId>system-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.njcn</groupId>
            <artifactId>energy-api</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct</artifactId>
            <version>${org.mapstruct.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct-processor</artifactId>
            <version>${org.mapstruct.version}</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok-mapstruct-binding</artifactId>
            <version>0.2.0</version>
        </dependency>
        <!-- 要与mapstruct版本匹配，用同一时间的版本,不然会出现各种问题 -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${org.projectlombok.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.njcn</groupId>
            <artifactId>common-oss</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- 多数据源切换，当数据源为oracle时需要使用 -->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
            <version>3.5.1</version>
        </dependency>

        <dependency>
            <groupId>com.yomahub</groupId>
            <artifactId>liteflow-spring-boot-starter</artifactId>
            <version>2.11.2</version>
        </dependency>
        <dependency>
            <groupId>com.njcn</groupId>
            <artifactId>event-api</artifactId>
            <version>1.0.0</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.yomahub</groupId>
            <artifactId>liteflow-rule-nacos</artifactId>
            <version>2.11.2</version>
        </dependency>
        <!--        <dependency>-->
<!--            <groupId>com.yomahub</groupId>-->
<!--            <artifactId>liteflow-rule-nacos</artifactId>-->
<!--            <version>2.11.0</version>-->
<!--        </dependency>-->
    </dependencies>

    <build>
        <finalName>prepareboot</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <compilerArgument>-Xlint:unchecked</compilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>1.2.2</version>
                <executions>
                    <execution>
                        <id>build-image</id>
                        <phase>${docker.operate}</phase>
                        <goals>
                            <goal>build</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <!--<serverId>36dockerHarbor</serverId>-->
                    <registryUrl>http://${docker.repostory}</registryUrl>
                    <!-- 镜像名称 -->
                    <imageName>${docker.repostory}/${docker.registry.name}/${project.artifactId}</imageName>
                    <imageTags>
                        <imageTag>latest</imageTag>
                    </imageTags>
                    <dockerHost>${docker.url}</dockerHost>
                    <dockerDirectory>${basedir}/</dockerDirectory>
                    <resources>
                        <resource>
                            <targetPath>/ROOT</targetPath>
                            <directory>${project.build.directory}</directory>
                            <include>${project.build.finalName}.jar</include>
                        </resource>
                    </resources>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
