<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.cku</groupId>
    <artifactId>caibhome</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>
  <artifactId>caibmobile</artifactId>
  <packaging>war</packaging>
  <dependencies>
  		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<scope>test</scope>
		</dependency>
        <dependency>
            <groupId>com.cku</groupId>
            <artifactId>caibmobile-ueditor</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>com.cku</groupId>
            <artifactId>caibmobile-util</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        
        <!-- 图形验证码 -->
		<dependency>
			<groupId>com.github.whvcse</groupId>
			<artifactId>easy-captcha</artifactId>
			<version>1.6.2</version>
		</dependency>
		<dependency>
			<groupId>com.auth0</groupId>
			<artifactId>java-jwt</artifactId>
			<version>3.8.3</version>
		</dependency>
		<!-- sm-crypto -->
        <dependency>
            <groupId>com.antherd</groupId>
            <artifactId>sm-crypto</artifactId>
            <version>0.3.2</version>
        </dependency>
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-all</artifactId>
            <version>5.8.12</version>
        </dependency>
  </dependencies>
  
  <build>
    <finalName>caibmobile</finalName>
    <plugins>
      <plugin> 
              <artifactId>maven-compiler-plugin</artifactId> 
              <version>2.5.1</version>  
              <configuration> 
                  <source>1.8</source> 
                  <target>1.8</target> 
                  <encoding>UTF-8</encoding> 
                  <compilerArguments> 
                   <extdirs>src\main\webapp\WEB-INF\lib</extdirs> 
                 </compilerArguments> 
              </configuration> 
            </plugin> 
	    <plugin>
		    <groupId>org.apache.maven.plugins</groupId>
		    <artifactId>maven-resources-plugin</artifactId>
		    <version>2.6</version>
		    <configuration>
		        <encoding>UTF-8</encoding>
		    </configuration>
		</plugin>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.2.2.v20140723</version>
                <configuration>
                    <httpConnector >
                        <port>8888</port>
                    </httpConnector>
					<webAppConfig>
                        <contextPath>/</contextPath>
                    </webAppConfig>
                    <stopKey>stop</stopKey>
                    <stopPort>8889</stopPort>
                </configuration>
            </plugin>
            <plugin>
		        <groupId>org.apache.maven.plugins</groupId>
		        <artifactId>maven-war-plugin</artifactId>
		        <version>3.3.1</version>
		    </plugin>
    </plugins>
      <resources>
      		<!-- 先指定src/main/resources下所有文件及文件夹为资源文件 -->
			<resource>
				<directory>src/main/resources</directory>
				<includes>
					<include>**/*</include>
				</includes>
				<excludes>
					<exclude>env/**</exclude>
				</excludes>
			</resource>
			<!-- 设置对auto-config.properties，jdbc.properties进行过虑，即这些文件中的${key}会被替换掉为真正的�? -->
			<resource>
				<directory>src/main/resources</directory>
				<includes>
					<include>config.properties</include>
				</includes>
				<filtering>true</filtering>
			</resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </resource>
        </resources>
  </build>
  <profiles>
		<profile>
			<id>dev</id>
			<!-- 默认激活开发配制，使用application.properties来替换设置过虑的资源文件中的${key} -->
			<activation>
                <activeByDefault>true</activeByDefault>
            </activation>
			<build>
				<filters>
					<filter>src/main/resources/env/dev.properties</filter>
				</filters>
			</build>
		</profile>
		<!-- 测试环境 -->
		<profile>
			<id>uat</id>
			<build>
				<filters>
					<filter>src/main/resources/env/uat.properties</filter>
				</filters>
			</build>
		</profile>
		<!-- 预发环境 -->
		<profile>
			<id>pre</id>
			<build>
				<filters>
					<filter>src/main/resources/env/pre.properties</filter>
				</filters>
			</build>
		</profile>
		<!-- 生产环境 -->
		<profile>
			<id>prd</id>
			<build>
				<filters>
					<filter>src/main/resources/env/prd.properties</filter>
				</filters>
			</build>
		</profile>
	</profiles>
</project>
