pom.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521
  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. <artifactId>platform-b2b</artifactId>
  5. <packaging>war</packaging>
  6. <name>platform-b2b Maven Webapp</name>
  7. <url>http://maven.apache.org</url>
  8. <parent>
  9. <groupId>com.uas.platform</groupId>
  10. <artifactId>platform</artifactId>
  11. <version>0.0.1-SNAPSHOT</version>
  12. <relativePath>../platform</relativePath>
  13. </parent>
  14. <profiles>
  15. <profile>
  16. <!-- 开发环境 -->
  17. <id>dev</id>
  18. <properties>
  19. <profile>dev</profile>
  20. <!-- static plugin -->
  21. <static-path>static</static-path>
  22. </properties>
  23. </profile>
  24. <profile>
  25. <!-- 测试环境 -->
  26. <id>test</id>
  27. <properties>
  28. <profile>test</profile>
  29. <!-- static plugin -->
  30. <static-path>static</static-path>
  31. </properties>
  32. <!-- 默认 -->
  33. <activation>
  34. <activeByDefault>true</activeByDefault>
  35. </activation>
  36. </profile>
  37. <profile>
  38. <!-- 生产环境 -->
  39. <id>prod</id>
  40. <properties>
  41. <profile>prod</profile>
  42. <!-- static plugin -->
  43. <static-path>http://static.ubtob.com</static-path>
  44. </properties>
  45. </profile>
  46. </profiles>
  47. <dependencies>
  48. <dependency>
  49. <groupId>javax.servlet</groupId>
  50. <artifactId>servlet-api</artifactId>
  51. </dependency>
  52. <dependency>
  53. <groupId>junit</groupId>
  54. <artifactId>junit</artifactId>
  55. <scope>test</scope>
  56. </dependency>
  57. <dependency>
  58. <groupId>com.uas.platform</groupId>
  59. <artifactId>platform-core</artifactId>
  60. </dependency>
  61. <!-- spring -->
  62. <dependency>
  63. <groupId>org.springframework</groupId>
  64. <artifactId>spring-context</artifactId>
  65. </dependency>
  66. <dependency>
  67. <groupId>org.springframework</groupId>
  68. <artifactId>spring-context-support</artifactId>
  69. </dependency>
  70. <dependency>
  71. <groupId>org.springframework</groupId>
  72. <artifactId>spring-webmvc</artifactId>
  73. </dependency>
  74. <dependency>
  75. <groupId>org.springframework</groupId>
  76. <artifactId>spring-jdbc</artifactId>
  77. </dependency>
  78. <dependency>
  79. <groupId>org.springframework</groupId>
  80. <artifactId>spring-tx</artifactId>
  81. </dependency>
  82. <dependency>
  83. <groupId>org.springframework</groupId>
  84. <artifactId>spring-aop</artifactId>
  85. </dependency>
  86. <dependency>
  87. <groupId>org.springframework</groupId>
  88. <artifactId>spring-aspects</artifactId>
  89. </dependency>
  90. <!-- jpa -->
  91. <dependency>
  92. <groupId>org.springframework.data</groupId>
  93. <artifactId>spring-data-jpa</artifactId>
  94. </dependency>
  95. <!-- -->
  96. <dependency>
  97. <groupId>commons-fileupload</groupId>
  98. <artifactId>commons-fileupload</artifactId>
  99. <version>1.3.1</version>
  100. </dependency>
  101. <!-- sendMsg -->
  102. <dependency>
  103. <groupId>org.apache.axis</groupId>
  104. <artifactId>axis</artifactId>
  105. <version>1.6.0</version>
  106. </dependency>
  107. <dependency>
  108. <groupId>org.apache.axis.jaxrpc</groupId>
  109. <artifactId>axis-jaxrpc</artifactId>
  110. <version>1.4</version>
  111. </dependency>
  112. <dependency>
  113. <groupId>commons-discovery</groupId>
  114. <artifactId>commons-discovery</artifactId>
  115. <version>0.4</version>
  116. </dependency>
  117. <dependency>
  118. <groupId>com.ibm</groupId>
  119. <artifactId>wsdl4j</artifactId>
  120. <version>1.4</version>
  121. </dependency>
  122. <!-- hibernate -->
  123. <dependency>
  124. <groupId>org.hibernate</groupId>
  125. <artifactId>hibernate-core</artifactId>
  126. </dependency>
  127. <dependency>
  128. <groupId>org.hibernate</groupId>
  129. <artifactId>hibernate-entitymanager</artifactId>
  130. <exclusions>
  131. <exclusion>
  132. <groupId>cglib</groupId>
  133. <artifactId>cglib</artifactId>
  134. </exclusion>
  135. <exclusion>
  136. <groupId>dom4j</groupId>
  137. <artifactId>dom4j</artifactId>
  138. </exclusion>
  139. </exclusions>
  140. </dependency>
  141. <dependency>
  142. <groupId>commons-collections</groupId>
  143. <artifactId>commons-collections</artifactId>
  144. </dependency>
  145. <dependency>
  146. <groupId>org.hibernate</groupId>
  147. <artifactId>hibernate-validator</artifactId>
  148. </dependency>
  149. <dependency>
  150. <groupId>org.aspectj</groupId>
  151. <artifactId>aspectjrt</artifactId>
  152. </dependency>
  153. <dependency>
  154. <groupId>org.aspectj</groupId>
  155. <artifactId>aspectjweaver</artifactId>
  156. </dependency>
  157. <dependency>
  158. <groupId>org.apache.commons</groupId>
  159. <artifactId>commons-lang3</artifactId>
  160. </dependency>
  161. <dependency>
  162. <groupId>javax.validation</groupId>
  163. <artifactId>validation-api</artifactId>
  164. </dependency>
  165. <dependency>
  166. <groupId>javax.transaction</groupId>
  167. <artifactId>jta</artifactId>
  168. </dependency>
  169. <dependency>
  170. <groupId>org.hibernate</groupId>
  171. <artifactId>hibernate-ehcache</artifactId>
  172. </dependency>
  173. <!-- jdbc -->
  174. <dependency>
  175. <groupId>com.oracle</groupId>
  176. <artifactId>ojdbc6</artifactId>
  177. </dependency>
  178. <dependency>
  179. <groupId>org.springframework</groupId>
  180. <artifactId>spring-orm</artifactId>
  181. </dependency>
  182. <dependency>
  183. <groupId>commons-pool</groupId>
  184. <artifactId>commons-pool</artifactId>
  185. </dependency>
  186. <dependency>
  187. <groupId>com.alibaba</groupId>
  188. <artifactId>druid</artifactId>
  189. </dependency>
  190. <!-- spring mobile -->
  191. <dependency>
  192. <groupId>org.springframework.mobile</groupId>
  193. <artifactId>spring-mobile-device</artifactId>
  194. </dependency>
  195. <!--json-lib -->
  196. <dependency>
  197. <groupId>net.sf.json-lib</groupId>
  198. <artifactId>json-lib</artifactId>
  199. <classifier>jdk15</classifier>
  200. </dependency>
  201. <dependency>
  202. <groupId>org.codehaus.jackson</groupId>
  203. <artifactId>jackson-core-asl</artifactId>
  204. </dependency>
  205. <dependency>
  206. <groupId>org.codehaus.jackson</groupId>
  207. <artifactId>jackson-mapper-asl</artifactId>
  208. </dependency>
  209. <dependency>
  210. <groupId>com.fasterxml.jackson.core</groupId>
  211. <artifactId>jackson-core</artifactId>
  212. </dependency>
  213. <dependency>
  214. <groupId>com.fasterxml.jackson.core</groupId>
  215. <artifactId>jackson-databind</artifactId>
  216. </dependency>
  217. <dependency>
  218. <groupId>com.fasterxml.jackson.core</groupId>
  219. <artifactId>jackson-annotations</artifactId>
  220. </dependency>
  221. <dependency>
  222. <groupId>com.alibaba</groupId>
  223. <artifactId>fastjson</artifactId>
  224. </dependency>
  225. <!-- velocity -->
  226. <dependency>
  227. <groupId>org.apache.velocity</groupId>
  228. <artifactId>velocity</artifactId>
  229. </dependency>
  230. <!-- mail -->
  231. <dependency>
  232. <groupId>javax.mail</groupId>
  233. <artifactId>mail</artifactId>
  234. </dependency>
  235. <!-- xinge -->
  236. <dependency>
  237. <groupId>tencent</groupId>
  238. <artifactId>xinge</artifactId>
  239. <version>1.1.4</version>
  240. </dependency>
  241. <!-- jxls -->
  242. <dependency>
  243. <groupId>net.sf.jxls</groupId>
  244. <artifactId>jxls-core</artifactId>
  245. <version>1.0.4</version>
  246. </dependency>
  247. <dependency>
  248. <groupId>net.sf.jxls</groupId>
  249. <artifactId>jxls-reader</artifactId>
  250. <version>1.0.4</version>
  251. </dependency>
  252. <!-- redis -->
  253. <dependency>
  254. <groupId>redis.clients</groupId>
  255. <artifactId>jedis</artifactId>
  256. <version>2.7.3</version>
  257. </dependency>
  258. <dependency>
  259. <groupId>org.springframework.data</groupId>
  260. <artifactId>spring-data-redis</artifactId>
  261. <version>1.6.0.RELEASE</version>
  262. </dependency>
  263. <!-- 邮件 -->
  264. <dependency>
  265. <groupId>com.uas.message</groupId>
  266. <artifactId>message-mail-api</artifactId>
  267. </dependency>
  268. <!-- 消息-->
  269. <dependency>
  270. <groupId>com.uas.message</groupId>
  271. <artifactId>message-sms-api</artifactId>
  272. </dependency>
  273. <dependency>
  274. <groupId>com.uas.account</groupId>
  275. <artifactId>account-common</artifactId>
  276. </dependency>
  277. <!-- dubbo -->
  278. <dependency>
  279. <groupId>com.alibaba</groupId>
  280. <artifactId>dubbo</artifactId>
  281. <exclusions>
  282. <exclusion>
  283. <groupId>javax.servlet</groupId>
  284. <artifactId>javax.servlet-api</artifactId>
  285. </exclusion>
  286. <exclusion>
  287. <groupId>org.apache.httpcomponents</groupId>
  288. <artifactId>httpcore</artifactId>
  289. </exclusion>
  290. </exclusions>
  291. </dependency>
  292. <dependency>
  293. <groupId>com.github.sgroschupf</groupId>
  294. <artifactId>zkclient</artifactId>
  295. </dependency>
  296. <!-- hessian -->
  297. <dependency>
  298. <groupId>com.caucho</groupId>
  299. <artifactId>hessian</artifactId>
  300. </dependency>
  301. <!-- search on dubbo -->
  302. <dependency>
  303. <groupId>com.uas.search</groupId>
  304. <artifactId>search-api-b2b</artifactId>
  305. </dependency>
  306. <!-- dfs on dubbo -->
  307. <dependency>
  308. <groupId>com.uas.dfs</groupId>
  309. <artifactId>dfs-api</artifactId>
  310. </dependency>
  311. </dependencies>
  312. <build>
  313. <finalName>platform-b2b</finalName>
  314. <!-- 受profile影响的目录 -->
  315. <resources>
  316. <resource>
  317. <directory>${basedir}/src/main/resources</directory>
  318. <filtering>true</filtering>
  319. <excludes>
  320. <exclude>**/*.xls</exclude>
  321. </excludes>
  322. </resource>
  323. <!-- xls文件不能filter处理,需区分出来 -->
  324. <resource>
  325. <directory>${basedir}/src/main/resources</directory>
  326. <filtering>false</filtering>
  327. <includes>
  328. <include>**/*.xls</include>
  329. </includes>
  330. </resource>
  331. </resources>
  332. <!-- 在maven生命周期validate阶段生成timestamp -->
  333. <plugins>
  334. <plugin>
  335. <groupId>org.codehaus.mojo</groupId>
  336. <artifactId>buildnumber-maven-plugin</artifactId>
  337. <version>1.3</version>
  338. <executions>
  339. <execution>
  340. <phase>validate</phase>
  341. <goals>
  342. <goal>create-timestamp</goal>
  343. </goals>
  344. </execution>
  345. </executions>
  346. <configuration>
  347. <configuration>
  348. <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
  349. <items>
  350. <item>timestamp</item>
  351. </items>
  352. </configuration>
  353. </configuration>
  354. </plugin>
  355. <plugin>
  356. <groupId>org.apache.maven.plugins</groupId>
  357. <artifactId>maven-compiler-plugin</artifactId>
  358. <configuration>
  359. <source>1.7</source>
  360. <target>1.7</target>
  361. </configuration>
  362. </plugin>
  363. <plugin>
  364. <groupId>com.samaxes.maven</groupId>
  365. <artifactId>minify-maven-plugin</artifactId>
  366. <version>1.7.4</version>
  367. <!-- 静态文件压缩 -->
  368. <executions>
  369. <execution>
  370. <id>default-minify</id>
  371. <phase>prepare-package</phase>
  372. <configuration>
  373. <charset>UTF-8</charset>
  374. <skipMerge>true</skipMerge>
  375. <closureLanguage>ECMASCRIPT5</closureLanguage>
  376. <closureAngularPass>true</closureAngularPass>
  377. <nosuffix>true</nosuffix>
  378. <webappTargetDir>${project.build.directory}/minify</webappTargetDir>
  379. <cssSourceDir>resources</cssSourceDir>
  380. <cssEngine>YUI</cssEngine>
  381. <jsSourceDir>resources</jsSourceDir>
  382. <jsEngine>CLOSURE</jsEngine>
  383. <cssSourceIncludes>
  384. <cssSourceInclude>css/**/*.css</cssSourceInclude>
  385. <cssSourceInclude>data/**/*.json</cssSourceInclude>
  386. </cssSourceIncludes>
  387. <cssSourceExcludes>
  388. <cssSourceExclude>css/**/*.min.css</cssSourceExclude>
  389. </cssSourceExcludes>
  390. <jsSourceIncludes>
  391. <jsSourceInclude>js/**/*.js</jsSourceInclude>
  392. </jsSourceIncludes>
  393. <jsSourceExcludes>
  394. <jsSourceExclude>js/**/*.min.js</jsSourceExclude>
  395. </jsSourceExcludes>
  396. </configuration>
  397. <goals>
  398. <goal>minify</goal>
  399. </goals>
  400. </execution>
  401. </executions>
  402. </plugin>
  403. <plugin>
  404. <artifactId>maven-resources-plugin</artifactId>
  405. <executions>
  406. <execution>
  407. <id>copy-resources</id>
  408. <phase>prepare-package</phase>
  409. <goals>
  410. <goal>copy-resources</goal>
  411. </goals>
  412. <configuration>
  413. <outputDirectory>${project.build.directory}/minify</outputDirectory>
  414. <overwrite>false</overwrite>
  415. <resources>
  416. <resource>
  417. <directory>${basedir}/src/main/webapp</directory>
  418. </resource>
  419. </resources>
  420. </configuration>
  421. </execution>
  422. </executions>
  423. </plugin>
  424. <plugin>
  425. <groupId>com.uas.plugins</groupId>
  426. <artifactId>static-maven-plugin</artifactId>
  427. <version>0.0.2-SNAPSHOT</version>
  428. <!-- 静态资源分离 -->
  429. <executions>
  430. <execution>
  431. <id>default-static</id>
  432. <phase>prepare-package</phase>
  433. <configuration>
  434. <pathMatcher>static</pathMatcher>
  435. <staticUrl>${static-path}</staticUrl>
  436. <webappDir>${project.build.directory}/minify</webappDir>
  437. <sourceDir>/</sourceDir>
  438. <targetDir>${project.build.directory}/statics</targetDir>
  439. <staticDir>/</staticDir>
  440. <sourceIncludes>
  441. <sourceInclude>resources/js/**/*.js</sourceInclude>
  442. <sourceInclude>resources/data/**/*.json</sourceInclude>
  443. <sourceInclude>resources/tpl/**/*.html</sourceInclude>
  444. <sourceInclude>WEB-INF/views/**/*.html</sourceInclude>
  445. </sourceIncludes>
  446. http://static.ubtob.com/css/index.css?_v=1450321871828
  447. <versionSuffix>
  448. <suffix>?_v=${timestamp}</suffix>
  449. <exclude>*/require.js,*.min.js,*.min.css</exclude>
  450. </versionSuffix>
  451. </configuration>
  452. <goals>
  453. <goal>static</goal>
  454. </goals>
  455. </execution>
  456. </executions>
  457. </plugin>
  458. <plugin>
  459. <groupId>org.apache.maven.plugins</groupId>
  460. <artifactId>maven-war-plugin</artifactId>
  461. <version>2.4</version>
  462. <configuration>
  463. <webResources>
  464. <resource>
  465. <directory>${project.build.directory}/statics</directory>
  466. </resource>
  467. <resource>
  468. <directory>${project.build.directory}/minify</directory>
  469. </resource>
  470. </webResources>
  471. </configuration>
  472. </plugin>
  473. </plugins>
  474. <pluginManagement>
  475. <plugins>
  476. <plugin>
  477. <groupId>org.eclipse.m2e</groupId>
  478. <artifactId>lifecycle-mapping</artifactId>
  479. <version>1.0.0</version>
  480. <configuration>
  481. <lifecycleMappingMetadata>
  482. <pluginExecutions>
  483. <pluginExecution>
  484. <pluginExecutionFilter>
  485. <groupId>
  486. org.codehaus.mojo
  487. </groupId>
  488. <artifactId>
  489. buildnumber-maven-plugin
  490. </artifactId>
  491. <versionRange>
  492. [1.3,)
  493. </versionRange>
  494. <goals>
  495. <goal>
  496. create-timestamp
  497. </goal>
  498. </goals>
  499. </pluginExecutionFilter>
  500. <action>
  501. <ignore></ignore>
  502. </action>
  503. </pluginExecution>
  504. </pluginExecutions>
  505. </lifecycleMappingMetadata>
  506. </configuration>
  507. </plugin>
  508. </plugins>
  509. </pluginManagement>
  510. </build>
  511. <properties>
  512. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  513. <maven.compiler.source>1.7</maven.compiler.source>
  514. <maven.compiler.target>1.7</maven.compiler.target>
  515. <skipTests>true</skipTests>
  516. </properties>
  517. </project>