pom.xml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <!-- 项目信息 -->
  6. <groupId>org.eco.vip</groupId>
  7. <artifactId>eco-boot</artifactId>
  8. <version>${revision}</version>
  9. <name>${project.artifactId}</name>
  10. <description>eco-boot</description>
  11. <packaging>pom</packaging>
  12. <!-- 项目模块 -->
  13. <modules>
  14. <module>eco-start</module>
  15. <module>eco-common</module>
  16. <module>eco-bom</module>
  17. <module>eco-nexus-core</module>
  18. <module>eco-reliability</module>
  19. </modules>
  20. <!-- 版本 -->
  21. <properties>
  22. <!-- 系统版本 -->
  23. <revision>1.0.0</revision>
  24. <java.version>21</java.version>
  25. <lombok.version>1.18.36</lombok.version>
  26. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  27. <spring-boot.version>3.4.3</spring-boot.version>
  28. <!-- 插件版本 -->
  29. <flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
  30. <maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
  31. <maven-surefire-plugin.version>3.5.0</maven-surefire-plugin.version>
  32. <mybatis-flex.version>1.10.9</mybatis-flex.version>
  33. <mapstruct-plus.version>1.4.8</mapstruct-plus.version>
  34. </properties>
  35. <!-- 依赖管理 -->
  36. <dependencyManagement>
  37. <dependencies>
  38. <!-- 全局的依赖配置-->
  39. <dependency>
  40. <groupId>org.eco.vip</groupId>
  41. <artifactId>eco-bom</artifactId>
  42. <version>${revision}</version>
  43. <type>pom</type>
  44. <scope>import</scope>
  45. </dependency>
  46. </dependencies>
  47. </dependencyManagement>
  48. <repositories>
  49. <repository>
  50. <id>public</id>
  51. <name>huawei nexus</name>
  52. <url>https://mirrors.huaweicloud.com/repository/maven/</url>
  53. <releases>
  54. <enabled>true</enabled>
  55. </releases>
  56. </repository>
  57. </repositories>
  58. <pluginRepositories>
  59. <pluginRepository>
  60. <id>public</id>
  61. <name>huawei nexus</name>
  62. <url>https://mirrors.huaweicloud.com/repository/maven/</url>
  63. <releases>
  64. <enabled>true</enabled>
  65. </releases>
  66. <snapshots>
  67. <enabled>false</enabled>
  68. </snapshots>
  69. </pluginRepository>
  70. </pluginRepositories>
  71. <!-- 环境标识,需要与配置文件的名称相对应 -->
  72. <profiles>
  73. <profile>
  74. <id>local</id>
  75. <properties>
  76. <profiles.active>local</profiles.active>
  77. <logging.level>info</logging.level>
  78. </properties>
  79. <activation>
  80. <!-- 默认环境 -->
  81. <activeByDefault>true</activeByDefault>
  82. </activation>
  83. </profile>
  84. <profile>
  85. <id>dev</id>
  86. <properties>
  87. <!-- 环境标识,需要与配置文件的名称相对应 -->
  88. <profiles.active>dev</profiles.active>
  89. <logging.level>info</logging.level>
  90. </properties>
  91. </profile>
  92. <profile>
  93. <id>prod</id>
  94. <properties>
  95. <profiles.active>prod</profiles.active>
  96. <logging.level>warn</logging.level>
  97. </properties>
  98. </profile>
  99. </profiles>
  100. <build>
  101. <pluginManagement>
  102. <plugins>
  103. <!-- maven-surefire-plugin 插件,用于运行单元测试。 -->
  104. <!-- 注意,需要使用 3.0.X+,因为要支持 Junit 5 版本 -->
  105. <plugin>
  106. <groupId>org.apache.maven.plugins</groupId>
  107. <artifactId>maven-surefire-plugin</artifactId>
  108. <version>${maven-surefire-plugin.version}</version>
  109. </plugin>
  110. <!-- maven-compiler-plugin 插件,解决 spring-boot-configuration-processor + Lombok + MapStruct 组合 -->
  111. <!-- https://stackoverflow.com/questions/33483697/re-run-spring-boot-configuration-annotation-processor-to-update-generated-metada -->
  112. <plugin>
  113. <groupId>org.apache.maven.plugins</groupId>
  114. <artifactId>maven-compiler-plugin</artifactId>
  115. <version>${maven-compiler-plugin.version}</version>
  116. <configuration>
  117. <release>${java.version}</release>
  118. <source>${java.version}</source>
  119. <target>${java.version}</target>
  120. <encoding>${project.build.sourceEncoding}</encoding>
  121. <annotationProcessorPaths>
  122. <path>
  123. <groupId>org.springframework.boot</groupId>
  124. <artifactId>spring-boot-configuration-processor</artifactId>
  125. <version>${spring-boot.version}</version>
  126. </path>
  127. <path>
  128. <groupId>org.projectlombok</groupId>
  129. <artifactId>lombok</artifactId>
  130. <!-- 这里必须要指定lombok的版本;否则lombok注解会失效-->
  131. <version>${lombok.version}</version>
  132. </path>
  133. <path>
  134. <groupId>io.github.linpeilie</groupId>
  135. <artifactId>mapstruct-plus-processor</artifactId>
  136. <version>${mapstruct-plus.version}</version>
  137. </path>
  138. <path>
  139. <groupId>com.mybatis-flex</groupId>
  140. <artifactId>mybatis-flex-processor</artifactId>
  141. <version>${mybatis-flex.version}</version>
  142. </path>
  143. </annotationProcessorPaths>
  144. <!-- 编译参数写在 arg 内,解决 Spring Boot 3.2 的 Parameter Name Discovery 问题 -->
  145. <debug>false</debug>
  146. <compilerArgs>
  147. <arg>-parameters</arg>
  148. </compilerArgs>
  149. </configuration>
  150. </plugin>
  151. <plugin>
  152. <groupId>org.codehaus.mojo</groupId>
  153. <artifactId>flatten-maven-plugin</artifactId>
  154. </plugin>
  155. </plugins>
  156. </pluginManagement>
  157. <plugins>
  158. <!-- 统一 revision 版本 -->
  159. <plugin>
  160. <groupId>org.codehaus.mojo</groupId>
  161. <artifactId>flatten-maven-plugin</artifactId>
  162. <version>${flatten-maven-plugin.version}</version>
  163. <configuration>
  164. <flattenMode>oss</flattenMode>
  165. <updatePomFile>true</updatePomFile>
  166. </configuration>
  167. <executions>
  168. <execution>
  169. <goals>
  170. <goal>flatten</goal>
  171. </goals>
  172. <id>flatten</id>
  173. <phase>process-resources</phase>
  174. </execution>
  175. <execution>
  176. <goals>
  177. <goal>clean</goal>
  178. </goals>
  179. <id>flatten.clean</id>
  180. <phase>clean</phase>
  181. </execution>
  182. </executions>
  183. </plugin>
  184. </plugins>
  185. <resources>
  186. <resource>
  187. <directory>src/main/resources</directory>
  188. <!-- 关闭过滤 -->
  189. <filtering>false</filtering>
  190. </resource>
  191. <resource>
  192. <directory>src/main/resources</directory>
  193. <!-- 引入所有 匹配文件进行过滤 -->
  194. <includes>
  195. <include>application*</include>
  196. <include>bootstrap*</include>
  197. <include>banner*</include>
  198. </includes>
  199. <!-- 启用过滤 即该资源中的变量将会被过滤器中的值替换 -->
  200. <filtering>true</filtering>
  201. </resource>
  202. </resources>
  203. </build>
  204. </project>