pom.xml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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. <groupId>com.jfinal</groupId>
  5. <artifactId>hoppe</artifactId>
  6. <version>4.8</version>
  7. <packaging>jar</packaging>
  8. <name>hoppe</name>
  9. <url>http://jfinal.com/club</url>
  10. <properties>
  11. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  12. <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
  13. </properties>
  14. <!-- 使用阿里 maven 库 -->
  15. <repositories>
  16. <repository>
  17. <id>ali-maven</id>
  18. <url>http://maven.aliyun.com/nexus/content/groups/public</url>
  19. <releases>
  20. <enabled>true</enabled>
  21. </releases>
  22. <snapshots>
  23. <enabled>true</enabled>
  24. <updatePolicy>always</updatePolicy>
  25. <checksumPolicy>fail</checksumPolicy>
  26. </snapshots>
  27. </repository>
  28. </repositories>
  29. <dependencies>
  30. <!-- jfinal -->
  31. <dependency>
  32. <groupId>com.jfinal</groupId>
  33. <artifactId>jfinal</artifactId>
  34. <version>4.8</version>
  35. </dependency>
  36. <!-- jfinal-undertow 开发、部署一体化 web 服务器 -->
  37. <dependency>
  38. <groupId>com.jfinal</groupId>
  39. <artifactId>jfinal-undertow</artifactId>
  40. <version>2.0</version>
  41. </dependency>
  42. <!-- 开发 WebSockets 时开启下面的依赖 -->
  43. <!--
  44. <dependency>
  45. <groupId>io.undertow</groupId>
  46. <artifactId>undertow-websockets-jsr</artifactId>
  47. <version>2.0.28.Final</version>
  48. </dependency>
  49. -->
  50. <!-- junit 单元测试 -->
  51. <dependency>
  52. <groupId>junit</groupId>
  53. <artifactId>junit</artifactId>
  54. <version>3.8.1</version>
  55. <scope>test</scope>
  56. </dependency>
  57. <!-- 避免控制台输出如下提示信息:
  58. SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
  59. 项目中实际上用不到这个 jar 包
  60. 注意:eclipse 下可以将 scope 设置为 provided
  61. -->
  62. <dependency>
  63. <groupId>org.slf4j</groupId>
  64. <artifactId>slf4j-nop</artifactId>
  65. <version>1.7.29</version>
  66. <!-- 打包前改成 provided,此处使用 compile 仅为支持 IDEA -->
  67. <scope>compile</scope>
  68. </dependency>
  69. <!-- druid 数据源连接池 -->
  70. <dependency>
  71. <groupId>com.alibaba</groupId>
  72. <artifactId>druid</artifactId>
  73. <version>1.0.29</version>
  74. </dependency>
  75. <!-- fastjson json 转换 -->
  76. <dependency>
  77. <groupId>com.alibaba</groupId>
  78. <artifactId>fastjson</artifactId>
  79. <version>1.2.58</version>
  80. </dependency>
  81. <!-- log4j 日志 -->
  82. <dependency>
  83. <groupId>log4j</groupId>
  84. <artifactId>log4j</artifactId>
  85. <version>1.2.17</version>
  86. </dependency>
  87. <!-- mysql 驱动 -->
  88. <dependency>
  89. <groupId>mysql</groupId>
  90. <artifactId>mysql-connector-java</artifactId>
  91. <version>5.1.44</version>
  92. </dependency>
  93. <!-- cos 文件上传 -->
  94. <dependency>
  95. <groupId>com.jfinal</groupId>
  96. <artifactId>cos</artifactId>
  97. <version>2019.8</version>
  98. </dependency>
  99. <!-- ehcache 缓存 -->
  100. <dependency>
  101. <groupId>net.sf.ehcache</groupId>
  102. <artifactId>ehcache-core</artifactId>
  103. <version>2.6.11</version>
  104. </dependency>
  105. <!-- 邮件发送 -->
  106. <dependency>
  107. <groupId>commons-codec</groupId>
  108. <artifactId>commons-codec</artifactId>
  109. <version>1.9</version>
  110. </dependency>
  111. <!-- 邮件发送 -->
  112. <dependency>
  113. <groupId>org.apache.commons</groupId>
  114. <artifactId>commons-email</artifactId>
  115. <version>1.2</version>
  116. </dependency>
  117. <!-- + 过滤恶意数据提交 -->
  118. <dependency>
  119. <groupId>org.jsoup</groupId>
  120. <artifactId>jsoup</artifactId>
  121. <version>1.9.2</version>
  122. </dependency>
  123. <!-- joda-time 日期、时间变换 -->
  124. <dependency>
  125. <groupId>joda-time</groupId>
  126. <artifactId>joda-time</artifactId>
  127. <version>2.9.3</version>
  128. </dependency>
  129. <!-- cron4j 任务调度 -->
  130. <dependency>
  131. <groupId>it.sauronsoftware.cron4j</groupId>
  132. <artifactId>cron4j</artifactId>
  133. <version>2.2.5</version>
  134. </dependency>
  135. <!-- zxing 二维码生成 -->
  136. <dependency>
  137. <groupId>com.google.zxing</groupId>
  138. <artifactId>javase</artifactId>
  139. <version>3.2.1</version>
  140. </dependency>
  141. <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
  142. <dependency>
  143. <groupId>org.apache.commons</groupId>
  144. <artifactId>commons-lang3</artifactId>
  145. <version>3.4</version>
  146. </dependency>
  147. <dependency>
  148. <groupId>org.projectlombok</groupId>
  149. <artifactId>lombok</artifactId>
  150. <version>1.18.12</version>
  151. <scope>provided</scope>
  152. </dependency>
  153. <dependency>
  154. <groupId>net.sf.json-lib</groupId>
  155. <artifactId>json-lib</artifactId>
  156. <version>2.4</version>
  157. <classifier>jdk15</classifier>
  158. </dependency>
  159. <!-- https://mvnrepository.com/artifact/net.coobird/thumbnailator -->
  160. <dependency>
  161. <groupId>net.coobird</groupId>
  162. <artifactId>thumbnailator</artifactId>
  163. <version>0.4.8</version>
  164. </dependency>
  165. <!-- poi excel 上传下载 -->
  166. <!-- 表格导入导出jar包 -->
  167. <dependency>
  168. <groupId>org.apache.poi</groupId>
  169. <artifactId>poi</artifactId>
  170. <version>3.9</version>
  171. </dependency>
  172. <dependency>
  173. <groupId>org.apache.poi</groupId>
  174. <artifactId>poi-ooxml</artifactId>
  175. <version>3.9</version>
  176. </dependency>
  177. <!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
  178. <dependency>
  179. <groupId>commons-io</groupId>
  180. <artifactId>commons-io</artifactId>
  181. <version>2.6</version>
  182. </dependency>
  183. </dependencies>
  184. <build>
  185. <plugins>
  186. <plugin>
  187. <groupId>org.apache.maven.plugins</groupId>
  188. <artifactId>maven-compiler-plugin</artifactId>
  189. <version>3.6.1</version>
  190. <configuration>
  191. <source>1.8</source>
  192. <target>1.8</target>
  193. <encoding>UTF-8</encoding>
  194. <!-- java8 保留参数名编译参数 -->
  195. <compilerArgument>-parameters</compilerArgument>
  196. <compilerArguments><verbose /></compilerArguments>
  197. </configuration>
  198. </plugin>
  199. <!--
  200. jar 包中的配置文件优先级高于 config 目录下的 "同名文件"
  201. 因此,打包时需要排除掉 jar 包中来自 src/main/resources 目录的
  202. 配置文件,否则部署时 config 目录中的同名配置文件不会生效
  203. -->
  204. <plugin>
  205. <groupId>org.apache.maven.plugins</groupId>
  206. <artifactId>maven-jar-plugin</artifactId>
  207. <version>2.6</version>
  208. <configuration>
  209. <excludes>
  210. <!-- **/* 前缀用法,可以匹配所有路径,例如:**/*.txt -->
  211. <exclude>*.txt</exclude>
  212. <exclude>*.xml</exclude>
  213. <exclude>*.properties</exclude>
  214. </excludes>
  215. </configuration>
  216. </plugin>
  217. <!--
  218. 使用 mvn clean package 打包
  219. 更多配置可参考官司方文档:http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html
  220. -->
  221. <plugin>
  222. <groupId>org.apache.maven.plugins</groupId>
  223. <artifactId>maven-assembly-plugin</artifactId>
  224. <version>3.1.0</version>
  225. <executions>
  226. <execution>
  227. <id>make-assembly</id>
  228. <phase>package</phase>
  229. <goals>
  230. <goal>single</goal>
  231. </goals>
  232. <configuration>
  233. <!-- 打包生成的文件名 -->
  234. <finalName>${project.artifactId}</finalName>
  235. <!-- jar 等压缩文件在被打包进入 zip、tar.gz 时是否压缩,设置为 false 可加快打包速度 -->
  236. <recompressZippedFiles>false</recompressZippedFiles>
  237. <!-- 打包生成的文件是否要追加 package.xml 中定义的 id 值 -->
  238. <appendAssemblyId>true</appendAssemblyId>
  239. <!-- 指向打包描述文件 package.xml -->
  240. <descriptors>
  241. <descriptor>package.xml</descriptor>
  242. </descriptors>
  243. <!-- 打包结果输出的基础目录 -->
  244. <outputDirectory>${project.build.directory}/</outputDirectory>
  245. </configuration>
  246. </execution>
  247. </executions>
  248. </plugin>
  249. </plugins>
  250. </build>
  251. </project>