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

    <parent>
        <groupId>cn.stylefeng</groupId>
        <artifactId>guns-vip</artifactId>
        <version>1.0.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>guns-vip-main</artifactId>

    <packaging>jar</packaging>

    <dependencies>

        <!-- guns-vip基础框架 -->
        <dependency>
            <groupId>cn.stylefeng</groupId>
            <artifactId>guns-sys</artifactId>
            <version>1.0.0</version>
        </dependency>

        <!-- 最新代码生成模块 -->
        <dependency>
            <groupId>cn.stylefeng</groupId>
            <artifactId>guns-vip-gen</artifactId>
            <version>1.0.0</version>
        </dependency>

        <!-- 第三方登录 -->
        <dependency>
            <groupId>cn.stylefeng</groupId>
            <artifactId>guns-base-third-login</artifactId>
            <version>1.0.0</version>
        </dependency>

        <!-- 分布式job -->
        <!--        <dependency>-->
        <!--            <groupId>cn.stylefeng</groupId>-->
        <!--            <artifactId>guns-base-timers</artifactId>-->
        <!--            <version>1.0.0</version>-->
        <!--        </dependency>-->

    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <fork>true</fork><!-- 如果没有该项配置，肯呢个devtools不会起作用，即应用不会restart -->
                </configuration>
            </plugin>
            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.26.1</version>
                <configuration>
                    <dockerHost>tcp://demo.stylefeng.cn:2376</dockerHost>
                    <certPath>_dockerCerts</certPath>
                    <images>
                        <image>
                            <alias>service</alias>
                            <name>stylefeng/${project.artifactId}:latest</name>
                            <build>
                                <from>java:8</from>
                                <assembly>
                                    <descriptor>docker-assembly.xml</descriptor>
                                </assembly>
                                <cmd>
                                    <shell>java -jar /maven/${project.artifactId}.jar</shell>
                                </cmd>
                            </build>
                        </image>
                    </images>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
