pom.xml 8.5 KB

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