pom.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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/xsd/maven-4.0.0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <parent>
  5. <groupId>com.xchat</groupId>
  6. <artifactId>xchat</artifactId>
  7. <version>0.0.1-SNAPSHOT</version>
  8. </parent>
  9. <artifactId>xchat-admin-web</artifactId>
  10. <packaging>war</packaging>
  11. <dependencies>
  12. <dependency>
  13. <groupId>com.xchat</groupId>
  14. <artifactId>xchat-admin-service</artifactId>
  15. <version>0.0.1-SNAPSHOT</version>
  16. </dependency>
  17. <dependency>
  18. <groupId>com.xchat</groupId>
  19. <artifactId>xchat-oauth2-service</artifactId>
  20. <version>0.0.1-SNAPSHOT</version>
  21. </dependency>
  22. <!-- https://mvnrepository.com/artifact/com.alibaba/druid -->
  23. <dependency>
  24. <groupId>com.alibaba</groupId>
  25. <artifactId>druid</artifactId>
  26. <version>1.0.29</version>
  27. </dependency>
  28. <!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->
  29. <dependency>
  30. <groupId>org.jsoup</groupId>
  31. <artifactId>jsoup</artifactId>
  32. <version>1.10.2</version>
  33. </dependency>
  34. <dependency>
  35. <groupId>junit</groupId>
  36. <artifactId>junit</artifactId>
  37. <version>3.8.1</version>
  38. <scope>test</scope>
  39. </dependency>
  40. <!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload -->
  41. <dependency>
  42. <groupId>commons-fileupload</groupId>
  43. <artifactId>commons-fileupload</artifactId>
  44. <version>1.3</version>
  45. </dependency>
  46. <!-- https://mvnrepository.com/artifact/com.googlecode.mp4parser/isoparser -->
  47. <dependency>
  48. <groupId>com.googlecode.mp4parser</groupId>
  49. <artifactId>isoparser</artifactId>
  50. <version>1.1.18</version>
  51. </dependency>
  52. <!-- https://mvnrepository.com/artifact/joda-time/joda-time -->
  53. <dependency>
  54. <groupId>joda-time</groupId>
  55. <artifactId>joda-time</artifactId>
  56. <version>2.9.9</version>
  57. </dependency>
  58. <dependency>
  59. <groupId>dom4j</groupId>
  60. <artifactId>dom4j</artifactId>
  61. <version>1.6.1</version>
  62. </dependency>
  63. <dependency>
  64. <groupId>javax.servlet</groupId>
  65. <artifactId>javax.servlet-api</artifactId>
  66. <version>3.1.0</version>
  67. </dependency>
  68. <dependency>
  69. <groupId>commons-io</groupId>
  70. <artifactId>commons-io</artifactId>
  71. <version>2.2</version>
  72. </dependency>
  73. <!-- excel导入导出依赖包-->
  74. <dependency>
  75. <groupId>cn.afterturn</groupId>
  76. <artifactId>easypoi-base</artifactId>
  77. <version>3.2.0</version>
  78. </dependency>
  79. <dependency>
  80. <groupId>cn.afterturn</groupId>
  81. <artifactId>easypoi-web</artifactId>
  82. <version>3.2.0</version>
  83. </dependency>
  84. <dependency>
  85. <groupId>cn.afterturn</groupId>
  86. <artifactId>easypoi-annotation</artifactId>
  87. <version>3.2.0</version>
  88. </dependency>
  89. <dependency>
  90. <groupId>junit</groupId>
  91. <artifactId>junit</artifactId>
  92. <version>4.11</version>
  93. <scope>test</scope>
  94. </dependency>
  95. <!-- excel导入导出依赖包-->
  96. <dependency>
  97. <groupId>net.sourceforge.jregex</groupId>
  98. <artifactId>jregex</artifactId>
  99. <version>1.2_01</version>
  100. </dependency>
  101. <dependency>
  102. <groupId>net.sf.json-lib</groupId>
  103. <artifactId>json-lib</artifactId>
  104. <version>2.4</version>
  105. <classifier>jdk15</classifier>
  106. </dependency>
  107. </dependencies>
  108. <build>
  109. <finalName>ROOT</finalName>
  110. <plugins>
  111. <plugin>
  112. <groupId>org.apache.maven.plugins</groupId>
  113. <artifactId>maven-war-plugin</artifactId>
  114. <version>3.0.0</version>
  115. <configuration>
  116. <warName>ROOT</warName>
  117. </configuration>
  118. </plugin>
  119. <plugin>
  120. <groupId>org.apache.maven.plugins</groupId>
  121. <artifactId>maven-compiler-plugin</artifactId>
  122. <version>3.6.1</version>
  123. <configuration>
  124. <source>1.8</source>
  125. <target>1.8</target>
  126. <encoding>UTF8</encoding>
  127. </configuration>
  128. </plugin>
  129. <plugin>
  130. <!-- YUI Compressor Maven压缩插件 -->
  131. <groupId>net.alchim31.maven</groupId>
  132. <artifactId>yuicompressor-maven-plugin</artifactId>
  133. <version>1.5.1</version>
  134. <configuration>
  135. <!-- 读取js,css文件采用UTF-8编码 -->
  136. <encoding>UTF-8</encoding>
  137. <!-- 不显示js可能的错误 -->
  138. <jswarn>false</jswarn>
  139. <!-- 若存在已压缩的文件,会先对比源文件是否有改动 有改动便压缩,无改动就不压缩 -->
  140. <force>false</force>
  141. <!-- 在指定的列号后插入新行 -->
  142. <linebreakpos>-1</linebreakpos>
  143. <!-- 压缩之前先执行聚合文件操作 -->
  144. <preProcessAggregates>true</preProcessAggregates>
  145. <!-- 压缩后保存文件后缀 <suffix>.min</suffix> -->
  146. <nosuffix>true</nosuffix>
  147. <!-- 源目录,即需压缩的根目录 -->
  148. <sourceDirectory>${basedir}/src/main/webapp/static</sourceDirectory>
  149. <!-- 压缩js和css文件 -->
  150. <includes>
  151. <include>**/*.js</include>
  152. <include>**/*.css</include>
  153. </includes>
  154. <!-- 以下目录和文件不会被压缩 -->
  155. <excludes>
  156. <exclude>**/*.min.js</exclude>
  157. <exclude>**/*.min.css</exclude>
  158. </excludes>
  159. <!-- 压缩后输出文件目录 -->
  160. <outputDirectory>${basedir}/static</outputDirectory>
  161. </configuration>
  162. </plugin>
  163. <!--<plugin> -->
  164. <!--<groupId>org.apache.maven.plugins</groupId> -->
  165. <!--<artifactId>maven-war-plugin</artifactId> -->
  166. <!--<configuration> -->
  167. <!--<warName>ROOT</warName> -->
  168. <!--</configuration> -->
  169. <!--</plugin> -->
  170. <!-- jetty, set context path and spring profile -->
  171. <plugin>
  172. <groupId>org.mortbay.jetty</groupId>
  173. <artifactId>jetty-maven-plugin</artifactId>
  174. <configuration>
  175. <!--热部署时间秒 -->
  176. <reload>automatic</reload>
  177. <scanIntervalSeconds>3</scanIntervalSeconds>
  178. <systemProperties>
  179. <systemProperty>
  180. <name>spring.profiles.active</name>
  181. <value>development</value>
  182. </systemProperty>
  183. </systemProperties>
  184. <useTestClasspath>true</useTestClasspath>
  185. <connectors>
  186. <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
  187. <port>8081</port>
  188. <maxIdleTime>60000</maxIdleTime>
  189. </connector>
  190. </connectors>
  191. </configuration>
  192. </plugin>
  193. </plugins>
  194. </build>
  195. <profiles>
  196. <profile>
  197. <id>test</id>
  198. <build>
  199. <plugins>
  200. <plugin>
  201. <groupId>org.apache.maven.plugins</groupId>
  202. <artifactId>maven-war-plugin</artifactId>
  203. <configuration>
  204. <warName>ROOT</warName>
  205. </configuration>
  206. </plugin>
  207. <plugin>
  208. <groupId>org.apache.maven.plugins</groupId>
  209. <artifactId>maven-antrun-plugin</artifactId>
  210. <executions>
  211. <execution>
  212. <id>replace-test-settings</id>
  213. <phase>prepare-package</phase>
  214. <goals>
  215. <goal>run</goal>
  216. </goals>
  217. <configuration>
  218. <target>
  219. <echo message="--------------------------------------"/>
  220. <echo message="开始替换测试环境文件"/>
  221. <echo message="--------------------------------------"/>
  222. <tstamp>
  223. <format property="releaseVersion" pattern="yyyyMMddHHmm"/>
  224. </tstamp>
  225. <!-- 替换logback.xml文件 -->
  226. <delete file="${project.build.outputDirectory}/logback.xml"/>
  227. <copy file="src/main/resources/test/logback.xml"
  228. tofile="${project.build.outputDirectory}/logback.xml"/>
  229. <delete file="${project.build.outputDirectory}/application-web.properties"/>
  230. <copy file="src/main/resources/test/application-web.properties"
  231. tofile="${project.build.outputDirectory}/application-web.properties"/>
  232. <delete file="${project.build.outputDirectory}/config.properties"/>
  233. <copy file="src/main/resources/test/config.properties"
  234. tofile="${project.build.outputDirectory}/config.properties"/>
  235. <echo message="--------------------------------------"/>
  236. <echo message="完成替换测试环境文件"/>
  237. <echo message="--------------------------------------"/>
  238. </target>
  239. </configuration>
  240. </execution>
  241. </executions>
  242. <dependencies>
  243. <dependency>
  244. <groupId>com.jcraft</groupId>
  245. <artifactId>jsch</artifactId>
  246. <version>0.1.50</version>
  247. </dependency>
  248. <dependency>
  249. <groupId>org.apache.ant</groupId>
  250. <artifactId>ant-jsch</artifactId>
  251. <version>1.8.2</version>
  252. </dependency>
  253. </dependencies>
  254. </plugin>
  255. </plugins>
  256. </build>
  257. </profile>
  258. <!-- 生产用的profile -->
  259. <profile>
  260. <id>prod</id>
  261. <build>
  262. <plugins>
  263. <plugin>
  264. <groupId>org.apache.maven.plugins</groupId>
  265. <artifactId>maven-war-plugin</artifactId>
  266. <configuration>
  267. <warName>ROOT</warName>
  268. </configuration>
  269. </plugin>
  270. <plugin>
  271. <groupId>org.apache.maven.plugins</groupId>
  272. <artifactId>maven-antrun-plugin</artifactId>
  273. <executions>
  274. <execution>
  275. <id>replace-prod-settings</id>
  276. <phase>prepare-package</phase>
  277. <goals>
  278. <goal>run</goal>
  279. </goals>
  280. <configuration>
  281. <target>
  282. <echo message="--------------------------------------"/>
  283. <echo message="开始替换生产环境文件"/>
  284. <echo message="--------------------------------------"/>
  285. <tstamp>
  286. <format property="releaseVersion" pattern="yyyyMMddHHmm"/>
  287. </tstamp>
  288. <!-- 替换logback.xml文件 -->
  289. <delete file="${project.build.outputDirectory}/logback.xml"/>
  290. <copy file="src/main/resources/prod/logback.xml"
  291. tofile="${project.build.outputDirectory}/logback.xml"/>
  292. <delete file="${project.build.outputDirectory}/application-web.properties"/>
  293. <copy file="src/main/resources/prod/application-web.properties"
  294. tofile="${project.build.outputDirectory}/application-web.properties"/>
  295. <echo message="--------------------------------------"/>
  296. <echo message="完成替换生产环境文件"/>
  297. <echo message="--------------------------------------"/>
  298. </target>
  299. </configuration>
  300. </execution>
  301. </executions>
  302. <dependencies>
  303. <dependency>
  304. <groupId>com.jcraft</groupId>
  305. <artifactId>jsch</artifactId>
  306. <version>0.1.50</version>
  307. </dependency>
  308. <dependency>
  309. <groupId>org.apache.ant</groupId>
  310. <artifactId>ant-jsch</artifactId>
  311. <version>1.8.2</version>
  312. </dependency>
  313. </dependencies>
  314. </plugin>
  315. </plugins>
  316. </build>
  317. </profile>
  318. </profiles>
  319. </project>