<?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>blog-admin</artifactId>
	<packaging>jar</packaging>

	<name>blog-admin</name>
	<description>blog admin project for Spring Boot</description>

	<parent>
		<groupId>com.zyd</groupId>
		<artifactId>blog</artifactId>
		<version>2.0.1.Beta</version>
	</parent>

	<dependencies>
		<dependency>
			<groupId>com.zyd</groupId>
			<artifactId>blog-core</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-websocket</artifactId>
		</dependency>

	</dependencies>

	<build>
		<plugins>
			<!-- 解决@xx@无法解析的问题 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<configuration>
					<delimiters>
						<delimiter>@</delimiter>
					</delimiters>
					<useDefaultDelimiters>false</useDefaultDelimiters>
				</configuration>
			</plugin>
			<plugin>
				<groupId>net.alchim31.maven</groupId>
				<artifactId>yuicompressor-maven-plugin</artifactId>
				<executions>
					<execution>
						<phase>process-resources</phase>
						<goals>
							<goal>compress</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<!-- 读取js,css文件采用UTF-8编码 -->
					<encoding>UTF-8</encoding>
					<!-- 不显示js可能的错误 -->
					<jswarn>false</jswarn>
					<!-- 若存在已压缩的文件，会先对比源文件是否有改动  有改动便压缩，无改动就不压缩 -->
					<force>false</force>
					<!-- 在指定的列号后插入新行 -->
					<linebreakpos>-1</linebreakpos>
					<!-- 压缩之前先执行聚合文件操作 -->
					<preProcessAggregates>true</preProcessAggregates>
					<!-- 压缩后保存的文件后缀：true=无后缀 ，false=有后缀-min -->
					<nosuffix>true</nosuffix>
					<!-- 源目录，即需压缩的根目录 -->
					<sourceDirectory>src/main/resources/static/assets</sourceDirectory>
					<!-- 目标输出目录 -->
					<outputDirectory>target/classes/static/assets</outputDirectory>
					<!-- 压缩js和css文件 -->
					<includes>
						<include>**/*.js</include>
						<include>**/*.css</include>
					</includes>
					<!-- 以下目录和文件不会被压缩 -->
					<excludes>
						<exclude>**/*.min.js</exclude>
						<exclude>**/*.min.css</exclude>
						<exclude>**/jquery-form.js</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<mainClass>com.zyd.blog.BlogAdminApplication</mainClass>
					<layout>JAR</layout>
                    <!--构建完整可执行程序，可以直接运行-->
                    <executable>true</executable>
				</configuration>
			</plugin>
		</plugins>
		<!-- 打包的时候放开 -->
		<!--<resources>
			<resource>
				<filtering>true</filtering>
				<directory>src/main/resources</directory>
				<includes>
					<include>static/assets/images/**</include>
					&lt;!&ndash;<include>%regex[static/assets/js/(jquery-form|wangEditor\.min)\.js]</include>&ndash;&gt;
					<include>static/assets/js/jquery-form.js</include>
					<include>static/assets/js/wangEditor.min.js</include>
					<include>static/assets/css/jquery-confirm.min.css</include>
					<include>templates/**</include>
					<include>*.yml</include>
					<include>*.txt</include>
					<include>*.xml</include>
				</includes>
			</resource>
		</resources>-->
	</build>


</project>
