pom.xml 20 KB

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