pom.xml 21 KB

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