pom.xml 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <groupId>cn.vbdsm</groupId>
  5. <artifactId>vbdsm-ui</artifactId>
  6. <version>2.1.0</version>
  7. <packaging>pom</packaging>
  8. <properties>
  9. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  10. </properties>
  11. <build>
  12. <finalName>${project.artifactId}</finalName>
  13. <plugins>
  14. <plugin>
  15. <!-- YUI Compressor Maven压缩插件 -->
  16. <groupId>net.alchim31.maven</groupId>
  17. <artifactId>yuicompressor-maven-plugin</artifactId>
  18. <version>1.3.0</version>
  19. <configuration>
  20. <!-- 读取js,css文件采用UTF-8编码 -->
  21. <encoding>UTF-8</encoding>
  22. <!-- 不显示js可能的错误 -->
  23. <jswarn>false</jswarn>
  24. <!-- 若存在已压缩的文件,会先对比源文件是否有改动 有改动便压缩,无改动就不压缩 -->
  25. <force>true</force>
  26. <!-- 在指定的列号后插入新行 -->
  27. <linebreakpos>-1</linebreakpos>
  28. <!-- 压缩之前先执行聚合文件操作 -->
  29. <preProcessAggregates>false</preProcessAggregates>
  30. <!-- 压缩后保存文件后缀 -->
  31. <!-- <suffix>.min</suffix> -->
  32. <nosuffix>true</nosuffix>
  33. <!-- 源目录,即需压缩的根目录 -->
  34. <sourceDirectory>${basedir}/src</sourceDirectory>
  35. <!-- 压缩js和css文件 -->
  36. <includes>
  37. <include>**/*.js</include>
  38. <include>**/*.css</include>
  39. </includes>
  40. <!-- 以下目录和文件不会被压缩 -->
  41. <excludes>
  42. <exclude>**/*min.js</exclude>
  43. <exclude>**/*min.css</exclude>
  44. <exclude>**/webPlot/**/*.*</exclude>
  45. <exclude>static/js/lib/**/*.*</exclude>
  46. <exclude>static/css/**/*.*</exclude>
  47. <exclude>static/fonts/**/*.*</exclude>
  48. <!-- 文件太大会导致JVM内存溢出,所以暂时手动压缩 -->
  49. <exclude>pc/explorer/css/explorer.layout.css</exclude>
  50. <!-- 排除 UEditor 语法检测 -->
  51. <exclude>**/ueditor/**/*.*</exclude>
  52. <exclude>pc/govnew/**/*.*</exclude>
  53. <exclude>pc/powergov/js/bigScreen.min.bak.js</exclude>
  54. </excludes>
  55. <!-- 压缩后输出文件目录 -->
  56. <outputDirectory>${basedir}/min</outputDirectory>
  57. </configuration>
  58. </plugin>
  59. <plugin>
  60. <groupId>org.apache.maven.plugins</groupId>
  61. <artifactId>maven-assembly-plugin</artifactId>
  62. <version>2.2.1</version>
  63. <configuration>
  64. <descriptors>
  65. <descriptor>distribution.xml</descriptor>
  66. </descriptors>
  67. </configuration>
  68. <executions>
  69. <execution>
  70. <id>make-assembly</id>
  71. <phase>package</phase>
  72. <goals>
  73. <goal>single</goal>
  74. </goals>
  75. </execution>
  76. </executions>
  77. </plugin>
  78. </plugins>
  79. </build>
  80. </project>