pom.xml 6.3 KB

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