pom.xml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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-ai</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. <mapstruct.version>1.6.3</mapstruct.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>org.mapstruct</groupId>
  134. <artifactId>mapstruct-processor</artifactId>
  135. <version>${mapstruct.version}</version>
  136. </path>
  137. <!-- <path>-->
  138. <!-- <groupId>com.mybatis-flex</groupId>-->
  139. <!-- <artifactId>mybatis-flex-processor</artifactId>-->
  140. <!-- </path>-->
  141. </annotationProcessorPaths>
  142. <!-- 编译参数写在 arg 内,解决 Spring Boot 3.2 的 Parameter Name Discovery 问题 -->
  143. <debug>false</debug>
  144. <compilerArgs>
  145. <arg>-parameters</arg>
  146. </compilerArgs>
  147. </configuration>
  148. </plugin>
  149. <plugin>
  150. <groupId>org.codehaus.mojo</groupId>
  151. <artifactId>flatten-maven-plugin</artifactId>
  152. </plugin>
  153. </plugins>
  154. </pluginManagement>
  155. <plugins>
  156. <!-- 统一 revision 版本 -->
  157. <plugin>
  158. <groupId>org.codehaus.mojo</groupId>
  159. <artifactId>flatten-maven-plugin</artifactId>
  160. <version>${flatten-maven-plugin.version}</version>
  161. <configuration>
  162. <flattenMode>oss</flattenMode>
  163. <updatePomFile>true</updatePomFile>
  164. </configuration>
  165. <executions>
  166. <execution>
  167. <goals>
  168. <goal>flatten</goal>
  169. </goals>
  170. <id>flatten</id>
  171. <phase>process-resources</phase>
  172. </execution>
  173. <execution>
  174. <goals>
  175. <goal>clean</goal>
  176. </goals>
  177. <id>flatten.clean</id>
  178. <phase>clean</phase>
  179. </execution>
  180. </executions>
  181. </plugin>
  182. </plugins>
  183. <resources>
  184. <resource>
  185. <directory>src/main/resources</directory>
  186. <!-- 关闭过滤 -->
  187. <filtering>false</filtering>
  188. </resource>
  189. <resource>
  190. <directory>src/main/resources</directory>
  191. <!-- 引入所有 匹配文件进行过滤 -->
  192. <includes>
  193. <include>application*</include>
  194. <include>bootstrap*</include>
  195. <include>banner*</include>
  196. </includes>
  197. <!-- 启用过滤 即该资源中的变量将会被过滤器中的值替换 -->
  198. <filtering>true</filtering>
  199. </resource>
  200. </resources>
  201. </build>
  202. </project>