pom.xml 22 KB

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