<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>com.dk.iboss</groupId>
    <artifactId>dkic-server-mdm</artifactId>
    <version>3.0.0</version>
    <name>dkic-server-mdm</name>
    <description>dk iboss mdm server</description>


    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.6.RELEASE</version>
        <relativePath/>
    </parent>

    <profiles>
        <profile>
            <id>st</id>
            <properties>
                <environment>st</environment>
            </properties>
        </profile>

        <profile>
            <id>uat</id>
            <properties>
                <environment>uat</environment>
            </properties>
        </profile>

        <profile>
            <id>prod</id>
            <properties>
                <environment>prod</environment>
            </properties>
        </profile>

        <profile>
            <id>test</id>
            <properties>
                <environment>test</environment>
            </properties>
        </profile>

        <profile>
            <id>dev</id>
            <properties>
                <environment>dev</environment>
            </properties>
            <activation>
                <activeByDefault>true</activeByDefault><!-- 默认激活该profile节点-->
            </activation>
        </profile>
    </profiles>

    <dependencies>
        <!--公共模块-->
        <dependency>
            <groupId>com.dk.iboss</groupId>
            <artifactId>dkic-dependency-common</artifactId>
            <version>3.0.0</version>
        </dependency>
        <!--lombok-->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>

<!--        pdf打印-->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox</artifactId>
            <version>2.0.8</version>
        </dependency>

<!--        pdf生成-->
        <dependency>
            <groupId>com.itextpdf</groupId>
            <artifactId>itext7-core</artifactId>
            <version>7.1.8</version>
            <type>pom</type>
        </dependency>

<!--        二维码-->
        <dependency>
            <groupId>com.google.zxing</groupId>
            <artifactId>core</artifactId>
            <version>3.3.3</version>
        </dependency>

<!--        条形码-->
        <dependency>
            <groupId>net.sf.barcode4j</groupId>
            <artifactId>barcode4j</artifactId>
            <version>2.1</version>
        </dependency>

        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
        </dependency>
        <dependency>
            <groupId>com.github.binarywang</groupId>
            <artifactId>weixin-java-pay</artifactId>
            <version>4.4.0</version>
        </dependency>
        <dependency>
            <groupId>com.github.binarywang</groupId>
            <artifactId>weixin-java-miniapp</artifactId>
            <version>4.4.0</version>
        </dependency>
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
            <version>5.4.3</version>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource> <!--此处配置到java是因为mapper.xml文件在java目录-->
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
            <resource> <!--项目配置文件-->
                <directory>src/main/resources/${environment}</directory>
                <includes>
                    <include>**/*</include>
                </includes>
                <!-- 启用过滤器，过滤器会解析需要过滤的的资源文件，将其中的@environment@变量替换成真实的值 -->
                <filtering>true</filtering>
            </resource>
            <resource> <!--日志配置文件-->
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*</include>
                </includes>
                <!-- 启用过滤器，过滤器会解析需要过滤的的资源文件，将其中的@environment@变量替换成真实的值 -->
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>com.dk.mdm.MdmServer</mainClass>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>1.2.2</version>

                <configuration>
                    <serverId>aliyun-acr</serverId>
                    <registryUrl>registry.cn-shenzhen.aliyuncs.com</registryUrl>
                    <!--依赖的基础镜像-->
                    <baseImage>java</baseImage>
                    <!--imageName必须跟仓库路径一致-->
                    <imageName>registry.cn-shenzhen.aliyuncs.com/hgscrm-${environment}/${project.artifactId}:${project.version}</imageName>
                    <!-- 指定Dockerfile所在的路径 -->
                    <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
                    <resources>
                        <resource>
                            <targetPath>/</targetPath>
                            <directory>${project.build.directory}</directory>
                            <include>${project.build.finalName}.jar</include>
                        </resource>
                    </resources>
                    <pushImage>true</pushImage>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
<!--        <repository>-->
<!--            &lt;!&ndash;恒洁maven私服 haip仓库&ndash;&gt;-->
<!--            <id>private</id>-->
<!--            <name>private</name>-->
<!--            <url>http://172.17.216.67:8081/repository/haip</url>-->
<!--            <releases>-->
<!--                <enabled>true</enabled>-->
<!--            </releases>-->
<!--            <snapshots>-->
<!--                <enabled>true</enabled>-->
<!--            </snapshots>-->
<!--        </repository>-->

        <!--maven私服 setting.xml 配置
        <server>
            <id>haip</id>
            <username>haip</username>
            <password>haip2020</password>
        </server>-->
        <!--阿里云仓库-->
        <repository>
            <id>aliyun</id>
            <name>aliyun</name>
            <url>https://maven.aliyun.com/repository/public</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <!--中央仓库-->
        <repository>
            <id>central</id>
            <name>central</name>
            <url>https://repo1.maven.org/maven2</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>com.e-iceblue</id>
            <url>http://repo.e-iceblue.cn/repository/maven-public/</url>
        </repository>
    </repositories>
</project>
