pom.xml 8.8 KB

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