pom.xml 6.4 KB

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