pom.xml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <groupId>org.springblade</groupId>
  6. <artifactId>BladeX</artifactId>
  7. <version>2.9.1.RELEASE</version>
  8. <packaging>pom</packaging>
  9. <properties>
  10. <bladex.project.version>2.9.1.RELEASE</bladex.project.version>
  11. <java.version>1.8</java.version>
  12. <maven.plugin.version>3.8.1</maven.plugin.version>
  13. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  14. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  15. <spring.boot.version>2.3.12.RELEASE</spring.boot.version>
  16. <spring.cloud.version>Hoxton.SR12</spring.cloud.version>
  17. <spring.platform.version>Cairo-SR8</spring.platform.version>
  18. <!-- 推荐使用Harbor -->
  19. <docker.registry.url>192.168.0.157</docker.registry.url>
  20. <docker.registry.host>http://${docker.registry.url}:2375</docker.registry.host>
  21. <docker.username>admin</docker.username>
  22. <docker.password>Harbor12345</docker.password>
  23. <docker.namespace>blade</docker.namespace>
  24. <docker.plugin.version>1.4.13</docker.plugin.version>
  25. </properties>
  26. <modules>
  27. <module>blade-auth</module>
  28. <module>blade-common</module>
  29. <module>blade-gateway</module>
  30. <module>blade-ops</module>
  31. <module>blade-ops-api</module>
  32. <module>blade-plugin</module>
  33. <module>blade-plugin-api</module>
  34. <module>blade-service</module>
  35. <module>blade-service-api</module>
  36. </modules>
  37. <dependencyManagement>
  38. <dependencies>
  39. <dependency>
  40. <groupId>org.springblade.platform</groupId>
  41. <artifactId>blade-bom</artifactId>
  42. <version>${bladex.project.version}</version>
  43. <type>pom</type>
  44. <scope>import</scope>
  45. </dependency>
  46. <dependency>
  47. <groupId>org.springblade</groupId>
  48. <artifactId>blade-common</artifactId>
  49. <version>${bladex.project.version}</version>
  50. </dependency>
  51. <dependency>
  52. <groupId>org.springframework.boot</groupId>
  53. <artifactId>spring-boot-dependencies</artifactId>
  54. <version>${spring.boot.version}</version>
  55. <type>pom</type>
  56. <scope>import</scope>
  57. </dependency>
  58. <dependency>
  59. <groupId>org.springframework.cloud</groupId>
  60. <artifactId>spring-cloud-dependencies</artifactId>
  61. <version>${spring.cloud.version}</version>
  62. <type>pom</type>
  63. <scope>import</scope>
  64. </dependency>
  65. <dependency>
  66. <groupId>io.spring.platform</groupId>
  67. <artifactId>platform-bom</artifactId>
  68. <version>${spring.platform.version}</version>
  69. <type>pom</type>
  70. <scope>import</scope>
  71. </dependency>
  72. </dependencies>
  73. </dependencyManagement>
  74. <dependencies>
  75. <dependency>
  76. <groupId>org.projectlombok</groupId>
  77. <artifactId>lombok</artifactId>
  78. <scope>provided</scope>
  79. </dependency>
  80. </dependencies>
  81. <build>
  82. <finalName>${project.name}</finalName>
  83. <resources>
  84. <resource>
  85. <directory>src/main/resources</directory>
  86. </resource>
  87. <resource>
  88. <directory>src/main/java</directory>
  89. <includes>
  90. <include>**/*.xml</include>
  91. </includes>
  92. </resource>
  93. </resources>
  94. <pluginManagement>
  95. <plugins>
  96. <plugin>
  97. <groupId>org.apache.maven.plugins</groupId>
  98. <artifactId>maven-surefire-plugin</artifactId>
  99. <version>2.4.2</version>
  100. <configuration>
  101. <skipTests>true</skipTests>
  102. </configuration>
  103. </plugin>
  104. <plugin>
  105. <groupId>org.springframework.boot</groupId>
  106. <artifactId>spring-boot-maven-plugin</artifactId>
  107. <version>${spring.boot.version}</version>
  108. <configuration>
  109. <fork>true</fork>
  110. <finalName>${project.build.finalName}</finalName>
  111. </configuration>
  112. <executions>
  113. <execution>
  114. <goals>
  115. <goal>repackage</goal>
  116. </goals>
  117. </execution>
  118. </executions>
  119. </plugin>
  120. <plugin>
  121. <groupId>com.spotify</groupId>
  122. <artifactId>dockerfile-maven-plugin</artifactId>
  123. <version>${docker.plugin.version}</version>
  124. <configuration>
  125. <username>${docker.username}</username>
  126. <password>${docker.password}</password>
  127. <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
  128. <tag>${project.version}</tag>
  129. <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
  130. <buildArgs>
  131. <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
  132. </buildArgs>
  133. </configuration>
  134. <!--子服务添加如下配置,运行 mvn deploy 命令便会自动打包镜像-->
  135. <!--<executions>
  136. <execution>
  137. <id>default</id>
  138. <goals>
  139. <goal>build</goal>
  140. <goal>push</goal>
  141. </goals>
  142. </execution>
  143. </executions>-->
  144. </plugin>
  145. <plugin>
  146. <groupId>org.apache.maven.plugins</groupId>
  147. <artifactId>maven-antrun-plugin</artifactId>
  148. <executions>
  149. <execution>
  150. <phase>package</phase>
  151. <goals>
  152. <goal>run</goal>
  153. </goals>
  154. <configuration>
  155. <tasks>
  156. <!--suppress UnresolvedMavenProperty -->
  157. <copy overwrite="true"
  158. tofile="${session.executionRootDirectory}/target/${project.artifactId}.jar"
  159. file="${project.build.directory}/${project.artifactId}.jar" />
  160. </tasks>
  161. </configuration>
  162. </execution>
  163. </executions>
  164. </plugin>
  165. </plugins>
  166. </pluginManagement>
  167. <plugins>
  168. <plugin>
  169. <groupId>com.spotify</groupId>
  170. <artifactId>dockerfile-maven-plugin</artifactId>
  171. <version>1.4.13</version>
  172. <configuration>
  173. <skip>true</skip>
  174. </configuration>
  175. </plugin>
  176. <plugin>
  177. <groupId>org.springframework.boot</groupId>
  178. <artifactId>spring-boot-maven-plugin</artifactId>
  179. </plugin>
  180. <plugin>
  181. <artifactId>maven-compiler-plugin</artifactId>
  182. <version>${maven.plugin.version}</version>
  183. <configuration>
  184. <source>${java.version}</source>
  185. <target>${java.version}</target>
  186. <encoding>UTF-8</encoding>
  187. <compilerArgs>
  188. <arg>-parameters</arg>
  189. </compilerArgs>
  190. </configuration>
  191. </plugin>
  192. </plugins>
  193. </build>
  194. <repositories>
  195. <repository>
  196. <id>aliyun-repos</id>
  197. <url>https://maven.aliyun.com/repository/public/</url>
  198. <snapshots>
  199. <enabled>false</enabled>
  200. </snapshots>
  201. </repository>
  202. <repository>
  203. <id>blade-release</id>
  204. <name>Release Repository</name>
  205. <url>http://nexus.bladex.vip/repository/maven-releases/</url>
  206. </repository>
  207. </repositories>
  208. <pluginRepositories>
  209. <pluginRepository>
  210. <id>aliyun-plugin</id>
  211. <url>https://maven.aliyun.com/repository/public/</url>
  212. <snapshots>
  213. <enabled>false</enabled>
  214. </snapshots>
  215. </pluginRepository>
  216. </pluginRepositories>
  217. </project>