pom.xml 6.4 KB

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