pom.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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.0.0</version>
  7. <packaging>pom</packaging>
  8. <distributionManagement>
  9. <repository>
  10. <id>vbpdsm-releases</id>
  11. <name>Internal Releases</name>
  12. <url>http://shvber.com:8881/repository/vbpdsm-releases</url>
  13. </repository>
  14. <snapshotRepository>
  15. <id>vbpdsm-snapshots</id>
  16. <name>Internal Snapshots</name>
  17. <url>http://shvber.com:8881/repository/vbpdsm-snapshots</url>
  18. </snapshotRepository>
  19. </distributionManagement>
  20. <repositories>
  21. <repository>
  22. <id>vbpdsm</id>
  23. <name>vbpdsm Repository</name>
  24. <url>http://shvber.com:8881/repository/vbpdsm/</url>
  25. <snapshots>
  26. <enabled>true</enabled>
  27. </snapshots>
  28. </repository>
  29. </repositories>
  30. <properties>
  31. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  32. </properties>
  33. <build>
  34. <finalName>${artifactId}</finalName>
  35. <plugins>
  36. <plugin>
  37. <!-- YUI Compressor Maven压缩插件 -->
  38. <groupId>net.alchim31.maven</groupId>
  39. <artifactId>yuicompressor-maven-plugin</artifactId>
  40. <version>1.3.0</version>
  41. <configuration>
  42. <!-- 读取js,css文件采用UTF-8编码 -->
  43. <encoding>UTF-8</encoding>
  44. <!-- 不显示js可能的错误 -->
  45. <jswarn>false</jswarn>
  46. <!-- 若存在已压缩的文件,会先对比源文件是否有改动 有改动便压缩,无改动就不压缩 -->
  47. <force>true</force>
  48. <!-- 在指定的列号后插入新行 -->
  49. <linebreakpos>-1</linebreakpos>
  50. <!-- 压缩之前先执行聚合文件操作 -->
  51. <preProcessAggregates>false</preProcessAggregates>
  52. <!-- 压缩后保存文件后缀 -->
  53. <!-- <suffix>.min</suffix> -->
  54. <nosuffix>true</nosuffix>
  55. <!-- 源目录,即需压缩的根目录 -->
  56. <sourceDirectory>${basedir}/src</sourceDirectory>
  57. <!-- 压缩js和css文件 -->
  58. <includes>
  59. <include>**/*.js</include>
  60. <include>**/*.css</include>
  61. </includes>
  62. <!-- 以下目录和文件不会被压缩 -->
  63. <excludes>
  64. <exclude>**/*min.js</exclude>
  65. <exclude>**/*min.css</exclude>
  66. <exclude>**/webPlot/**/*.*</exclude>
  67. <exclude>static/js/lib/**/*.*</exclude>
  68. <exclude>static/css/**/*.*</exclude>
  69. <exclude>static/fonts/**/*.*</exclude>
  70. <!-- 文件太大会导致JVM内存溢出,所以暂时手动压缩 -->
  71. <exclude>pc/explorer/css/explorer.layout.css</exclude>
  72. <!-- 排除 UEditor 语法检测 -->
  73. <exclude>**/ueditor/**/*.*</exclude>
  74. <exclude>pc/govnew/**/*.*</exclude>
  75. <exclude>pc/powergov/js/bigScreen.min.bak.js</exclude>
  76. </excludes>
  77. <!-- 压缩后输出文件目录 -->
  78. <outputDirectory>${basedir}/min</outputDirectory>
  79. </configuration>
  80. </plugin>
  81. <plugin>
  82. <groupId>org.apache.maven.plugins</groupId>
  83. <artifactId>maven-assembly-plugin</artifactId>
  84. <version>2.2.1</version>
  85. <configuration>
  86. <descriptors>
  87. <descriptor>distribution.xml</descriptor>
  88. </descriptors>
  89. </configuration>
  90. <executions>
  91. <execution>
  92. <id>make-assembly</id>
  93. <phase>package</phase>
  94. <goals>
  95. <goal>single</goal>
  96. </goals>
  97. </execution>
  98. </executions>
  99. </plugin>
  100. </plugins>
  101. </build>
  102. </project>