pom.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  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. <dependency>
  175. <groupId>com.oracle</groupId>
  176. <artifactId>ojdbc6</artifactId>
  177. </dependency>
  178. <dependency>
  179. <groupId>org.springframework</groupId>
  180. <artifactId>spring-orm</artifactId>
  181. </dependency>
  182. <dependency>
  183. <groupId>commons-pool</groupId>
  184. <artifactId>commons-pool</artifactId>
  185. </dependency>
  186. <dependency>
  187. <groupId>com.alibaba</groupId>
  188. <artifactId>druid</artifactId>
  189. </dependency>
  190. <!-- spring mobile -->
  191. <dependency>
  192. <groupId>org.springframework.mobile</groupId>
  193. <artifactId>spring-mobile-device</artifactId>
  194. </dependency>
  195. <!--json-lib -->
  196. <dependency>
  197. <groupId>net.sf.json-lib</groupId>
  198. <artifactId>json-lib</artifactId>
  199. <classifier>jdk15</classifier>
  200. </dependency>
  201. <dependency>
  202. <groupId>org.codehaus.jackson</groupId>
  203. <artifactId>jackson-core-asl</artifactId>
  204. </dependency>
  205. <dependency>
  206. <groupId>org.codehaus.jackson</groupId>
  207. <artifactId>jackson-mapper-asl</artifactId>
  208. </dependency>
  209. <dependency>
  210. <groupId>com.fasterxml.jackson.core</groupId>
  211. <artifactId>jackson-core</artifactId>
  212. </dependency>
  213. <dependency>
  214. <groupId>com.fasterxml.jackson.core</groupId>
  215. <artifactId>jackson-databind</artifactId>
  216. </dependency>
  217. <dependency>
  218. <groupId>com.fasterxml.jackson.core</groupId>
  219. <artifactId>jackson-annotations</artifactId>
  220. </dependency>
  221. <dependency>
  222. <groupId>com.alibaba</groupId>
  223. <artifactId>fastjson</artifactId>
  224. </dependency>
  225. <!-- velocity -->
  226. <dependency>
  227. <groupId>org.apache.velocity</groupId>
  228. <artifactId>velocity</artifactId>
  229. </dependency>
  230. <!-- mail -->
  231. <dependency>
  232. <groupId>javax.mail</groupId>
  233. <artifactId>mail</artifactId>
  234. </dependency>
  235. <!-- xinge -->
  236. <dependency>
  237. <groupId>tencent</groupId>
  238. <artifactId>xinge</artifactId>
  239. <version>1.1.4</version>
  240. </dependency>
  241. <!-- jxls -->
  242. <dependency>
  243. <groupId>net.sf.jxls</groupId>
  244. <artifactId>jxls-core</artifactId>
  245. <version>1.0.4</version>
  246. </dependency>
  247. <dependency>
  248. <groupId>net.sf.jxls</groupId>
  249. <artifactId>jxls-reader</artifactId>
  250. <version>1.0.4</version>
  251. </dependency>
  252. <!-- redis -->
  253. <dependency>
  254. <groupId>redis.clients</groupId>
  255. <artifactId>jedis</artifactId>
  256. <version>2.7.3</version>
  257. </dependency>
  258. <dependency>
  259. <groupId>org.springframework.data</groupId>
  260. <artifactId>spring-data-redis</artifactId>
  261. <version>1.6.0.RELEASE</version>
  262. </dependency>
  263. <!-- 邮件 -->
  264. <dependency>
  265. <groupId>com.uas.message</groupId>
  266. <artifactId>message-mail-api</artifactId>
  267. </dependency>
  268. <!-- 消息-->
  269. <dependency>
  270. <groupId>com.uas.message</groupId>
  271. <artifactId>message-sms-api</artifactId>
  272. </dependency>
  273. <dependency>
  274. <groupId>com.uas.account</groupId>
  275. <artifactId>account-common</artifactId>
  276. <version>0.0.1-SNAPSHOT</version>
  277. </dependency>
  278. <!-- dubbo -->
  279. <dependency>
  280. <groupId>com.alibaba</groupId>
  281. <artifactId>dubbo</artifactId>
  282. <exclusions>
  283. <exclusion>
  284. <groupId>javax.servlet</groupId>
  285. <artifactId>javax.servlet-api</artifactId>
  286. </exclusion>
  287. <exclusion>
  288. <groupId>org.apache.httpcomponents</groupId>
  289. <artifactId>httpcore</artifactId>
  290. </exclusion>
  291. </exclusions>
  292. </dependency>
  293. <dependency>
  294. <groupId>com.github.sgroschupf</groupId>
  295. <artifactId>zkclient</artifactId>
  296. </dependency>
  297. <!-- hessian -->
  298. <dependency>
  299. <groupId>com.caucho</groupId>
  300. <artifactId>hessian</artifactId>
  301. </dependency>
  302. <!-- search on dubbo -->
  303. <dependency>
  304. <groupId>com.uas.search</groupId>
  305. <artifactId>search-api-b2b</artifactId>
  306. </dependency>
  307. <!-- dfs on dubbo -->
  308. <dependency>
  309. <groupId>com.uas.dfs</groupId>
  310. <artifactId>dfs-api</artifactId>
  311. </dependency>
  312. </dependencies>
  313. <build>
  314. <finalName>platform-b2b</finalName>
  315. <!-- 受profile影响的目录 -->
  316. <resources>
  317. <resource>
  318. <directory>${basedir}/src/main/resources</directory>
  319. <filtering>true</filtering>
  320. <excludes>
  321. <exclude>**/*.xls</exclude>
  322. </excludes>
  323. </resource>
  324. <!-- xls文件不能filter处理,需区分出来 -->
  325. <resource>
  326. <directory>${basedir}/src/main/resources</directory>
  327. <filtering>false</filtering>
  328. <includes>
  329. <include>**/*.xls</include>
  330. </includes>
  331. </resource>
  332. </resources>
  333. <!-- 在maven生命周期validate阶段生成timestamp -->
  334. <plugins>
  335. <plugin>
  336. <groupId>org.codehaus.mojo</groupId>
  337. <artifactId>buildnumber-maven-plugin</artifactId>
  338. <version>1.3</version>
  339. <executions>
  340. <execution>
  341. <phase>validate</phase>
  342. <goals>
  343. <goal>create-timestamp</goal>
  344. </goals>
  345. </execution>
  346. </executions>
  347. <configuration>
  348. <configuration>
  349. <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
  350. <items>
  351. <item>timestamp</item>
  352. </items>
  353. </configuration>
  354. </configuration>
  355. </plugin>
  356. <plugin>
  357. <groupId>org.apache.maven.plugins</groupId>
  358. <artifactId>maven-compiler-plugin</artifactId>
  359. <configuration>
  360. <source>1.7</source>
  361. <target>1.7</target>
  362. </configuration>
  363. </plugin>
  364. <plugin>
  365. <groupId>com.samaxes.maven</groupId>
  366. <artifactId>minify-maven-plugin</artifactId>
  367. <version>1.7.4</version>
  368. <!-- 静态文件压缩 -->
  369. <executions>
  370. <execution>
  371. <id>default-minify</id>
  372. <phase>prepare-package</phase>
  373. <configuration>
  374. <charset>UTF-8</charset>
  375. <skipMerge>true</skipMerge>
  376. <closureLanguage>ECMASCRIPT5</closureLanguage>
  377. <closureAngularPass>true</closureAngularPass>
  378. <nosuffix>true</nosuffix>
  379. <webappTargetDir>${project.build.directory}/minify</webappTargetDir>
  380. <cssSourceDir>resources</cssSourceDir>
  381. <cssEngine>YUI</cssEngine>
  382. <jsSourceDir>resources</jsSourceDir>
  383. <jsEngine>CLOSURE</jsEngine>
  384. <cssSourceIncludes>
  385. <cssSourceInclude>css/**/*.css</cssSourceInclude>
  386. <cssSourceInclude>data/**/*.json</cssSourceInclude>
  387. </cssSourceIncludes>
  388. <cssSourceExcludes>
  389. <cssSourceExclude>css/**/*.min.css</cssSourceExclude>
  390. </cssSourceExcludes>
  391. <jsSourceIncludes>
  392. <jsSourceInclude>js/**/*.js</jsSourceInclude>
  393. </jsSourceIncludes>
  394. <jsSourceExcludes>
  395. <jsSourceExclude>js/**/*.min.js</jsSourceExclude>
  396. </jsSourceExcludes>
  397. </configuration>
  398. <goals>
  399. <goal>minify</goal>
  400. </goals>
  401. </execution>
  402. </executions>
  403. </plugin>
  404. <plugin>
  405. <artifactId>maven-resources-plugin</artifactId>
  406. <executions>
  407. <execution>
  408. <id>copy-resources</id>
  409. <phase>prepare-package</phase>
  410. <goals>
  411. <goal>copy-resources</goal>
  412. </goals>
  413. <configuration>
  414. <outputDirectory>${project.build.directory}/minify</outputDirectory>
  415. <overwrite>false</overwrite>
  416. <resources>
  417. <resource>
  418. <directory>${basedir}/src/main/webapp</directory>
  419. </resource>
  420. </resources>
  421. </configuration>
  422. </execution>
  423. </executions>
  424. </plugin>
  425. <plugin>
  426. <groupId>com.uas.plugins</groupId>
  427. <artifactId>static-maven-plugin</artifactId>
  428. <version>0.0.2-SNAPSHOT</version>
  429. <!-- 静态资源分离 -->
  430. <executions>
  431. <execution>
  432. <id>default-static</id>
  433. <phase>prepare-package</phase>
  434. <configuration>
  435. <pathMatcher>static</pathMatcher>
  436. <staticUrl>${static-path}</staticUrl>
  437. <webappDir>${project.build.directory}/minify</webappDir>
  438. <sourceDir>/</sourceDir>
  439. <targetDir>${project.build.directory}/statics</targetDir>
  440. <staticDir>/</staticDir>
  441. <sourceIncludes>
  442. <sourceInclude>resources/js/**/*.js</sourceInclude>
  443. <sourceInclude>resources/data/**/*.json</sourceInclude>
  444. <sourceInclude>resources/tpl/**/*.html</sourceInclude>
  445. <sourceInclude>WEB-INF/views/**/*.html</sourceInclude>
  446. </sourceIncludes>
  447. http://static.ubtob.com/css/index.css?_v=1450321871828
  448. <versionSuffix>
  449. <suffix>?_v=${timestamp}</suffix>
  450. <exclude>*/require.js,*.min.js,*.min.css</exclude>
  451. </versionSuffix>
  452. </configuration>
  453. <goals>
  454. <goal>static</goal>
  455. </goals>
  456. </execution>
  457. </executions>
  458. </plugin>
  459. <plugin>
  460. <groupId>org.apache.maven.plugins</groupId>
  461. <artifactId>maven-war-plugin</artifactId>
  462. <version>2.4</version>
  463. <configuration>
  464. <webResources>
  465. <resource>
  466. <directory>${project.build.directory}/statics</directory>
  467. </resource>
  468. <resource>
  469. <directory>${project.build.directory}/minify</directory>
  470. </resource>
  471. </webResources>
  472. </configuration>
  473. </plugin>
  474. <plugin>
  475. <groupId>org.apache.tomcat.maven</groupId>
  476. <artifactId>tomcat7-maven-plugin</artifactId>
  477. <version>2.2</version>
  478. <configuration>
  479. <port>8090</port>
  480. <path>/platform-b2b</path>
  481. <uriEncoding>utf-8</uriEncoding>
  482. </configuration>
  483. </plugin>
  484. </plugins>
  485. <pluginManagement>
  486. <plugins>
  487. <plugin>
  488. <groupId>org.eclipse.m2e</groupId>
  489. <artifactId>lifecycle-mapping</artifactId>
  490. <version>1.0.0</version>
  491. <configuration>
  492. <lifecycleMappingMetadata>
  493. <pluginExecutions>
  494. <pluginExecution>
  495. <pluginExecutionFilter>
  496. <groupId>
  497. org.codehaus.mojo
  498. </groupId>
  499. <artifactId>
  500. buildnumber-maven-plugin
  501. </artifactId>
  502. <versionRange>
  503. [1.3,)
  504. </versionRange>
  505. <goals>
  506. <goal>
  507. create-timestamp
  508. </goal>
  509. </goals>
  510. </pluginExecutionFilter>
  511. <action>
  512. <ignore></ignore>
  513. </action>
  514. </pluginExecution>
  515. </pluginExecutions>
  516. </lifecycleMappingMetadata>
  517. </configuration>
  518. </plugin>
  519. </plugins>
  520. </pluginManagement>
  521. </build>
  522. <properties>
  523. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  524. <maven.compiler.source>1.7</maven.compiler.source>
  525. <maven.compiler.target>1.7</maven.compiler.target>
  526. <skipTests>true</skipTests>
  527. </properties>
  528. </project>