码迷,mamicode.com
首页 > 其他好文 > 详细

maven之打包静态文件

时间:2015-10-06 00:42:15      阅读:1015      评论:0      收藏:0      [点我收藏+]

标签:

将近太文件进行zip打包,实现动静分离 
pom.xml 

Xml代码  技术分享
  1. <plugin>  
  2.     <groupId>org.apache.maven.plugins</groupId>  
  3.     <artifactId>maven-assembly-plugin</artifactId>  
  4.     <version>2.2</version>  
  5.     <executions>  
  6.         <execution>  
  7.             <id>make-assembly</id>  
  8.             <phase>package</phase>  
  9.             <goals>  
  10.                 <goal>single</goal>  
  11.             </goals>  
  12.             <configuration>  
  13.                 <appendAssemblyId>false</appendAssemblyId>  
  14.                 <descriptors>  
  15.                     <descriptor>${basedir}/static-zip.xml</descriptor>  
  16.                 </descriptors>  
  17.             </configuration>  
  18.         </execution>  
  19.     </executions>  
  20. </plugin>  




static-zip.xml 

Xml代码  技术分享
    1. <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0">  
    2.     <id>project</id>  
    3.     <formats>  
    4.         <format>zip</format>  
    5.     </formats>  
    6.     <includeBaseDirectory>false</includeBaseDirectory>  
    7.     <fileSets>  
    8.         <fileSet>  
    9.             <directory>${basedir}/target/static/xxx</directory>  
    10.             <outputDirectory>project/pai</outputDirectory>  
    11.         </fileSet>  
    12.     </fileSets>  
    13. </assembly>  

》》源码地址获取

springmvc + mybatis整合详细,及遇到的问题请参看以下资料:

参考资料:

http://www.springmvc,net/detail/6074493.html

http://my.spring.net/wangbiglei/blog/489583

http://my.springmvc.net/wangbiglei/blog/489604

maven之打包静态文件

标签:

原文地址:http://www.cnblogs.com/lucene110/p/4856564.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!