pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <groupId>com.macro.mall</groupId>
  7. <artifactId>mall</artifactId>
  8. <version>1.0-SNAPSHOT</version>
  9. <packaging>pom</packaging>
  10. <modules>
  11. <module>mall-common</module>
  12. <module>mall-mbg</module>
  13. <module>mall-security</module>
  14. <module>mall-demo</module>
  15. <module>mall-admin</module>
  16. <module>mall-search</module>
  17. <module>mall-portal</module>
  18. </modules>
  19. <parent>
  20. <groupId>org.springframework.boot</groupId>
  21. <artifactId>spring-boot-starter-parent</artifactId>
  22. <version>3.2.2</version>
  23. <relativePath/> <!-- lookup parent from repository -->
  24. </parent>
  25. <properties>
  26. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  27. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  28. <java.version>17</java.version>
  29. <maven.compiler.source>17</maven.compiler.source>
  30. <maven.compiler.target>17</maven.compiler.target>
  31. <skipTests>true</skipTests>
  32. <docker.host>http://192.168.3.101:2375</docker.host>
  33. <docker.maven.plugin.version>0.43.3</docker.maven.plugin.version>
  34. <pagehelper-starter.version>2.1.0</pagehelper-starter.version>
  35. <pagehelper.version>6.1.0</pagehelper.version>
  36. <druid.version>1.2.21</druid.version>
  37. <hutool.version>5.8.16</hutool.version>
  38. <springdoc-openapi.version>2.3.0</springdoc-openapi.version>
  39. <mybatis-generator.version>1.4.2</mybatis-generator.version>
  40. <mybatis.version>3.5.14</mybatis.version>
  41. <mybatis-spring-boot-starter.version>3.0.3</mybatis-spring-boot-starter.version>
  42. <mysql-connector.version>8.0.29</mysql-connector.version>
  43. <spring-data-commons.version>3.2.2</spring-data-commons.version>
  44. <jjwt.version>0.9.1</jjwt.version>
  45. <aliyun-oss.version>2.5.0</aliyun-oss.version>
  46. <alipay-sdk.version>4.38.61.ALL</alipay-sdk.version>
  47. <logstash-logback.version>7.4</logstash-logback.version>
  48. <minio.version>8.4.5</minio.version>
  49. <jaxb-api.version>2.3.1</jaxb-api.version>
  50. <mall-common.version>1.0-SNAPSHOT</mall-common.version>
  51. <mall-mbg.version>1.0-SNAPSHOT</mall-mbg.version>
  52. <mall-security.version>1.0-SNAPSHOT</mall-security.version>
  53. </properties>
  54. <dependencies>
  55. <dependency>
  56. <groupId>org.springframework.boot</groupId>
  57. <artifactId>spring-boot-starter-actuator</artifactId>
  58. </dependency>
  59. <dependency>
  60. <groupId>org.springframework.boot</groupId>
  61. <artifactId>spring-boot-starter-aop</artifactId>
  62. </dependency>
  63. <dependency>
  64. <groupId>org.springframework.boot</groupId>
  65. <artifactId>spring-boot-starter-test</artifactId>
  66. <scope>test</scope>
  67. </dependency>
  68. <dependency>
  69. <groupId>cn.hutool</groupId>
  70. <artifactId>hutool-all</artifactId>
  71. </dependency>
  72. <dependency>
  73. <groupId>org.projectlombok</groupId>
  74. <artifactId>lombok</artifactId>
  75. </dependency>
  76. <dependency>
  77. <groupId>org.springframework.boot</groupId>
  78. <artifactId>spring-boot-configuration-processor</artifactId>
  79. <optional>true</optional>
  80. </dependency>
  81. <!--解决JDK 11 兼容性问题-->
  82. <dependency>
  83. <groupId>javax.xml.bind</groupId>
  84. <artifactId>jaxb-api</artifactId>
  85. <version>${jaxb-api.version}</version>
  86. </dependency>
  87. </dependencies>
  88. <dependencyManagement>
  89. <dependencies>
  90. <!--mall通用模块-->
  91. <dependency>
  92. <groupId>com.macro.mall</groupId>
  93. <artifactId>mall-common</artifactId>
  94. <version>${mall-common.version}</version>
  95. </dependency>
  96. <!--mall中MBG生成模块-->
  97. <dependency>
  98. <groupId>com.macro.mall</groupId>
  99. <artifactId>mall-mbg</artifactId>
  100. <version>${mall-mbg.version}</version>
  101. </dependency>
  102. <!--mall安全模块-->
  103. <dependency>
  104. <groupId>com.macro.mall</groupId>
  105. <artifactId>mall-security</artifactId>
  106. <version>${mall-security.version}</version>
  107. </dependency>
  108. <!--MyBatis分页插件starter-->
  109. <dependency>
  110. <groupId>com.github.pagehelper</groupId>
  111. <artifactId>pagehelper-spring-boot-starter</artifactId>
  112. <version>${pagehelper-starter.version}</version>
  113. </dependency>
  114. <!--MyBatis的Starter依赖-->
  115. <dependency>
  116. <groupId>org.mybatis.spring.boot</groupId>
  117. <artifactId>mybatis-spring-boot-starter</artifactId>
  118. <version>${mybatis-spring-boot-starter.version}</version>
  119. </dependency>
  120. <!--MyBatis分页插件-->
  121. <dependency>
  122. <groupId>com.github.pagehelper</groupId>
  123. <artifactId>pagehelper</artifactId>
  124. <version>${pagehelper.version}</version>
  125. </dependency>
  126. <!--集成druid连接池-->
  127. <dependency>
  128. <groupId>com.alibaba</groupId>
  129. <artifactId>druid-spring-boot-starter</artifactId>
  130. <version>${druid.version}</version>
  131. </dependency>
  132. <!--Hutool Java工具包-->
  133. <dependency>
  134. <groupId>cn.hutool</groupId>
  135. <artifactId>hutool-all</artifactId>
  136. <version>${hutool.version}</version>
  137. </dependency>
  138. <!--SpringDoc相关依赖-->
  139. <dependency>
  140. <groupId>org.springdoc</groupId>
  141. <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
  142. <version>${springdoc-openapi.version}</version>
  143. </dependency>
  144. <!-- MyBatis 生成器 -->
  145. <dependency>
  146. <groupId>org.mybatis.generator</groupId>
  147. <artifactId>mybatis-generator-core</artifactId>
  148. <version>${mybatis-generator.version}</version>
  149. </dependency>
  150. <!-- MyBatis-->
  151. <dependency>
  152. <groupId>org.mybatis</groupId>
  153. <artifactId>mybatis</artifactId>
  154. <version>${mybatis.version}</version>
  155. </dependency>
  156. <!--Mysql数据库驱动-->
  157. <dependency>
  158. <groupId>mysql</groupId>
  159. <artifactId>mysql-connector-java</artifactId>
  160. <version>${mysql-connector.version}</version>
  161. </dependency>
  162. <!--SpringData工具包-->
  163. <dependency>
  164. <groupId>org.springframework.data</groupId>
  165. <artifactId>spring-data-commons</artifactId>
  166. <version>${spring-data-commons.version}</version>
  167. </dependency>
  168. <!--JWT(Json Web Token)登录支持-->
  169. <dependency>
  170. <groupId>io.jsonwebtoken</groupId>
  171. <artifactId>jjwt</artifactId>
  172. <version>${jjwt.version}</version>
  173. </dependency>
  174. <!-- 阿里云OSS -->
  175. <dependency>
  176. <groupId>com.aliyun.oss</groupId>
  177. <artifactId>aliyun-sdk-oss</artifactId>
  178. <version>${aliyun-oss.version}</version>
  179. </dependency>
  180. <!--集成logstash-->
  181. <dependency>
  182. <groupId>net.logstash.logback</groupId>
  183. <artifactId>logstash-logback-encoder</artifactId>
  184. <version>${logstash-logback.version}</version>
  185. </dependency>
  186. <!--MinIO JAVA SDK-->
  187. <dependency>
  188. <groupId>io.minio</groupId>
  189. <artifactId>minio</artifactId>
  190. <version>${minio.version}</version>
  191. </dependency>
  192. </dependencies>
  193. </dependencyManagement>
  194. <build>
  195. <pluginManagement>
  196. <plugins>
  197. <plugin>
  198. <groupId>org.springframework.boot</groupId>
  199. <artifactId>spring-boot-maven-plugin</artifactId>
  200. </plugin>
  201. <plugin>
  202. <groupId>io.fabric8</groupId>
  203. <artifactId>docker-maven-plugin</artifactId>
  204. <version>${docker.maven.plugin.version}</version>
  205. <executions>
  206. <!--如果想在项目打包时构建镜像添加-->
  207. <execution>
  208. <id>build-image</id>
  209. <phase>package</phase>
  210. <goals>
  211. <goal>build</goal>
  212. </goals>
  213. </execution>
  214. </executions>
  215. <configuration>
  216. <!-- Docker 远程管理地址-->
  217. <dockerHost>${docker.host}</dockerHost>
  218. <images>
  219. <image>
  220. <!--定义镜像名称-->
  221. <name>mall/${project.name}:${project.version}</name>
  222. <!--定义镜像构建行为-->
  223. <build>
  224. <!--定义基础镜像-->
  225. <from>openjdk:17</from>
  226. <args>
  227. <JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
  228. </args>
  229. <!--定义哪些文件拷贝到容器中-->
  230. <assembly>
  231. <!--定义拷贝到容器的目录-->
  232. <targetDir>/</targetDir>
  233. <!--只拷贝生成的jar包-->
  234. <descriptorRef>artifact</descriptorRef>
  235. </assembly>
  236. <!--定义容器启动命令-->
  237. <entryPoint>["java", "-jar","-Dspring.profiles.active=prod","/${project.build.finalName}.jar"]</entryPoint>
  238. <!--定义维护者-->
  239. <maintainer>macrozheng</maintainer>
  240. </build>
  241. </image>
  242. </images>
  243. </configuration>
  244. </plugin>
  245. </plugins>
  246. </pluginManagement>
  247. <plugins>
  248. <!--解决SpringBoot 3.2 Parameter Name Retention 问题-->
  249. <plugin>
  250. <groupId>org.apache.maven.plugins</groupId>
  251. <artifactId>maven-compiler-plugin</artifactId>
  252. <configuration>
  253. <compilerArgs>
  254. <arg>-parameters</arg>
  255. </compilerArgs>
  256. </configuration>
  257. </plugin>
  258. </plugins>
  259. </build>
  260. <!--使用aliyun的镜像源提升依赖下载速度-->
  261. <repositories>
  262. <repository>
  263. <id>aliyunmaven</id>
  264. <name>aliyun</name>
  265. <url>https://maven.aliyun.com/repository/public</url>
  266. </repository>
  267. <repository>
  268. <id>central2</id>
  269. <name>central2</name>
  270. <url>https://repo1.maven.org/maven2/</url>
  271. </repository>
  272. </repositories>
  273. <!--使用aliyun的镜像源提升插件下载速度-->
  274. <pluginRepositories>
  275. <pluginRepository>
  276. <id>aliyunmaven</id>
  277. <name>aliyun</name>
  278. <url>https://maven.aliyun.com/repository/public</url>
  279. </pluginRepository>
  280. <pluginRepository>
  281. <id>central2</id>
  282. <name>central2</name>
  283. <url>https://repo1.maven.org/maven2/</url>
  284. </pluginRepository>
  285. </pluginRepositories>
  286. </project>