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

	<artifactId>appbuild-manager</artifactId>
	<packaging>jar</packaging>
	<description>应用工程构建平台</description>

    <parent>
        <groupId>com.mortals.xhx</groupId>
        <artifactId>appbuild-platform</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>
	
	<properties>
	</properties>

	<profiles>
		<profile>
			<id>develop</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<profiles.active>develop</profiles.active>
				<profiles.server.port>17311</profiles.server.port>
				<profiles.datasource.uri>
					<![CDATA[jdbc:mysql://localhost:3306/appbuild-platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]></profiles.datasource.uri>
				<profiles.datasource.username>root</profiles.datasource.username>
				<profiles.datasource.password>12345678</profiles.datasource.password>
				<profiles.redis.uri>127.0.0.1</profiles.redis.uri>
				<profiles.redis.port>6379</profiles.redis.port>
				<profiles.redis.username></profiles.redis.username>
				<profiles.redis.password></profiles.redis.password>
				<profiles.redis.database>1</profiles.redis.database>
				<profiles.filepath>/mortals/data</profiles.filepath>
				<profiles.publish.path>/home/publish</profiles.publish.path>
				<profiles.log.level>INFO</profiles.log.level>
				<profiles.log.path>/home/mortals/app/logs</profiles.log.path>
				<profiles.data.path>/data</profiles.data.path>
			</properties>
		</profile>
		<profile>
			<id>test</id>
			<properties>
				<profiles.active>test</profiles.active>
				<profiles.server.port>17311</profiles.server.port>
				<profiles.datasource.uri>
					<![CDATA[jdbc:mysql://192.168.0.98:3306/appbuild-platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]></profiles.datasource.uri>
				<profiles.datasource.username>root</profiles.datasource.username>
				<profiles.datasource.password>xhx@2022</profiles.datasource.password>
				<profiles.redis.uri>192.168.0.252</profiles.redis.uri>
				<profiles.redis.port>6379</profiles.redis.port>
				<profiles.redis.username></profiles.redis.username>
				<profiles.redis.password>hotel@2020</profiles.redis.password>
				<profiles.redis.database>2</profiles.redis.database>
				<profiles.publish.path>/home/publish</profiles.publish.path>
				<profiles.filepath>/mortals/data</profiles.filepath>
				<profiles.log.level>INFO</profiles.log.level>
				<profiles.log.path>/home/mortals/app/logs</profiles.log.path>
				<profiles.data.path>/data</profiles.data.path>
			</properties>
		</profile>
		<profile>
			<id>product</id>
			<properties>

			</properties>
		</profile>
	</profiles>
	<dependencies>

		<dependency>
			<groupId>com.mortals.xhx</groupId>
			<artifactId>common-lib</artifactId>
		</dependency>

		<!-- 引入 SpringMVC 相关依赖，并实现对其的自动配置 -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>

		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>druid-spring-boot-starter</artifactId>
		</dependency>


		<dependency>
			<groupId>org.mybatis.spring.boot</groupId>
			<artifactId>mybatis-spring-boot-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-redis</artifactId>
		</dependency>

		<dependency>
			<groupId>com.github.shalousun</groupId>
			<artifactId>smart-doc</artifactId>
			<scope>test</scope>
			<version>2.3.0</version>
			<exclusions>
				<exclusion>
					<groupId>org.yaml</groupId>
					<artifactId>snakeyaml</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.thoughtworks.qdox/qdox -->
		<dependency>
			<groupId>com.thoughtworks.qdox</groupId>
			<artifactId>qdox</artifactId>
			<version>2.0.1</version>
		</dependency>


		<dependency>
			<groupId>com.github.jsonzou</groupId>
			<artifactId>jmockdata</artifactId>
			<version>4.2.0</version>
		</dependency>

		<dependency>
			<groupId>org.mapstruct</groupId>
			<artifactId>mapstruct</artifactId>
			<version>1.4.2.Final</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.freemarker</groupId>
			<artifactId>freemarker</artifactId>
			<version>2.3.31</version>
		</dependency>
        <dependency>
            <groupId>com.github.javafaker</groupId>
            <artifactId>javafaker</artifactId>
            <version>1.0.2</version>
            <scope>compile</scope>
        </dependency>

		<dependency>
			<groupId>com.deepoove</groupId>
			<artifactId>poi-tl</artifactId>
			<version>1.12.0</version>
		</dependency>
<!--
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-expression</artifactId>
			<version>5.3.18</version>
			<scope>provided</scope>
		</dependency>-->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi-scratchpad</artifactId>
			<version>5.2.2</version>
		</dependency>


	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.19.1</version>
				<configuration>
					<skipTests>true</skipTests>    <!--默认关掉单元测试 -->
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
					<encoding>${project.build.sourceEncoding}</encoding>
				</configuration>
			</plugin>


			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<configuration>
					<encoding>UTF-8</encoding>
					<nonFilteredFileExtensions>
						<nonFilteredFileExtension>docx</nonFilteredFileExtension>
					</nonFilteredFileExtensions>
				</configuration>
				<executions>
					<execution>
						<id>copy-bin</id>
						<phase>package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<encoding>UTF-8</encoding>
							<outputDirectory>target/bin
							</outputDirectory>
							<resources>
								<resource>
									<directory>src/main/bin/</directory>
									<excludes>
										<exclude>deploy.sh</exclude>
									</excludes>
									<filtering>true</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>

					<execution>
						<id>copy-deploy</id>
						<phase>package</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<encoding>UTF-8</encoding>
							<outputDirectory>${project.parent.basedir}/dist/${project.artifactId}/
							</outputDirectory>
							<resources>
								<resource>
									<directory>src/main/bin</directory>
									<includes>
										<include>deploy.sh</include>
									</includes>
									<filtering>true</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.6.0</version>
				<executions>
					<execution>
						<id>exec-npm-install</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>exec</goal>
						</goals>
						<configuration>
							<executable>yarn</executable>
							<arguments>
								<argument></argument>
							</arguments>
							<workingDirectory>${project.parent.basedir}/appbuild-manage-ui/admin</workingDirectory>
						</configuration>
					</execution>

					<execution>
						<id>exec-npm-run-build</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>exec</goal>
						</goals>
						<configuration>
							<executable>yarn</executable>
							<arguments>
								<argument>run</argument>
								<arguments>build</arguments>
							</arguments>
							<workingDirectory>${project.parent.basedir}/appbuild-manage-ui/admin</workingDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>3.3.0</version>
				<executions>
					<execution>
						<id>make-assembly</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<finalName>${project.artifactId}</finalName>
							<appendAssemblyId>false</appendAssemblyId>
							<descriptors>
								<descriptor>../assembly/assembly.xml</descriptor>
							</descriptors>
							<outputDirectory>${project.parent.basedir}/dist/${project.artifactId}</outputDirectory>
						</configuration>
					</execution>
					<execution>
						<id>make-assembly-ui</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<finalName>${project.artifactId}-ui</finalName>
							<appendAssemblyId>false</appendAssemblyId>
							<descriptors>
								<descriptor>../assembly/assembly-manager-ui.xml</descriptor>
							</descriptors>
							<outputDirectory>${project.parent.basedir}/dist/${project.artifactId}</outputDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>





	<!--
        <build>
            <resources>
                <resource>
                    <directory>src/main/java</directory>
                    <includes>
                        <include>**/*.xml</include>
                        <include>**/*.properties</include>
                    </includes>
                </resource>
                <resource>
                    <directory>src/main/resources</directory>
                    <filtering>true</filtering>
                    <includes>
                        <include>**/*.xml</include>
                        <include>**/*.properties</include>
                        <include>**/*.json</include>
                        <include>**/*.yml</include>
                        <include>**/*.js</include>
                        <include>**/*.html</include>
                        <include>**/*.css</include>
                        <include>**/*.svg</include>
                        <include>**/*.jpg</include>
                        <include>**/*.jpeg</include>
                        <include>**/*.png</include>
                        <include>**/*.ico</include>
                        <include>**/*.woff2</include>
                        <include>**/*.txt</include>
                        <include>**/*.xlsx</include>
                        <include>**/*.xls</include>
                    </includes>
                    <excludes>
                        <exclude>env/*.properties</exclude>
                    </excludes>
                </resource>
                <resource>
                    <directory>src/main/resources</directory>
                    <filtering>false</filtering>
                    <includes>
                        <include>**/*.docx</include>
                        <include>**/*.ftl</include>
                    </includes>
                </resource>

            </resources>

            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.19.1</version>
                    <configuration>
                        <skipTests>true</skipTests>    &lt;!&ndash;默认关掉单元测试 &ndash;&gt;
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                        <jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
                        <outputDirectory>${project.parent.basedir}/dist/${project.parent.artifactId}/boot</outputDirectory>
                        <layout>ZIP</layout>
                        &lt;!&ndash; 打包时，本jar包不包含其他依赖包 ， 否则打出的jar包还是很大 &ndash;&gt;
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>copy-bin</id>
                            <phase>package</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <encoding>UTF-8</encoding>
                                <outputDirectory>${project.parent.basedir}/dist/${project.parent.artifactId}/bin</outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>src/main/bin/</directory>
                                        <filtering>true</filtering>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>-->

</project>
