pom.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  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. </profile>
  32. <profile>
  33. <!-- 生产环境 -->
  34. <id>ptest</id>
  35. <properties>
  36. <profile>ptest</profile>
  37. <!-- static plugin -->
  38. <static-path>static</static-path>
  39. </properties>
  40. </profile>
  41. <profile>
  42. <!-- 腾讯云环境 -->
  43. <id>txcloud</id>
  44. <properties>
  45. <profile>txcloud</profile>
  46. <!-- static plugin -->
  47. <static-path>static</static-path>
  48. </properties>
  49. </profile>
  50. <profile>
  51. <!-- 默认 -->
  52. <activation>
  53. <activeByDefault>true</activeByDefault>
  54. </activation>
  55. <!-- 预部署环境 -->
  56. <id>pre</id>
  57. <properties>
  58. <profile>pre</profile>
  59. <!-- static plugin -->
  60. <static-path>static</static-path>
  61. </properties>
  62. </profile>
  63. </profiles>
  64. <properties>
  65. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  66. <maven.compiler.source>1.8</maven.compiler.source>
  67. <maven.compiler.target>1.8</maven.compiler.target>
  68. <skipTests>true</skipTests>
  69. </properties>
  70. <dependencies>
  71. <dependency>
  72. <groupId>javax.servlet</groupId>
  73. <artifactId>javax.servlet-api</artifactId>
  74. <version>3.0.1</version>
  75. <scope>test</scope>
  76. </dependency>
  77. <dependency>
  78. <groupId>javax.servlet</groupId>
  79. <artifactId>servlet-api</artifactId>
  80. </dependency>
  81. <dependency>
  82. <groupId>junit</groupId>
  83. <artifactId>junit</artifactId>
  84. <scope>test</scope>
  85. </dependency>
  86. <dependency>
  87. <groupId>com.uas.platform</groupId>
  88. <artifactId>platform-core</artifactId>
  89. </dependency>
  90. <!-- spring -->
  91. <dependency>
  92. <groupId>org.springframework</groupId>
  93. <artifactId>spring-context</artifactId>
  94. </dependency>
  95. <dependency>
  96. <groupId>org.springframework</groupId>
  97. <artifactId>spring-context-support</artifactId>
  98. </dependency>
  99. <dependency>
  100. <groupId>org.springframework</groupId>
  101. <artifactId>spring-webmvc</artifactId>
  102. </dependency>
  103. <dependency>
  104. <groupId>org.springframework</groupId>
  105. <artifactId>spring-jdbc</artifactId>
  106. </dependency>
  107. <dependency>
  108. <groupId>org.springframework</groupId>
  109. <artifactId>spring-tx</artifactId>
  110. </dependency>
  111. <dependency>
  112. <groupId>org.springframework</groupId>
  113. <artifactId>spring-aop</artifactId>
  114. </dependency>
  115. <dependency>
  116. <groupId>org.springframework</groupId>
  117. <artifactId>spring-aspects</artifactId>
  118. </dependency>
  119. <!-- jpa -->
  120. <dependency>
  121. <groupId>org.springframework.data</groupId>
  122. <artifactId>spring-data-jpa</artifactId>
  123. </dependency>
  124. <dependency>
  125. <groupId>org.springframework</groupId>
  126. <artifactId>spring-test</artifactId>
  127. <version>4.1.6.RELEASE</version>
  128. <scope>test</scope>
  129. </dependency>
  130. <!-- -->
  131. <dependency>
  132. <groupId>commons-fileupload</groupId>
  133. <artifactId>commons-fileupload</artifactId>
  134. <version>1.3.1</version>
  135. </dependency>
  136. <!-- sendMsg -->
  137. <dependency>
  138. <groupId>org.apache.axis</groupId>
  139. <artifactId>axis</artifactId>
  140. <version>1.6.0</version>
  141. </dependency>
  142. <dependency>
  143. <groupId>org.apache.axis.jaxrpc</groupId>
  144. <artifactId>axis-jaxrpc</artifactId>
  145. <version>1.4</version>
  146. </dependency>
  147. <dependency>
  148. <groupId>commons-discovery</groupId>
  149. <artifactId>commons-discovery</artifactId>
  150. <version>0.4</version>
  151. </dependency>
  152. <dependency>
  153. <groupId>com.ibm</groupId>
  154. <artifactId>wsdl4j</artifactId>
  155. <version>1.4</version>
  156. </dependency>
  157. <!-- hibernate -->
  158. <dependency>
  159. <groupId>org.hibernate</groupId>
  160. <artifactId>hibernate-core</artifactId>
  161. </dependency>
  162. <dependency>
  163. <groupId>org.hibernate</groupId>
  164. <artifactId>hibernate-entitymanager</artifactId>
  165. <exclusions>
  166. <exclusion>
  167. <groupId>cglib</groupId>
  168. <artifactId>cglib</artifactId>
  169. </exclusion>
  170. <exclusion>
  171. <groupId>dom4j</groupId>
  172. <artifactId>dom4j</artifactId>
  173. </exclusion>
  174. </exclusions>
  175. </dependency>
  176. <dependency>
  177. <groupId>commons-collections</groupId>
  178. <artifactId>commons-collections</artifactId>
  179. </dependency>
  180. <dependency>
  181. <groupId>org.hibernate</groupId>
  182. <artifactId>hibernate-validator</artifactId>
  183. </dependency>
  184. <dependency>
  185. <groupId>org.aspectj</groupId>
  186. <artifactId>aspectjrt</artifactId>
  187. </dependency>
  188. <dependency>
  189. <groupId>org.aspectj</groupId>
  190. <artifactId>aspectjweaver</artifactId>
  191. </dependency>
  192. <dependency>
  193. <groupId>org.apache.commons</groupId>
  194. <artifactId>commons-lang3</artifactId>
  195. </dependency>
  196. <dependency>
  197. <groupId>javax.validation</groupId>
  198. <artifactId>validation-api</artifactId>
  199. </dependency>
  200. <dependency>
  201. <groupId>javax.transaction</groupId>
  202. <artifactId>jta</artifactId>
  203. </dependency>
  204. <dependency>
  205. <groupId>org.hibernate</groupId>
  206. <artifactId>hibernate-ehcache</artifactId>
  207. </dependency>
  208. <!-- jdbc -->
  209. <!--oracle-->
  210. <dependency>
  211. <groupId>com.oracle</groupId>
  212. <artifactId>ojdbc6</artifactId>
  213. </dependency>
  214. <!-- mysql -->
  215. <dependency>
  216. <groupId>mysql</groupId>
  217. <artifactId>mysql-connector-java</artifactId>
  218. <version>5.1.21</version>
  219. </dependency>
  220. <dependency>
  221. <groupId>org.springframework</groupId>
  222. <artifactId>spring-orm</artifactId>
  223. </dependency>
  224. <dependency>
  225. <groupId>commons-pool</groupId>
  226. <artifactId>commons-pool</artifactId>
  227. </dependency>
  228. <dependency>
  229. <groupId>com.alibaba</groupId>
  230. <artifactId>druid</artifactId>
  231. <version>1.1.6</version>
  232. </dependency>
  233. <!-- spring mobile -->
  234. <dependency>
  235. <groupId>org.springframework.mobile</groupId>
  236. <artifactId>spring-mobile-device</artifactId>
  237. </dependency>
  238. <!--json-lib -->
  239. <dependency>
  240. <groupId>net.sf.json-lib</groupId>
  241. <artifactId>json-lib</artifactId>
  242. <classifier>jdk15</classifier>
  243. </dependency>
  244. <dependency>
  245. <groupId>org.codehaus.jackson</groupId>
  246. <artifactId>jackson-core-asl</artifactId>
  247. </dependency>
  248. <dependency>
  249. <groupId>org.codehaus.jackson</groupId>
  250. <artifactId>jackson-mapper-asl</artifactId>
  251. </dependency>
  252. <dependency>
  253. <groupId>com.fasterxml.jackson.core</groupId>
  254. <artifactId>jackson-core</artifactId>
  255. </dependency>
  256. <dependency>
  257. <groupId>com.fasterxml.jackson.core</groupId>
  258. <artifactId>jackson-databind</artifactId>
  259. </dependency>
  260. <dependency>
  261. <groupId>com.fasterxml.jackson.core</groupId>
  262. <artifactId>jackson-annotations</artifactId>
  263. </dependency>
  264. <dependency>
  265. <groupId>com.alibaba</groupId>
  266. <artifactId>fastjson</artifactId>
  267. </dependency>
  268. <!-- velocity -->
  269. <dependency>
  270. <groupId>org.apache.velocity</groupId>
  271. <artifactId>velocity</artifactId>
  272. </dependency>
  273. <!-- mail -->
  274. <dependency>
  275. <groupId>javax.mail</groupId>
  276. <artifactId>mail</artifactId>
  277. </dependency>
  278. <!-- xinge -->
  279. <dependency>
  280. <groupId>tencent</groupId>
  281. <artifactId>xinge</artifactId>
  282. <version>1.1.4</version>
  283. </dependency>
  284. <!-- jxls -->
  285. <dependency>
  286. <groupId>net.sf.jxls</groupId>
  287. <artifactId>jxls-core</artifactId>
  288. <version>1.0.4</version>
  289. </dependency>
  290. <dependency>
  291. <groupId>net.sf.jxls</groupId>
  292. <artifactId>jxls-reader</artifactId>
  293. <version>1.0.4</version>
  294. </dependency>
  295. <!-- redis -->
  296. <dependency>
  297. <groupId>redis.clients</groupId>
  298. <artifactId>jedis</artifactId>
  299. <version>2.7.3</version>
  300. </dependency>
  301. <dependency>
  302. <groupId>org.springframework.data</groupId>
  303. <artifactId>spring-data-redis</artifactId>
  304. <version>1.6.0.RELEASE</version>
  305. </dependency>
  306. <!-- 邮件 -->
  307. <dependency>
  308. <groupId>com.uas.message</groupId>
  309. <artifactId>message-mail-api</artifactId>
  310. </dependency>
  311. <!-- 消息-->
  312. <dependency>
  313. <groupId>com.uas.message</groupId>
  314. <artifactId>message-sms-api</artifactId>
  315. </dependency>
  316. <dependency>
  317. <groupId>com.uas.account</groupId>
  318. <artifactId>account-common</artifactId>
  319. <version>0.0.1-SNAPSHOT</version>
  320. </dependency>
  321. <dependency>
  322. <groupId>com.uas.sso</groupId>
  323. <artifactId>sso-common</artifactId>
  324. <version>0.0.1-SNAPSHOT</version>
  325. <exclusions>
  326. <exclusion>
  327. <artifactId>tomcat-embed-core</artifactId>
  328. <groupId>org.apache.tomcat.embed</groupId>
  329. </exclusion>
  330. </exclusions>
  331. </dependency>
  332. <dependency>
  333. <groupId>com.uas.ps</groupId>
  334. <artifactId>ps-core</artifactId>
  335. <version>0.0.1-SNAPSHOT</version>
  336. </dependency>
  337. <!-- dubbo -->
  338. <dependency>
  339. <groupId>com.alibaba</groupId>
  340. <artifactId>dubbo</artifactId>
  341. <exclusions>
  342. <exclusion>
  343. <groupId>javax.servlet</groupId>
  344. <artifactId>javax.servlet-api</artifactId>
  345. </exclusion>
  346. <exclusion>
  347. <groupId>org.apache.httpcomponents</groupId>
  348. <artifactId>httpcore</artifactId>
  349. </exclusion>
  350. </exclusions>
  351. </dependency>
  352. <dependency>
  353. <groupId>com.github.sgroschupf</groupId>
  354. <artifactId>zkclient</artifactId>
  355. </dependency>
  356. <!-- hessian -->
  357. <dependency>
  358. <groupId>com.caucho</groupId>
  359. <artifactId>hessian</artifactId>
  360. </dependency>
  361. <!-- search on dubbo -->
  362. <dependency>
  363. <groupId>com.uas.search</groupId>
  364. <artifactId>search-api-b2b</artifactId>
  365. <version>0.1.9-SNAPSHOT</version>
  366. </dependency>
  367. <!-- dfs on dubbo -->
  368. <dependency>
  369. <groupId>com.uas.dfs</groupId>
  370. <artifactId>dfs-api</artifactId>
  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>