pom.xml 22 KB

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