<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>cftech-platform</artifactId>
        <groupId>com.cftech</groupId>
        <version>1.0-SNAPSHOT</version>
          <relativePath>../pom.xml</relativePath>
    </parent>
  <groupId>qy-token-service</groupId>
  <artifactId>qy-token-service</artifactId>
  <packaging>jar</packaging>
  <name>qy-token-service</name>
  <url>http://maven.apache.org</url>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <dependencies>
  			 <dependency>
            <groupId>com.cftech</groupId>
            <artifactId>token-module</artifactId>
            <version>1.0-SNAPSHOT</version>
            </dependency>
            
            <!-- 如果要使用tomcat server -->
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-core</artifactId>
    <version>9.0.0.M6</version>
</dependency>
<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-logging-juli</artifactId>
    <version>9.0.0.M6</version>
</dependency>
            
  </dependencies>
   
  <build>
		<finalName>qy-token-service</finalName>
		<!-- 配置文件  -->
		<resources>
			<resource>
				<targetPath>${project.build.directory}/classes</targetPath>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
				<includes>
					<include>**/*.xml</include>
					<include>**/*.properties</include>
				</includes>
			</resource>
			<resource>
				<targetPath>${project.build.directory}/classes/META-INF/spring</targetPath>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
				<includes>
					<include>dubbo-provider.xml</include>
					<include>spring-mvc.xml</include>
				</includes>
			</resource>
		</resources>	
		
		<pluginManagement>
			<plugins>
			
			
			 <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.4</version>
        </plugin>
		<!--自动打包发布插件 -->
		<!--
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-release-plugin</artifactId>
			<configuration>
				<tagBase>svn://192.168.100.27:8080/svn/development/java/credithc-mq/tags</tagBase>
			</configuration>
		</plugin>
		-->
		<!-- 解解决maven update project 后版本降低为1.5的bug -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <encoding>utf8</encoding>
            </configuration>
        </plugin>
		<!-- 单元测试 -->
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-surefire-plugin</artifactId>
			<configuration>
				<skip>true</skip>
				<includes>
					<include>**/*Test*.java</include>
				</includes>
			</configuration>
		</plugin>
    	<plugin>
    		<groupId>org.apache.maven.plugins</groupId>
    		<artifactId>maven-source-plugin</artifactId>
    		<version>2.1.2</version>
    		<executions>
    			<!-- 绑定到特定的生命周期之后，运行maven-source-pluin 运行目标为jar-no-fork -->
				<execution>
					<phase>package</phase>
					<goals>
						<goal>jar-no-fork</goal>
					</goals>
				</execution>
			</executions>
    	</plugin>	
			
			
			
				<!-- 解决Maven插件在Eclipse内执行了一系列的生命周期引起冲突 -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-dependency-plugin</artifactId>
										<versionRange>[2.0,)</versionRange>
										<goals>
											<goal>copy-dependencies</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<!-- 打包jar文件时，配置manifest文件，加入lib包的jar依赖 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<classesDirectory>target/classes/</classesDirectory>
					<archive>
						<manifest>
							<mainClass>com.alibaba.dubbo.container.Main</mainClass>
							<!-- 打包时 MANIFEST.MF文件不记录的时间戳版本 -->
							<useUniqueVersions>false</useUniqueVersions>
							<addClasspath>true</addClasspath>
							<classpathPrefix>lib/</classpathPrefix>
						</manifest>
						<manifestEntries>
							<Class-Path>.</Class-Path>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<!--<plugin>-->
				<!--<groupId>org.apache.maven.plugins</groupId>-->
				<!--<artifactId>maven-dependency-plugin</artifactId>-->
				<!--<executions>-->
					<!--<execution>-->
						<!--<id>copy-dependencies</id>-->
						<!--<phase>package</phase>-->
						<!--<goals>-->
							<!--<goal>copy-dependencies</goal>-->
						<!--</goals>-->
						<!--<configuration>-->
							<!--<type>jar</type>-->
							<!--<includeTypes>jar</includeTypes>-->
							<!--<useUniqueVersions>false</useUniqueVersions>-->
							<!--<outputDirectory>-->
								<!--${project.build.directory}/lib-->
							<!--</outputDirectory>-->
						<!--</configuration>-->
					<!--</execution>-->
				<!--</executions>-->
			<!--</plugin>-->
		</plugins>
	</build>  
	
	
  
  
</project>
