pom.xml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <groupId>com.yc.ship</groupId>
  7. <artifactId>ship-ota-server</artifactId>
  8. <version>1.0.0</version>
  9. <packaging>pom</packaging>
  10. <modules>
  11. <module>ship-module-ota</module>
  12. <module>ship-module-otc</module>
  13. <module>ship-module-product</module>
  14. <module>ship-module-trade</module>
  15. <module>ship-server-web</module>
  16. <module>ship-module-resource</module>
  17. </modules>
  18. <name>${project.artifactId}</name>
  19. <properties>
  20. <revision>1.0.0</revision>
  21. <!-- Maven 相关 -->
  22. <java.version>1.8</java.version>
  23. <maven.compiler.source>${java.version}</maven.compiler.source>
  24. <maven.compiler.target>${java.version}</maven.compiler.target>
  25. <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
  26. <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
  27. <flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
  28. <!-- 看看咋放到 bom 里 -->
  29. <lombok.version>1.18.36</lombok.version>
  30. <spring.boot.version>2.7.18</spring.boot.version>
  31. <mapstruct.version>1.6.3</mapstruct.version>
  32. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  33. </properties>
  34. <dependencyManagement>
  35. <dependencies>
  36. <dependency>
  37. <groupId>com.yc.ship</groupId>
  38. <artifactId>dependencies</artifactId>
  39. <version>${revision}</version>
  40. <type>pom</type>
  41. <scope>import</scope>
  42. </dependency>
  43. </dependencies>
  44. </dependencyManagement>
  45. <build>
  46. <pluginManagement>
  47. <plugins>
  48. <!-- maven-surefire-plugin 插件,用于运行单元测试。 -->
  49. <!-- 注意,需要使用 3.0.X+,因为要支持 Junit 5 版本 -->
  50. <plugin>
  51. <groupId>org.apache.maven.plugins</groupId>
  52. <artifactId>maven-surefire-plugin</artifactId>
  53. <version>${maven-surefire-plugin.version}</version>
  54. <configuration>
  55. <skip>true</skip>
  56. </configuration>
  57. </plugin>
  58. <!-- maven-compiler-plugin 插件,解决 spring-boot-configuration-processor + Lombok + MapStruct 组合 -->
  59. <!-- https://stackoverflow.com/questions/33483697/re-run-spring-boot-configuration-annotation-processor-to-update-generated-metada -->
  60. <plugin>
  61. <groupId>org.apache.maven.plugins</groupId>
  62. <artifactId>maven-compiler-plugin</artifactId>
  63. <version>${maven-compiler-plugin.version}</version>
  64. <configuration>
  65. <annotationProcessorPaths>
  66. <path>
  67. <groupId>org.springframework.boot</groupId>
  68. <artifactId>spring-boot-configuration-processor</artifactId>
  69. <version>${spring.boot.version}</version>
  70. </path>
  71. <path>
  72. <groupId>org.projectlombok</groupId>
  73. <artifactId>lombok</artifactId>
  74. <version>${lombok.version}</version>
  75. </path>
  76. <path>
  77. <groupId>org.mapstruct</groupId>
  78. <artifactId>mapstruct-processor</artifactId>
  79. <version>${mapstruct.version}</version>
  80. </path>
  81. </annotationProcessorPaths>
  82. </configuration>
  83. </plugin>
  84. <plugin>
  85. <groupId>org.codehaus.mojo</groupId>
  86. <artifactId>flatten-maven-plugin</artifactId>
  87. </plugin>
  88. </plugins>
  89. </pluginManagement>
  90. <plugins>
  91. <!-- 统一 revision 版本 -->
  92. <plugin>
  93. <groupId>org.codehaus.mojo</groupId>
  94. <artifactId>flatten-maven-plugin</artifactId>
  95. <version>${flatten-maven-plugin.version}</version>
  96. <configuration>
  97. <flattenMode>oss</flattenMode>
  98. <updatePomFile>true</updatePomFile>
  99. </configuration>
  100. <executions>
  101. <execution>
  102. <goals>
  103. <goal>flatten</goal>
  104. </goals>
  105. <id>flatten</id>
  106. <phase>process-resources</phase>
  107. </execution>
  108. <execution>
  109. <goals>
  110. <goal>clean</goal>
  111. </goals>
  112. <id>flatten.clean</id>
  113. <phase>clean</phase>
  114. </execution>
  115. </executions>
  116. </plugin>
  117. </plugins>
  118. </build>
  119. <!-- 使用 huawei / aliyun 的 Maven 源,提升下载速度 -->
  120. <repositories>
  121. <repository>
  122. <id>huaweicloud</id>
  123. <name>huawei</name>
  124. <url>https://mirrors.huaweicloud.com/repository/maven/</url>
  125. </repository>
  126. <repository>
  127. <id>aliyunmaven</id>
  128. <name>aliyun</name>
  129. <url>https://maven.aliyun.com/repository/public</url>
  130. </repository>
  131. <repository>
  132. <id>spring-milestones</id>
  133. <name>Spring Milestones</name>
  134. <url>https://repo.spring.io/milestone</url>
  135. <snapshots>
  136. <enabled>false</enabled>
  137. </snapshots>
  138. </repository>
  139. <repository>
  140. <id>spring-snapshots</id>
  141. <name>Spring Snapshots</name>
  142. <url>https://repo.spring.io/snapshot</url>
  143. <releases>
  144. <enabled>false</enabled>
  145. </releases>
  146. </repository>
  147. </repositories>
  148. </project>