<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>

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

    <groupId>com.hys.app</groupId>
    <artifactId>raycos</artifactId>
    <version>7.2.2</version>
    <modules>
        <module>framework</module>
        <module>module-erp</module>
        <module>raycos-web-api</module>
<!--        <module>raycos-datacenter-api</module>-->
        <module>server</module>
    </modules>
    <packaging>pom</packaging>
    <name>erp</name>
    <description>erp 主工程</description>

    <properties>
        <docker-registry>registry.cn-beijing.aliyuncs.com/hys/</docker-registry>
        <docker-server-id>docker-aliyun</docker-server-id>
        <shardingsphere.version>4.1.0</shardingsphere.version>
        <erp-version>7.2.2</erp-version>
        <okhttp3.version>3.14.0</okhttp3.version>
        <log4j2.version>2.17.1</log4j2.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>Finchley.SR1</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>okhttp</artifactId>
                <version>${okhttp3.version}</version>
            </dependency>
            <!--全局排除spring-boot-starter-logging内的所有依赖-->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-logging</artifactId>
                <exclusions>
                    <exclusion>
                        <groupId>*</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>1.1.1</version>
                <configuration>
                    <imageName>${docker-registry}${project.artifactId}:7.2.0</imageName>
                    <baseImage>
                    </baseImage>
                    <entryPoint>["java","-jar", "/opt/${project.build.finalName}.jar" ,"-Dfile.encoding=UTF-8"]
                    </entryPoint>
                    <resources>
                        <resource>
                            <targetPath>/opt/</targetPath>
                            <directory>${project.build.directory}</directory>
                            <include>${project.build.finalName}.jar</include>
                        </resource>
                    </resources>
                    <forceTags>true</forceTags>
                    <serverId>${docker-server-id}</serverId>
                </configuration>
            </plugin>

        </plugins>
    </build>


</project>
