pom.xml 6.3 KB

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