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

	<groupId>net.mingsoft</groupId>
	<artifactId>mcms</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>mcms</name>
	<packaging>war</packaging>
	<properties>
		<java.version>1.8</java.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>net.mingsoft</groupId>
			<artifactId>ms-base</artifactId>
			<version>1.0.8.1-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>net.mingsoft</groupId>
			<artifactId>ms-basic</artifactId>
			<version>1.0.8.1-SNAPSHOT</version>
			<type>war</type>
		</dependency>
		<dependency>
			<groupId>net.mingsoft</groupId>
			<artifactId>ms-basic</artifactId>
			<version>1.0.8.1-SNAPSHOT</version>
			<classifier>classes</classifier>
			<scope>provided</scope>
		</dependency>
		<!-- <dependency> <groupId>net.mingsoft</groupId> <artifactId>ms-mdiy</artifactId> 
			<version>1.0.7-SNAPSHOT</version> <type>war</type> </dependency> <dependency> 
			<groupId>net.mingsoft</groupId> <artifactId>ms-mdiy</artifactId> <version>1.0.7-SNAPSHOT</version> 
			<classifier>classes</classifier> <scope>provided</scope> </dependency> -->
	</dependencies>

	<build>
		<finalName>ms-mcms</finalName>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>
			<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>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> 
				<configuration> <delimiters> <delimiter>@</delimiter> </delimiters> <useDefaultDelimiters>false</useDefaultDelimiters> 
				</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>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<configuration>
					<packagingExcludes>ms.install,html/,static/,temp,upgrader,WEB-INF/web.xml,WEB-INF/lib/,templets/,upload/,WEB-INF/classes/*.xml,WEB-INF/classes/*.properties,*.sh</packagingExcludes>
					<failOnMissingWebXml>false</failOnMissingWebXml>
				</configuration>
			</plugin><!-- 打包成war使用 -->

		</plugins>
		<resources>
			<resource>
				<directory>src/main/webapp</directory>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
			<resource>
				<directory>src/main/java</directory>
				<includes>
					<include>**/*.xml</include>
				</includes>
			</resource>
		</resources>
		<defaultGoal>compile</defaultGoal>
	</build>
</project>