pom.xml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <parent>
  5. <groupId>com.uas.platform</groupId>
  6. <artifactId>platform</artifactId>
  7. <version>0.0.1-SNAPSHOT</version>
  8. </parent>
  9. <artifactId>platform-home</artifactId>
  10. <packaging>war</packaging>
  11. <version>0.0.1</version>
  12. <name>platform-home Maven Webapp</name>
  13. <url>http://maven.apache.org</url>
  14. <dependencies>
  15. <!-- spring-webmvc -->
  16. <dependency>
  17. <groupId>org.springframework</groupId>
  18. <artifactId>spring-webmvc</artifactId>
  19. </dependency>
  20. <dependency>
  21. <groupId>org.springframework</groupId>
  22. <artifactId>spring-context-support</artifactId>
  23. </dependency>
  24. <!-- spring mobile -->
  25. <dependency>
  26. <groupId>org.springframework.mobile</groupId>
  27. <artifactId>spring-mobile-device</artifactId>
  28. </dependency>
  29. <!-- log4j -->
  30. <dependency>
  31. <groupId>log4j</groupId>
  32. <artifactId>log4j</artifactId>
  33. </dependency>
  34. <dependency>
  35. <groupId>commons-logging</groupId>
  36. <artifactId>commons-logging</artifactId>
  37. <version>1.1.1</version>
  38. </dependency>
  39. <!-- fastjson -->
  40. <dependency>
  41. <groupId>com.alibaba</groupId>
  42. <artifactId>fastjson</artifactId>
  43. </dependency>
  44. <!-- file upload -->
  45. <dependency>
  46. <groupId>commons-fileupload</groupId>
  47. <artifactId>commons-fileupload</artifactId>
  48. <version>1.3.2</version>
  49. </dependency>
  50. <dependency>
  51. <groupId>javax.servlet</groupId>
  52. <artifactId>servlet-api</artifactId>
  53. </dependency>
  54. <dependency>
  55. <groupId>com.uas.sso</groupId>
  56. <artifactId>sso-common</artifactId>
  57. <version>0.0.1-SNAPSHOT</version>
  58. <exclusions>
  59. <exclusion>
  60. <artifactId>tomcat-embed-core</artifactId>
  61. <groupId>org.apache.tomcat.embed</groupId>
  62. </exclusion>
  63. </exclusions>
  64. </dependency>
  65. <dependency>
  66. <groupId>org.apache.httpcomponents</groupId>
  67. <artifactId>httpclient</artifactId>
  68. <version>4.5.2</version>
  69. </dependency>
  70. </dependencies>
  71. <build>
  72. <finalName>home</finalName>
  73. <plugins>
  74. <plugin>
  75. <groupId>org.codehaus.mojo</groupId>
  76. <artifactId>buildnumber-maven-plugin</artifactId>
  77. <version>1.3</version>
  78. <executions>
  79. <execution>
  80. <phase>validate</phase>
  81. <goals>
  82. <goal>create-timestamp</goal>
  83. </goals>
  84. </execution>
  85. </executions>
  86. <configuration>
  87. <configuration>
  88. <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
  89. <items>
  90. <item>timestamp</item>
  91. </items>
  92. </configuration>
  93. </configuration>
  94. </plugin>
  95. <plugin>
  96. <groupId>org.apache.maven.plugins</groupId>
  97. <artifactId>maven-compiler-plugin</artifactId>
  98. <configuration>
  99. <source>1.7</source>
  100. <target>1.7</target>
  101. </configuration>
  102. </plugin>
  103. <plugin>
  104. <groupId>com.samaxes.maven</groupId>
  105. <artifactId>minify-maven-plugin</artifactId>
  106. <version>1.7.4</version>
  107. <!-- 静态文件压缩 -->
  108. <executions>
  109. <execution>
  110. <id>default-minify</id>
  111. <phase>prepare-package</phase>
  112. <configuration>
  113. <charset>UTF-8</charset>
  114. <skipMerge>true</skipMerge>
  115. <closureLanguage>ECMASCRIPT5</closureLanguage>
  116. <closureAngularPass>true</closureAngularPass>
  117. <nosuffix>true</nosuffix>
  118. <webappTargetDir>${project.build.directory}/minify</webappTargetDir>
  119. <cssSourceDir>resources</cssSourceDir>
  120. <cssEngine>YUI</cssEngine>
  121. <jsSourceDir>resources</jsSourceDir>
  122. <jsEngine>CLOSURE</jsEngine>
  123. <cssSourceIncludes>
  124. <cssSourceInclude>css/**/*.css</cssSourceInclude>
  125. <cssSourceInclude>data/**/*.json</cssSourceInclude>
  126. </cssSourceIncludes>
  127. <cssSourceExcludes>
  128. <cssSourceExclude>css/**/*.min.css</cssSourceExclude>
  129. </cssSourceExcludes>
  130. <jsSourceIncludes>
  131. <jsSourceInclude>js/**/*.js</jsSourceInclude>
  132. </jsSourceIncludes>
  133. <jsSourceExcludes>
  134. <jsSourceExclude>js/**/*.min.js</jsSourceExclude>
  135. </jsSourceExcludes>
  136. </configuration>
  137. <goals>
  138. <goal>minify</goal>
  139. </goals>
  140. </execution>
  141. </executions>
  142. </plugin>
  143. <plugin>
  144. <artifactId>maven-resources-plugin</artifactId>
  145. <executions>
  146. <execution>
  147. <id>copy-resources</id>
  148. <phase>prepare-package</phase>
  149. <goals>
  150. <goal>copy-resources</goal>
  151. </goals>
  152. <configuration>
  153. <outputDirectory>${project.build.directory}/minify</outputDirectory>
  154. <overwrite>false</overwrite>
  155. <resources>
  156. <resource>
  157. <directory>${basedir}/src/main/webapp</directory>
  158. </resource>
  159. </resources>
  160. </configuration>
  161. </execution>
  162. </executions>
  163. </plugin>
  164. <plugin>
  165. <groupId>com.uas.plugins</groupId>
  166. <artifactId>static-maven-plugin</artifactId>
  167. <version>0.0.2-SNAPSHOT</version>
  168. <!-- 静态资源分离 -->
  169. <executions>
  170. <execution>
  171. <id>default-static</id>
  172. <phase>prepare-package</phase>
  173. <configuration>
  174. <pathMatcher>static</pathMatcher>
  175. <staticUrl>static</staticUrl>
  176. <webappDir>${project.build.directory}/minify</webappDir>
  177. <sourceDir>/</sourceDir>
  178. <targetDir>${project.build.directory}/statics</targetDir>
  179. <staticDir>/</staticDir>
  180. <sourceIncludes>
  181. <sourceInclude>resources/js/**/*.js</sourceInclude>
  182. <sourceInclude>resources/data/**/*.json</sourceInclude>
  183. <sourceInclude>resources/tpl/**/*.html</sourceInclude>
  184. <sourceInclude>WEB-INF/views/**/*.html</sourceInclude>
  185. </sourceIncludes>
  186. http://static.ubtob.com/css/index.css?_v=1450321871828
  187. <versionSuffix>
  188. <suffix>?_v=${timestamp}</suffix>
  189. <exclude>*/require.js,*.min.js,*.min.css</exclude>
  190. </versionSuffix>
  191. </configuration>
  192. <goals>
  193. <goal>static</goal>
  194. </goals>
  195. </execution>
  196. </executions>
  197. </plugin>
  198. <plugin>
  199. <groupId>org.apache.maven.plugins</groupId>
  200. <artifactId>maven-war-plugin</artifactId>
  201. <version>2.4</version>
  202. <configuration>
  203. <webResources>
  204. <resource>
  205. <directory>${project.build.directory}/statics</directory>
  206. </resource>
  207. <resource>
  208. <directory>${project.build.directory}/minify</directory>
  209. </resource>
  210. </webResources>
  211. </configuration>
  212. </plugin>
  213. <plugin>
  214. <groupId>org.apache.tomcat.maven</groupId>
  215. <artifactId>tomcat7-maven-plugin</artifactId>
  216. <version>2.2</version>
  217. <configuration>
  218. <port>80</port>
  219. <path>/</path>
  220. <uriEncoding>utf-8</uriEncoding>
  221. </configuration>
  222. </plugin>
  223. </plugins>
  224. </build>
  225. <organization>
  226. <name>usoft</name>
  227. <url>http://www.usoftchina.com</url>
  228. </organization>
  229. <distributionManagement>
  230. <!-- 发布release仓库 -->
  231. <repository>
  232. <id>platform-release</id>
  233. <name>platform-release</name>
  234. <url>http://113.105.74.141:8081/artifactory/libs-release-local</url>
  235. </repository>
  236. <!-- 发布快照版本 -->
  237. <snapshotRepository>
  238. <id>platform-snapshots</id>
  239. <name>platform-snapshots</name>
  240. <url>http://113.105.74.141:8081/artifactory/libs-snapshot-local</url>
  241. </snapshotRepository>
  242. </distributionManagement>
  243. </project>