pom.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589
  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. <!--lombok-->
  329. <dependency>
  330. <groupId>org.projectlombok</groupId>
  331. <artifactId>lombok</artifactId>
  332. <scope>provided</scope>
  333. <version>1.16.20</version>
  334. </dependency>
  335. <!-- hessian -->
  336. <dependency>
  337. <groupId>com.caucho</groupId>
  338. <artifactId>hessian</artifactId>
  339. </dependency>
  340. <!-- search on dubbo -->
  341. <dependency>
  342. <groupId>com.uas.search</groupId>
  343. <artifactId>search-api-b2b</artifactId>
  344. <version>0.1.9-SNAPSHOT</version>
  345. </dependency>
  346. <!-- dfs on dubbo -->
  347. <dependency>
  348. <groupId>com.uas.dfs</groupId>
  349. <artifactId>dfs-api</artifactId>
  350. </dependency>
  351. <dependency>
  352. <groupId>org.projectlombok</groupId>
  353. <artifactId>lombok</artifactId>
  354. <version>1.16.20</version>
  355. </dependency>
  356. <!-- spring-rabbit -->
  357. <dependency>
  358. <groupId>org.springframework.amqp</groupId>
  359. <artifactId>spring-rabbit</artifactId>
  360. <version>1.7.7.RELEASE</version>
  361. </dependency>
  362. <dependency>
  363. <groupId>com.rabbitmq</groupId>
  364. <artifactId>amqp-client</artifactId>
  365. <version>4.2.0</version>
  366. </dependency>
  367. <dependency>
  368. <groupId>org.springframework</groupId>
  369. <artifactId>spring-core</artifactId>
  370. <version>4.1.6.RELEASE</version>
  371. </dependency>
  372. </dependencies>
  373. <build>
  374. <finalName>platform-b2b</finalName>
  375. <!-- 受profile影响的目录 -->
  376. <resources>
  377. <resource>
  378. <directory>${basedir}/src/main/resources</directory>
  379. <filtering>true</filtering>
  380. <excludes>
  381. <exclude>**/*.xls</exclude>
  382. </excludes>
  383. </resource>
  384. <!-- xls文件不能filter处理,需区分出来 -->
  385. <resource>
  386. <directory>${basedir}/src/main/resources</directory>
  387. <filtering>false</filtering>
  388. <includes>
  389. <include>**/*.xls</include>
  390. </includes>
  391. </resource>
  392. </resources>
  393. <!-- 在maven生命周期validate阶段生成timestamp -->
  394. <plugins>
  395. <plugin>
  396. <groupId>org.codehaus.mojo</groupId>
  397. <artifactId>buildnumber-maven-plugin</artifactId>
  398. <version>1.3</version>
  399. <executions>
  400. <execution>
  401. <phase>validate</phase>
  402. <goals>
  403. <goal>create-timestamp</goal>
  404. </goals>
  405. </execution>
  406. </executions>
  407. <configuration>
  408. <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
  409. <items>
  410. <item>timestamp</item>
  411. </items>
  412. </configuration>
  413. </plugin>
  414. <plugin>
  415. <groupId>org.apache.maven.plugins</groupId>
  416. <artifactId>maven-compiler-plugin</artifactId>
  417. <configuration>
  418. <source>${maven.compiler.source}</source>
  419. <target>${maven.compiler.target}</target>
  420. </configuration>
  421. </plugin>
  422. <plugin>
  423. <groupId>com.samaxes.maven</groupId>
  424. <artifactId>minify-maven-plugin</artifactId>
  425. <version>1.7.4</version>
  426. <!-- 静态文件压缩 -->
  427. <executions>
  428. <execution>
  429. <id>default-minify</id>
  430. <phase>prepare-package</phase>
  431. <configuration>
  432. <charset>UTF-8</charset>
  433. <skipMerge>true</skipMerge>
  434. <closureLanguage>ECMASCRIPT5</closureLanguage>
  435. <closureAngularPass>true</closureAngularPass>
  436. <nosuffix>true</nosuffix>
  437. <webappTargetDir>${project.build.directory}/minify</webappTargetDir>
  438. <cssSourceDir>resources</cssSourceDir>
  439. <cssEngine>YUI</cssEngine>
  440. <jsSourceDir>resources</jsSourceDir>
  441. <jsEngine>CLOSURE</jsEngine>
  442. <cssSourceIncludes>
  443. <cssSourceInclude>css/**/*.css</cssSourceInclude>
  444. <cssSourceInclude>data/**/*.json</cssSourceInclude>
  445. </cssSourceIncludes>
  446. <cssSourceExcludes>
  447. <cssSourceExclude>css/**/*.min.css</cssSourceExclude>
  448. </cssSourceExcludes>
  449. <jsSourceIncludes>
  450. <jsSourceInclude>js/**/*.js</jsSourceInclude>
  451. </jsSourceIncludes>
  452. <jsSourceExcludes>
  453. <jsSourceExclude>js/**/*.min.js</jsSourceExclude>
  454. </jsSourceExcludes>
  455. </configuration>
  456. <goals>
  457. <goal>minify</goal>
  458. </goals>
  459. </execution>
  460. </executions>
  461. </plugin>
  462. <plugin>
  463. <artifactId>maven-resources-plugin</artifactId>
  464. <executions>
  465. <execution>
  466. <id>copy-resources</id>
  467. <phase>prepare-package</phase>
  468. <goals>
  469. <goal>copy-resources</goal>
  470. </goals>
  471. <configuration>
  472. <outputDirectory>${project.build.directory}/minify</outputDirectory>
  473. <overwrite>false</overwrite>
  474. <resources>
  475. <resource>
  476. <directory>${basedir}/src/main/webapp</directory>
  477. </resource>
  478. </resources>
  479. </configuration>
  480. </execution>
  481. </executions>
  482. </plugin>
  483. <plugin>
  484. <groupId>com.uas.plugins</groupId>
  485. <artifactId>static-maven-plugin</artifactId>
  486. <version>0.0.2-SNAPSHOT</version>
  487. <!-- 静态资源分离 -->
  488. <executions>
  489. <execution>
  490. <id>default-static</id>
  491. <phase>prepare-package</phase>
  492. <configuration>
  493. <pathMatcher>static</pathMatcher>
  494. <staticUrl>${static-path}</staticUrl>
  495. <webappDir>${project.build.directory}/minify</webappDir>
  496. <sourceDir>/</sourceDir>
  497. <targetDir>${project.build.directory}/statics</targetDir>
  498. <staticDir>/</staticDir>
  499. <sourceIncludes>
  500. <sourceInclude>resources/js/**/*.js</sourceInclude>
  501. <sourceInclude>resources/data/**/*.json</sourceInclude>
  502. <sourceInclude>resources/tpl/**/*.html</sourceInclude>
  503. <sourceInclude>WEB-INF/views/**/*.html</sourceInclude>
  504. </sourceIncludes>
  505. <!--http://static.ubtob.com/css/index.css?_v=1450321871828-->
  506. <versionSuffix>
  507. <suffix>?_v=${timestamp}</suffix>
  508. <exclude>*/require.js,*.min.js,*.min.css</exclude>
  509. </versionSuffix>
  510. </configuration>
  511. <goals>
  512. <goal>static</goal>
  513. </goals>
  514. </execution>
  515. </executions>
  516. </plugin>
  517. <plugin>
  518. <groupId>org.apache.maven.plugins</groupId>
  519. <artifactId>maven-war-plugin</artifactId>
  520. <version>2.4</version>
  521. <configuration>
  522. <webResources>
  523. <resource>
  524. <directory>${project.build.directory}/statics</directory>
  525. </resource>
  526. <resource>
  527. <directory>${project.build.directory}/minify</directory>
  528. </resource>
  529. </webResources>
  530. </configuration>
  531. </plugin>
  532. <plugin>
  533. <groupId>org.apache.tomcat.maven</groupId>
  534. <artifactId>tomcat7-maven-plugin</artifactId>
  535. <version>2.2</version>
  536. <configuration>
  537. <port>8090</port>
  538. <path>/platform-b2b</path>
  539. <uriEncoding>utf-8</uriEncoding>
  540. </configuration>
  541. </plugin>
  542. </plugins>
  543. <pluginManagement>
  544. <plugins>
  545. <plugin>
  546. <groupId>org.eclipse.m2e</groupId>
  547. <artifactId>lifecycle-mapping</artifactId>
  548. <version>1.0.0</version>
  549. <configuration>
  550. <lifecycleMappingMetadata>
  551. <pluginExecutions>
  552. <pluginExecution>
  553. <pluginExecutionFilter>
  554. <groupId>
  555. org.codehaus.mojo
  556. </groupId>
  557. <artifactId>
  558. buildnumber-maven-plugin
  559. </artifactId>
  560. <versionRange>
  561. [1.3,)
  562. </versionRange>
  563. <goals>
  564. <goal>
  565. create-timestamp
  566. </goal>
  567. </goals>
  568. </pluginExecutionFilter>
  569. <action>
  570. <ignore></ignore>
  571. </action>
  572. </pluginExecution>
  573. </pluginExecutions>
  574. </lifecycleMappingMetadata>
  575. </configuration>
  576. </plugin>
  577. </plugins>
  578. </pluginManagement>
  579. </build>
  580. </project>