pom.xml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <groupId>top.haijunit</groupId>
  5. <artifactId>mul-agent-virtual-simulation-system</artifactId>
  6. <version>${revision}</version>
  7. <packaging>pom</packaging>
  8. <name>${project.artifactId}</name>
  9. <description>多智体服务</description>
  10. <properties>
  11. <revision>1.0.1</revision>
  12. <java.version>17</java.version>
  13. <maven.compiler.source>${java.version}</maven.compiler.source>
  14. <maven.compiler.target>${java.version}</maven.compiler.target>
  15. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  16. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  17. <maven.test.skip>true</maven.test.skip>
  18. <resource.delimiter>@</resource.delimiter>
  19. <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
  20. <!-- 依赖 -->
  21. <hutool.version>5.8.16</hutool.version>
  22. <spring-boot.version>3.1.5</spring-boot.version>
  23. <mybatis-plus.version>3.5.3.2</mybatis-plus.version>
  24. <!-- 插件版本 -->
  25. <flatten-maven-plugin.version>1.3.0</flatten-maven-plugin.version>
  26. </properties>
  27. <modules>
  28. <module>train-server</module>
  29. </modules>
  30. <!-- 依赖声明 -->
  31. <dependencyManagement>
  32. <dependencies>
  33. <!-- SpringBoot的依赖配置-->
  34. <dependency>
  35. <groupId>org.springframework.boot</groupId>
  36. <artifactId>spring-boot-dependencies</artifactId>
  37. <version>${spring-boot.version}</version>
  38. <type>pom</type>
  39. <scope>import</scope>
  40. </dependency>
  41. <!-- hutool 的依赖配置-->
  42. <dependency>
  43. <groupId>cn.hutool</groupId>
  44. <artifactId>hutool-bom</artifactId>
  45. <version>${hutool.version}</version>
  46. <type>pom</type>
  47. <scope>import</scope>
  48. </dependency>
  49. </dependencies>
  50. </dependencyManagement>
  51. <profiles>
  52. <!-- 本地开发环境 -->
  53. <profile>
  54. <id>local</id>
  55. <properties>
  56. <profiles.active>local</profiles.active>
  57. <logging.level>debug</logging.level>
  58. </properties>
  59. <activation>
  60. <activeByDefault>true</activeByDefault>
  61. </activation>
  62. </profile>
  63. <!-- 生产环境 -->
  64. <profile>
  65. <id>prod</id>
  66. <properties>
  67. <profiles.active>prod</profiles.active>
  68. <logging.level>info</logging.level>
  69. </properties>
  70. </profile>
  71. </profiles>
  72. <build>
  73. <finalName>${project.artifactId}</finalName>
  74. <resources>
  75. <resource>
  76. <directory>src/main/resources</directory>
  77. <filtering>true</filtering>
  78. </resource>
  79. </resources>
  80. <plugins>
  81. <!-- 统一版本号管理 -->
  82. <plugin>
  83. <groupId>org.codehaus.mojo</groupId>
  84. <artifactId>flatten-maven-plugin</artifactId>
  85. <version>${flatten-maven-plugin.version}</version>
  86. <configuration>
  87. <updatePomFile>true</updatePomFile>
  88. <flattenMode>resolveCiFriendliesOnly</flattenMode>
  89. </configuration>
  90. <executions>
  91. <execution>
  92. <id>flatten</id>
  93. <phase>process-resources</phase>
  94. <goals>
  95. <goal>flatten</goal>
  96. </goals>
  97. </execution>
  98. <execution>
  99. <id>flatten.clean</id>
  100. <phase>clean</phase>
  101. <goals>
  102. <goal>clean</goal>
  103. </goals>
  104. </execution>
  105. </executions>
  106. </plugin>
  107. <plugin>
  108. <groupId>org.apache.maven.plugins</groupId>
  109. <artifactId>maven-resources-plugin</artifactId>
  110. <configuration>
  111. <delimiters>
  112. <delimiter>${resource.delimiter}</delimiter>
  113. </delimiters>
  114. <useDefaultDelimiters>false</useDefaultDelimiters>
  115. </configuration>
  116. </plugin>
  117. </plugins>
  118. <pluginManagement>
  119. <plugins>
  120. <plugin>
  121. <groupId>org.springframework.boot</groupId>
  122. <artifactId>spring-boot-maven-plugin</artifactId>
  123. <configuration>
  124. <executable>true</executable>
  125. <layout>ZIP</layout>
  126. <includes>
  127. <include>
  128. <groupId>null</groupId>
  129. <artifactId>null</artifactId>
  130. </include>
  131. </includes>
  132. <excludes>
  133. <exclude>
  134. <groupId>org.projectlombok</groupId>
  135. <artifactId>lombok</artifactId>
  136. </exclude>
  137. </excludes>
  138. </configuration>
  139. </plugin>
  140. <!--拷贝依赖到jar外面的lib目录-->
  141. <plugin>
  142. <groupId>org.apache.maven.plugins</groupId>
  143. <artifactId>maven-dependency-plugin</artifactId>
  144. <executions>
  145. <execution>
  146. <id>copy</id>
  147. <phase>package</phase>
  148. <goals>
  149. <goal>copy-dependencies</goal>
  150. </goals>
  151. <configuration>
  152. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  153. <excludeTransitive>false</excludeTransitive>
  154. <stripVersion>false</stripVersion>
  155. <silent>true</silent>
  156. </configuration>
  157. </execution>
  158. </executions>
  159. </plugin>
  160. <plugin>
  161. <groupId>org.apache.maven.plugins</groupId>
  162. <artifactId>maven-assembly-plugin</artifactId>
  163. <version>3.3.0</version>
  164. <configuration>
  165. <appendAssemblyId>false</appendAssemblyId>
  166. <descriptors>
  167. <descriptor>src/assembly/assembly.xml</descriptor>
  168. </descriptors>
  169. <outputDirectory>target</outputDirectory>
  170. </configuration>
  171. <executions>
  172. <execution>
  173. <phase>package</phase>
  174. <goals>
  175. <goal>single</goal>
  176. </goals>
  177. </execution>
  178. </executions>
  179. </plugin>
  180. </plugins>
  181. </pluginManagement>
  182. </build>
  183. <repositories>
  184. <repository>
  185. <id>public</id>
  186. <name>aliyun nexus</name>
  187. <url>https://maven.aliyun.com/repository/public/</url>
  188. </repository>
  189. <repository>
  190. <id>spring-releases</id>
  191. <url>https://repo.spring.io/libs-release</url>
  192. </repository>
  193. </repositories>
  194. <pluginRepositories>
  195. <pluginRepository>
  196. <id>public</id>
  197. <name>aliyun nexus</name>
  198. <url>https://maven.aliyun.com/repository/public/</url>
  199. </pluginRepository>
  200. <pluginRepository>
  201. <id>spring-releases</id>
  202. <url>https://repo.spring.io/libs-release</url>
  203. </pluginRepository>
  204. </pluginRepositories>
  205. </project>