<?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>
        <artifactId>ibzlite</artifactId>
        <groupId>cn.ibizlab</groupId>
        <version>1.0.0.0</version>
    </parent>

    <artifactId>ibzlite-boot</artifactId>
    <name>Ibzlite Dev Monolithic Boot</name>
    <description>Ibzlite Boot</description>

    <dependencies>
        <dependency>
            <groupId>cn.ibizlab</groupId>
            <artifactId>ibzlite-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>cn.ibizlab</groupId>
            <artifactId>ibzlite-provider-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>cn.ibizlab</groupId>
            <artifactId>ibzlite-app-web</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

    <!--由于boot是通过dependency来关联所有子项目,页面和配置等信息都存在与子项目中,
    所以您在对boot进行打包前,需要先将子项目install到maven仓库,以确保boot可以正常引用所有完整的子项目-->
    <profiles>
        <profile>
            <id>boot</id>
			<build>
				<resources>
					<resource>
						<directory>${basedir}/src/main/resources</directory>
						<includes>
							<include>**/**</include>
						</includes>
					</resource>
				</resources>

				<plugins>
					<plugin>
						<groupId>org.springframework.boot</groupId>
						<artifactId>spring-boot-maven-plugin</artifactId>
						<configuration>
							<finalName>ibzlite</finalName>
							<jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
							<mainClass>cn.ibizlab.DevBootApplication</mainClass>
						    <outputDirectory>../</outputDirectory>
						</configuration>
						<executions>
							<execution>
								<goals>
									<goal>repackage</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>com.spotify</groupId>
						<artifactId>docker-maven-plugin</artifactId>
						<version>0.4.13</version>
						<configuration>
							<serverId>ibiz-dev</serverId>
							<imageName>ibiz4j/ibizlab-lite:latest</imageName>
							<dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
							<resources>
								<resource>
									<targetPath>/</targetPath>
									<directory>../</directory>
									<include>ibzlite.jar</include>
								</resource>
							</resources>
						</configuration>
					</plugin>
				</plugins>

			</build>
		</profile>
	</profiles>

</project>