pom.xml 21 KB

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