pom.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns="http://maven.apache.org/POM/4.0.0"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <parent>
  6. <groupId>com.zd</groupId>
  7. <artifactId>zd-modules</artifactId>
  8. <version>3.1.0</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <artifactId>zd-modules-system</artifactId>
  12. <description>
  13. zd-modules-system系统模块
  14. </description>
  15. <dependencies>
  16. <!-- SpringCloud Alibaba Nacos -->
  17. <dependency>
  18. <groupId>com.alibaba.cloud</groupId>
  19. <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
  20. </dependency>
  21. <!-- SpringCloud Alibaba Nacos Config -->
  22. <dependency>
  23. <groupId>com.alibaba.cloud</groupId>
  24. <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
  25. </dependency>
  26. <!-- SpringCloud Alibaba Sentinel -->
  27. <dependency>
  28. <groupId>com.alibaba.cloud</groupId>
  29. <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
  30. </dependency>
  31. <!-- SpringBoot Actuator -->
  32. <dependency>
  33. <groupId>org.springframework.boot</groupId>
  34. <artifactId>spring-boot-starter-actuator</artifactId>
  35. </dependency>
  36. <!-- Swagger UI -->
  37. <dependency>
  38. <groupId>io.springfox</groupId>
  39. <artifactId>springfox-swagger-ui</artifactId>
  40. <version>${swagger.fox.version}</version>
  41. </dependency>
  42. <!-- Mysql Connector -->
  43. <dependency>
  44. <groupId>mysql</groupId>
  45. <artifactId>mysql-connector-java</artifactId>
  46. </dependency>
  47. <!-- zd Common DataSource -->
  48. <dependency>
  49. <groupId>com.zd</groupId>
  50. <artifactId>zd-common-datasource</artifactId>
  51. </dependency>
  52. <!-- zd Common DataScope -->
  53. <dependency>
  54. <groupId>com.zd</groupId>
  55. <artifactId>zd-common-datascope</artifactId>
  56. </dependency>
  57. <!-- zd Common Log -->
  58. <dependency>
  59. <groupId>com.zd</groupId>
  60. <artifactId>zd-common-log</artifactId>
  61. </dependency>
  62. <!-- zd Common Swagger -->
  63. <dependency>
  64. <groupId>com.zd</groupId>
  65. <artifactId>zd-common-swagger</artifactId>
  66. </dependency>
  67. <dependency>
  68. <groupId>org.springframework.boot</groupId>
  69. <artifactId>spring-boot-starter-test</artifactId>
  70. <scope>test</scope>
  71. <exclusions>
  72. <exclusion>
  73. <groupId>org.junit.vintage</groupId>
  74. <artifactId>junit-vintage-engine</artifactId>
  75. </exclusion>
  76. </exclusions>
  77. </dependency>
  78. <dependency>
  79. <groupId>com.zd</groupId>
  80. <artifactId>zd-common-resultdata</artifactId>
  81. </dependency>
  82. </dependencies>
  83. <build>
  84. <finalName>${project.artifactId}</finalName>
  85. <plugins>
  86. <plugin>
  87. <groupId>org.springframework.boot</groupId>
  88. <artifactId>spring-boot-maven-plugin</artifactId>
  89. <executions>
  90. <execution>
  91. <goals>
  92. <goal>repackage</goal>
  93. </goals>
  94. </execution>
  95. </executions>
  96. </plugin>
  97. <!-- 打包时跳过test插件,不运行test测试用例 -->
  98. <plugin>
  99. <groupId>org.apache.maven.plugins</groupId>
  100. <artifactId>maven-surefire-plugin</artifactId>
  101. <version>${maven-surefire-plugin.version}</version>
  102. <configuration>
  103. <skipTests>true</skipTests>
  104. </configuration>
  105. </plugin>
  106. <!-- docker的maven插件 -->
  107. <plugin>
  108. <groupId>com.spotify</groupId>
  109. <artifactId>dockerfile-maven-plugin</artifactId>
  110. <version>${docker.maven.verion}</version>
  111. <executions>
  112. <!--执行 mvn package 时 自动构建docker镜像并推送到仓库 -->
  113. <execution>
  114. <id>default</id>
  115. <phase>package</phase>
  116. <goals>
  117. <goal>build</goal>
  118. <goal>push</goal>
  119. </goals>
  120. </execution>
  121. </executions>
  122. <configuration>
  123. <repository>${docker.registry}/${docker.namespace}/${project.artifactId}</repository>
  124. <tag>latest</tag>
  125. <!-- 镜像服务器账号密码 -->
  126. <username>admin</username>
  127. <password>zd123456..</password>
  128. <!-- 构建参数,指定jar包名称 -->
  129. <buildArgs>
  130. <JAR_FILE>${project.artifactId}.jar</JAR_FILE>
  131. </buildArgs>
  132. </configuration>
  133. </plugin>
  134. </plugins>
  135. </build>
  136. </project>