<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
<?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>${pub.getCodeName()?lower_case}</artifactId>
        <groupId>${pub.getPKGCodeName()?lower_case}</groupId>
        <version>${pub.getVersionString()?default("V0.0.1_alpha")}</version>
    </parent>

    <artifactId>${pub.getCodeName()?lower_case}-boot</artifactId>
    <name>${pub.getCodeName()?lower_case?cap_first} Dev Monolithic Boot</name>
    <description>${pub.getCodeName()?lower_case?cap_first} Boot</description>

    <dependencies>
        <dependency>
            <groupId>${pub.getPKGCodeName()?lower_case}</groupId>
            <artifactId>${pub.getCodeName()?lower_case}-core</artifactId>
            <version>${r'${project.version}'}</version>
        </dependency>
<#comment>引入后台服务接口</#comment>
<#if sys.getAllPSSysServiceAPIs()??>
<#list sys.getAllPSSysServiceAPIs() as sysapi>
        <dependency>
            <groupId>${pub.getPKGCodeName()?lower_case}</groupId>
            <artifactId>${pub.getCodeName()?lower_case}-provider-${sysapi.getCodeName()?lower_case}</artifactId>
            <version>${r'${project.version}'}</version>
        </dependency>
</#list>
</#if>
<#comment>引入前端应用</#comment>
<#if sys.getAllPSApps()??>
	<#list sys.getAllPSApps() as sysApp>
        <dependency>
            <groupId>${pub.getPKGCodeName()?lower_case}</groupId>
            <artifactId>${pub.getCodeName()?lower_case}-app-${sysApp.getPKGCodeName()?lower_case}</artifactId>
            <version>${r'${project.version}'}</version>
        </dependency>
	</#list>
</#if>
    </dependencies>

    <!--由于boot是通过dependency来关联所有子项目,页面和配置等信息都存在与子项目中,
    所以您在对boot进行打包前,需要先将子项目install到maven仓库,以确保boot可以正常引用所有完整的子项目-->
    <profiles>
        <profile>
            <id>boot</id>
			<build>
				<resources>
					<resource>
						<directory>${r'${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>${pub.codeName?lower_case}</finalName>
							<jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
							<mainClass>${pub.getPKGCodeName()}.DevBootApplication</mainClass>
						    <outputDirectory>../</outputDirectory>
						</configuration>
						<executions>
							<execution>
								<goals>
									<goal>repackage</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>