pom.xml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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>club</artifactId>
  6. <version>4.8</version>
  7. <packaging>jar</packaging>
  8. <name>jfinal-club</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. <!-- jsoup 过滤恶意数据提交 -->
  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. </dependencies>
  142. <build>
  143. <finalName>jfinal-club</finalName>
  144. <plugins>
  145. <plugin>
  146. <groupId>org.apache.maven.plugins</groupId>
  147. <artifactId>maven-compiler-plugin</artifactId>
  148. <version>3.6.1</version>
  149. <configuration>
  150. <source>1.8</source>
  151. <target>1.8</target>
  152. <encoding>UTF-8</encoding>
  153. <!-- java8 保留参数名编译参数 -->
  154. <compilerArgument>-parameters</compilerArgument>
  155. <compilerArguments><verbose /></compilerArguments>
  156. </configuration>
  157. </plugin>
  158. <!--
  159. 当项目的 web 资源在 src/main/webapp 下时,需要使用 maven-resources-plugin
  160. 将 web 资源复制到 jar 包中去,注意打包的时候需要配置 engine:
  161. me.setBaseTemplatePath("webapp");
  162. me.setToClassPathSourceFactory();
  163. 如果 web 资源本身就放在 src/main/resources/webapp 之下,则不需要此插件
  164. -->
  165. <plugin>
  166. <artifactId>maven-resources-plugin</artifactId>
  167. <version>3.1.0</version>
  168. <executions>
  169. <execution>
  170. <id>copy-webapp</id>
  171. <phase>process-sources</phase>
  172. <goals>
  173. <goal>copy-resources</goal>
  174. </goals>
  175. <configuration>
  176. <encoding>UTF-8</encoding>
  177. <outputDirectory>${basedir}/target/classes/webapp</outputDirectory>
  178. <resources>
  179. <resource>
  180. <directory>${basedir}/src/main/webapp</directory>
  181. <includes>
  182. <!-- <include>**/*.xml</include> -->
  183. <!-- <include>**/**</include> -->
  184. </includes>
  185. </resource>
  186. </resources>
  187. </configuration>
  188. </execution>
  189. </executions>
  190. </plugin>
  191. <plugin>
  192. <groupId>org.apache.maven.plugins</groupId>
  193. <artifactId>maven-shade-plugin</artifactId>
  194. <version>3.2.1</version>
  195. <executions>
  196. <execution>
  197. <phase>package</phase>
  198. <goals>
  199. <goal>shade</goal>
  200. </goals>
  201. <configuration>
  202. <finalName>jfinal-club</finalName>
  203. <transformers>
  204. <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
  205. <mainClass>com.jfinal.club.common.JFinalClubConfig</mainClass>
  206. </transformer>
  207. <!--
  208. 下面的配置支持排除指定文件打包到 jar 之中,可以用于排除需要修改的配置文件以便于在外部的 config 目录下的
  209. 同名配置文件生效,建议使用 Prop.appendIfExists(xxx_pro.txt) 在外部放一个非同名配置来覆盖开发环境的配置
  210. 则可以不用使用下面的配置,文档参考:
  211. http://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#DontIncludeResourceTransformer
  212. -->
  213. <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
  214. <resources>
  215. <!-- <resource>jfinal-club-config-dev.txt</resource> -->
  216. <!-- <resource>.PDF</resource> -->
  217. <!-- <resource>READ.md</resource> -->
  218. </resources>
  219. </transformer>
  220. </transformers>
  221. <!--
  222. 解决 fatjar 的 "java.lang.SecurityException: Invalid signature file digest
  223. for Manifest main attributes" 问题
  224. -->
  225. <filters>
  226. <filter>
  227. <artifact>*:*</artifact>
  228. <excludes>
  229. <exclude>META-INF/*.SF</exclude>
  230. <exclude>META-INF/*.DSA</exclude>
  231. <exclude>META-INF/*.RSA</exclude>
  232. </excludes>
  233. </filter>
  234. </filters>
  235. </configuration>
  236. </execution>
  237. </executions>
  238. </plugin>
  239. </plugins>
  240. </build>
  241. </project>