基于pigx的分布式架构
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

282 lines
12 KiB

11 months ago
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Copyright (c) 2020 pig4cloud Authors. All Rights Reserved.
  4. ~
  5. ~ Licensed under the Apache License, Version 2.0 (the "License");
  6. ~ you may not use this file except in compliance with the License.
  7. ~ You may obtain a copy of the License at
  8. ~
  9. ~ http://www.apache.org/licenses/LICENSE-2.0
  10. ~
  11. ~ Unless required by applicable law or agreed to in writing, software
  12. ~ distributed under the License is distributed on an "AS IS" BASIS,
  13. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. ~ See the License for the specific language governing permissions and
  15. ~ limitations under the License.
  16. -->
  17. <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
  18. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  19. <modelVersion>4.0.0</modelVersion>
  20. <groupId>com.pig4cloud</groupId>
  21. <artifactId>iec</artifactId>
  22. <name>${project.artifactId}</name>
  23. <version>${revision}</version>
  24. <packaging>pom</packaging>
  25. <url>https://www.pig4cloud.com</url>
  26. <properties>
  27. <!-- 项目版本号 -->
  28. <revision>3.8.1-JDK8</revision>
  29. <spring-boot.version>2.7.18</spring-boot.version>
  30. <spring-cloud.version>2021.0.8</spring-cloud.version>
  31. <spring-cloud-alibaba.version>2021.0.6.1</spring-cloud-alibaba.version>
  32. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  33. <maven.compiler.source>1.8</maven.compiler.source>
  34. <maven.compiler.target>1.8</maven.compiler.target>
  35. <spring-boot-admin.version>2.7.15</spring-boot-admin.version>
  36. <spring.authorization.version>0.4.5</spring.authorization.version>
  37. <captcha.version>2.2.3</captcha.version>
  38. <screw.version>0.0.1</screw.version>
  39. <lombok.version>1.18.30</lombok.version>
  40. <velocity.version>2.3</velocity.version>
  41. <velocity.tool.version>3.1</velocity.tool.version>
  42. <configuration.version>1.10</configuration.version>
  43. <jasypt.version>3.0.5</jasypt.version>
  44. <knife4j.version>3.0.5</knife4j.version>
  45. <springdoc.version>1.6.9</springdoc.version>
  46. <xxl-job.version>2.4.0</xxl-job.version>
  47. <docker.plugin.version>0.32.0</docker.plugin.version>
  48. <docker.host>http://192.168.0.100:2375</docker.host>
  49. <docker.registry>192.168.0.100</docker.registry>
  50. <docker.namespace>pig4cloud</docker.namespace>
  51. <docker.username>username</docker.username>
  52. <docker.password>password</docker.password>
  53. <git.commit.plugin>4.9.9</git.commit.plugin>
  54. <spring.checkstyle.plugin>0.0.39</spring.checkstyle.plugin>
  55. <flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
  56. </properties>
  57. <!-- 以下依赖 全局所有的模块都会引入 -->
  58. <dependencies>
  59. <!--配置文件处理器-->
  60. <dependency>
  61. <groupId>org.springframework.boot</groupId>
  62. <artifactId>spring-boot-configuration-processor</artifactId>
  63. <optional>true</optional>
  64. </dependency>
  65. <!--配置文件加解密-->
  66. <dependency>
  67. <groupId>com.github.ulisesbocchio</groupId>
  68. <artifactId>jasypt-spring-boot-starter</artifactId>
  69. <version>${jasypt.version}</version>
  70. </dependency>
  71. <!--监控-->
  72. <dependency>
  73. <groupId>org.springframework.boot</groupId>
  74. <artifactId>spring-boot-starter-actuator</artifactId>
  75. </dependency>
  76. <!--监控客户端-->
  77. <dependency>
  78. <groupId>de.codecentric</groupId>
  79. <artifactId>spring-boot-admin-starter-client</artifactId>
  80. <version>${spring-boot-admin.version}</version>
  81. </dependency>
  82. <!--Lombok-->
  83. <dependency>
  84. <groupId>org.projectlombok</groupId>
  85. <artifactId>lombok</artifactId>
  86. <version>${lombok.version}</version>
  87. <scope>provided</scope>
  88. </dependency>
  89. <!--测试依赖-->
  90. <dependency>
  91. <groupId>org.springframework.boot</groupId>
  92. <artifactId>spring-boot-starter-test</artifactId>
  93. <scope>test</scope>
  94. </dependency>
  95. </dependencies>
  96. <modules>
  97. <module>iec-register</module>
  98. <module>iec-gateway</module>
  99. <module>iec-auth</module>
  100. <module>iec-upms</module>
  101. <module>iec-common</module>
  102. </modules>
  103. <dependencyManagement>
  104. <dependencies>
  105. <!--pig 公共版本定义-->
  106. <dependency>
  107. <groupId>com.pig4cloud</groupId>
  108. <artifactId>iec-common-bom</artifactId>
  109. <version>${project.version}</version>
  110. <type>pom</type>
  111. <scope>import</scope>
  112. </dependency>
  113. <!-- spring boot 依赖 -->
  114. <dependency>
  115. <groupId>org.springframework.boot</groupId>
  116. <artifactId>spring-boot-dependencies</artifactId>
  117. <version>${spring-boot.version}</version>
  118. <type>pom</type>
  119. <scope>import</scope>
  120. </dependency>
  121. <!-- spring cloud 依赖 -->
  122. <dependency>
  123. <groupId>org.springframework.cloud</groupId>
  124. <artifactId>spring-cloud-dependencies</artifactId>
  125. <version>${spring-cloud.version}</version>
  126. <type>pom</type>
  127. <scope>import</scope>
  128. </dependency>
  129. <!-- spring cloud alibaba 依赖 -->
  130. <dependency>
  131. <groupId>com.alibaba.cloud</groupId>
  132. <artifactId>spring-cloud-alibaba-dependencies</artifactId>
  133. <version>${spring-cloud-alibaba.version}</version>
  134. <type>pom</type>
  135. <scope>import</scope>
  136. </dependency>
  137. </dependencies>
  138. </dependencyManagement>
  139. <build>
  140. <finalName>${project.name}</finalName>
  141. <resources>
  142. <resource>
  143. <directory>src/main/resources</directory>
  144. <filtering>true</filtering>
  145. </resource>
  146. </resources>
  147. <pluginManagement>
  148. <plugins>
  149. <plugin>
  150. <groupId>org.springframework.boot</groupId>
  151. <artifactId>spring-boot-maven-plugin</artifactId>
  152. <version>${spring-boot.version}</version>
  153. <configuration>
  154. <finalName>${project.build.finalName}</finalName>
  155. <layers>
  156. <enabled>true</enabled>
  157. </layers>
  158. </configuration>
  159. <executions>
  160. <execution>
  161. <goals>
  162. <goal>repackage</goal>
  163. </goals>
  164. </execution>
  165. </executions>
  166. </plugin>
  167. <plugin>
  168. <groupId>io.fabric8</groupId>
  169. <artifactId>docker-maven-plugin</artifactId>
  170. <version>${docker.plugin.version}</version>
  171. <configuration>
  172. <!-- Docker Remote Api-->
  173. <dockerHost>${docker.host}</dockerHost>
  174. <!-- Docker 镜像私服-->
  175. <registry>${docker.registry}</registry>
  176. <!-- 认证信息-->
  177. <authConfig>
  178. <push>
  179. <username>${docker.username}</username>
  180. <password>${docker.password}</password>
  181. </push>
  182. </authConfig>
  183. <images>
  184. <image>
  185. <!-- 镜像名称: 172.17.0.111/library/pig-gateway:2.6.3-->
  186. <name>${docker.registry}/${docker.namespace}/${project.name}:${project.version}</name>
  187. <build>
  188. <dockerFile>${project.basedir}/Dockerfile</dockerFile>
  189. </build>
  190. </image>
  191. </images>
  192. </configuration>
  193. </plugin>
  194. </plugins>
  195. </pluginManagement>
  196. <plugins>
  197. <!-- 统一 revision 版本 -->
  198. <plugin>
  199. <groupId>org.codehaus.mojo</groupId>
  200. <artifactId>flatten-maven-plugin</artifactId>
  201. <version>${flatten-maven-plugin.version}</version>
  202. <configuration>
  203. <flattenMode>resolveCiFriendliesOnly</flattenMode>
  204. <updatePomFile>true</updatePomFile>
  205. </configuration>
  206. <executions>
  207. <execution>
  208. <id>flatten</id>
  209. <phase>process-resources</phase>
  210. <goals>
  211. <goal>flatten</goal>
  212. </goals>
  213. </execution>
  214. <execution>
  215. <id>flatten.clean</id>
  216. <phase>clean</phase>
  217. <goals>
  218. <goal>clean</goal>
  219. </goals>
  220. </execution>
  221. </executions>
  222. </plugin>
  223. <!--打包jar 与git commit 关联插件-->
  224. <plugin>
  225. <groupId>io.github.git-commit-id</groupId>
  226. <artifactId>git-commit-id-maven-plugin</artifactId>
  227. <version>${git.commit.plugin}</version>
  228. <executions>
  229. <execution>
  230. <id>get-the-git-infos</id>
  231. <goals>
  232. <goal>revision</goal>
  233. </goals>
  234. <phase>initialize</phase>
  235. </execution>
  236. </executions>
  237. <configuration>
  238. <failOnNoGitDirectory>false</failOnNoGitDirectory>
  239. <generateGitPropertiesFile>true</generateGitPropertiesFile>
  240. <!--因为项目定制了jackson的日期时间序列化/反序列化格式,因此这里要进行配置,不然通过management.info.git.mode=full进行完整git信息监控时会存在问题-->
  241. <dateFormat>yyyy-MM-dd HH:mm:ss</dateFormat>
  242. <includeOnlyProperties>
  243. <includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
  244. <includeOnlyProperty>^git.commit.(id|message|time).*$</includeOnlyProperty>
  245. </includeOnlyProperties>
  246. </configuration>
  247. </plugin>
  248. <!--
  249. 代码格式插件,默认使用spring 规则,可运行命令进行项目格式化:./mvnw spring-javaformat:apply 或 mvn spring-javaformat:apply,可在IDEA中安装插件以下插件进行自动格式化:
  250. https://repo1.maven.org/maven2/io/spring/javaformat/spring-javaformat-intellij-idea-plugin
  251. -->
  252. <plugin>
  253. <groupId>io.spring.javaformat</groupId>
  254. <artifactId>spring-javaformat-maven-plugin</artifactId>
  255. <version>${spring.checkstyle.plugin}</version>
  256. </plugin>
  257. </plugins>
  258. </build>
  259. <profiles>
  260. <profile>
  261. <id>cloud</id>
  262. <properties>
  263. <!-- 环境标识,需要与配置文件的名称相对应 -->
  264. <profiles.active>dev</profiles.active>
  265. <nacos.username>nacos</nacos.username>
  266. <nacos.password>nacos</nacos.password>
  267. </properties>
  268. <activation>
  269. <!-- 默认环境 -->
  270. <activeByDefault>true</activeByDefault>
  271. </activation>
  272. </profile>
  273. </profiles>
  274. </project>