pom.xml 22 KB

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