pom.xml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <groupId>com.hosea.cloud.user</groupId>
  6. <artifactId>service-user</artifactId>
  7. <version>${revision}</version>
  8. <packaging>pom</packaging>
  9. <name>Service User ${version}</name>
  10. <description>用户服务</description>
  11. <properties>
  12. <revision>1.0.0</revision>
  13. <hosea-cloud.version>1.0.0</hosea-cloud.version>
  14. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  15. <flatten-maven-plugin.version>1.3.0</flatten-maven-plugin.version>
  16. <spring-boot.version>3.0.2</spring-boot.version>
  17. <mysql.version>8.0.32</mysql.version>
  18. </properties>
  19. <modules>
  20. <module>service-user-client</module>
  21. <module>service-user-adapter</module>
  22. <module>service-user-app</module>
  23. <module>service-user-domain</module>
  24. <module>service-user-infrastructure</module>
  25. <module>start</module>
  26. </modules>
  27. <dependencies>
  28. <!--region 微服务脚手架-->
  29. <dependency>
  30. <groupId>com.hosea.cloud</groupId>
  31. <artifactId>hosea-cloud</artifactId>
  32. <version>${hosea-cloud.version}</version>
  33. <type>pom</type>
  34. </dependency>
  35. <!--endregion-->
  36. <!--region 单元测试-->
  37. <dependency>
  38. <groupId>org.junit.jupiter</groupId>
  39. <artifactId>junit-jupiter</artifactId>
  40. <scope>test</scope>
  41. </dependency>
  42. <dependency>
  43. <groupId>org.mockito</groupId>
  44. <artifactId>mockito-core</artifactId>
  45. <scope>test</scope>
  46. </dependency>
  47. <!--endregion-->
  48. </dependencies>
  49. <dependencyManagement>
  50. <dependencies>
  51. <!--region 项目模块-->
  52. <dependency>
  53. <groupId>com.hosea.cloud.user</groupId>
  54. <artifactId>service-user-client</artifactId>
  55. <version>${revision}</version>
  56. </dependency>
  57. <dependency>
  58. <groupId>com.hosea.cloud.user</groupId>
  59. <artifactId>service-user-adapter</artifactId>
  60. <version>${revision}</version>
  61. </dependency>
  62. <dependency>
  63. <groupId>com.hosea.cloud.user</groupId>
  64. <artifactId>service-user-app</artifactId>
  65. <version>${revision}</version>
  66. </dependency>
  67. <dependency>
  68. <groupId>com.hosea.cloud.user</groupId>
  69. <artifactId>service-user-domain</artifactId>
  70. <version>${revision}</version>
  71. </dependency>
  72. <dependency>
  73. <groupId>com.hosea.cloud.user</groupId>
  74. <artifactId>service-user-infrastructure</artifactId>
  75. <version>${revision}</version>
  76. </dependency>
  77. <!--endregion-->
  78. <!--region 微服务脚手架-->
  79. <dependency>
  80. <groupId>com.hosea.cloud</groupId>
  81. <artifactId>hosea-cloud</artifactId>
  82. <version>${hosea-cloud.version}</version>
  83. <type>pom</type>
  84. <scope>import</scope>
  85. </dependency>
  86. <!--endregion-->
  87. <dependency>
  88. <groupId>mysql</groupId>
  89. <artifactId>mysql-connector-java</artifactId>
  90. <version>${mysql.version}</version>
  91. </dependency>
  92. </dependencies>
  93. </dependencyManagement>
  94. <build>
  95. <pluginManagement>
  96. <plugins>
  97. <!--region 打包-->
  98. <plugin>
  99. <groupId>org.apache.maven.plugins</groupId>
  100. <artifactId>maven-compiler-plugin</artifactId>
  101. <configuration>
  102. <source>17</source>
  103. <target>17</target>
  104. <encoding>${project.build.sourceEncoding}</encoding>
  105. </configuration>
  106. </plugin>
  107. <!--endregion-->
  108. <!--region Spring Boot 可执行包-->
  109. <plugin>
  110. <groupId>org.springframework.boot</groupId>
  111. <artifactId>spring-boot-maven-plugin</artifactId>
  112. <version>${spring-boot.version}</version>
  113. <executions>
  114. <execution>
  115. <goals>
  116. <goal>repackage</goal>
  117. </goals>
  118. </execution>
  119. </executions>
  120. </plugin>
  121. <!--endregion-->
  122. <!--region 动态版本号-->
  123. <plugin>
  124. <groupId>org.codehaus.mojo</groupId>
  125. <artifactId>flatten-maven-plugin</artifactId>
  126. <version>${flatten-maven-plugin.version}</version>
  127. <configuration>
  128. <!-- 配置扁平化后的 POM 文件的名称 -->
  129. <flattenedPomFilename>pom-xml-flattened</flattenedPomFilename>
  130. <!-- 是否更新原始 POM 文件 -->
  131. <updatePomFile>true</updatePomFile>
  132. <!-- 指定扁平化模式,resolveCiFriendliesOnly 表示仅解析 CI 友好的占位符 -->
  133. <flattenMode>resolveCiFriendliesOnly</flattenMode>
  134. </configuration>
  135. <executions>
  136. <!-- 定义插件的执行配置 -->
  137. <execution>
  138. <!-- 执行的唯一标识 -->
  139. <id>flatten</id>
  140. <!-- 指定插件绑定的生命周期阶段 -->
  141. <phase>process-resources</phase>
  142. <!-- 定义执行的目标 -->
  143. <goals>
  144. <!-- 执行扁平化操作 -->
  145. <goal>flatten</goal>
  146. </goals>
  147. </execution>
  148. <!-- 定义清理阶段的执行配置 -->
  149. <execution>
  150. <!-- 清理阶段的唯一标识 -->
  151. <id>flatten.clean</id>
  152. <!-- 指定清理阶段绑定的生命周期阶段 -->
  153. <phase>clean</phase>
  154. <!-- 定义清理阶段执行的目标 -->
  155. <goals>
  156. <!-- 执行清理操作 -->
  157. <goal>clean</goal>
  158. </goals>
  159. </execution>
  160. </executions>
  161. </plugin>
  162. <!--endregion-->
  163. </plugins>
  164. </pluginManagement>
  165. <plugins>
  166. <plugin>
  167. <groupId>org.codehaus.mojo</groupId>
  168. <artifactId>flatten-maven-plugin</artifactId>
  169. </plugin>
  170. </plugins>
  171. </build>
  172. </project>