pom.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <project xmlns="http://maven.apache.org/POM/4.0.0"
  2. 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. <parent>
  5. <groupId>com.zd</groupId>
  6. <artifactId>zd</artifactId>
  7. <version>3.1.0</version>
  8. </parent>
  9. <modelVersion>4.0.0</modelVersion>
  10. <artifactId>zd-auth</artifactId>
  11. <description>
  12. zd-auth认证授权中心
  13. </description>
  14. <dependencies>
  15. <!-- SpringCloud Alibaba Nacos -->
  16. <dependency>
  17. <groupId>com.alibaba.cloud</groupId>
  18. <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
  19. </dependency>
  20. <!-- SpringCloud Alibaba Nacos Config -->
  21. <dependency>
  22. <groupId>com.alibaba.cloud</groupId>
  23. <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
  24. </dependency>
  25. <!-- zd Common Swagger -->
  26. <dependency>
  27. <groupId>com.zd</groupId>
  28. <artifactId>zd-common-swagger</artifactId>
  29. </dependency>
  30. <!-- SpringCloud Alibaba Sentinel -->
  31. <dependency>
  32. <groupId>com.alibaba.cloud</groupId>
  33. <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
  34. </dependency>
  35. <!-- SpringBoot Web -->
  36. <dependency>
  37. <groupId>org.springframework.boot</groupId>
  38. <artifactId>spring-boot-starter-web</artifactId>
  39. </dependency>
  40. <!-- SpringBoot Actuator -->
  41. <dependency>
  42. <groupId>org.springframework.boot</groupId>
  43. <artifactId>spring-boot-starter-actuator</artifactId>
  44. </dependency>
  45. <!-- zd Common Security-->
  46. <dependency>
  47. <groupId>com.zd</groupId>
  48. <artifactId>zd-common-security</artifactId>
  49. </dependency>
  50. </dependencies>
  51. <build>
  52. <finalName>${project.artifactId}</finalName>
  53. <plugins>
  54. <plugin>
  55. <groupId>org.springframework.boot</groupId>
  56. <artifactId>spring-boot-maven-plugin</artifactId>
  57. <executions>
  58. <execution>
  59. <goals>
  60. <goal>repackage</goal>
  61. </goals>
  62. </execution>
  63. </executions>
  64. </plugin>
  65. <!-- 打包时跳过test插件,不运行test测试用例 -->
  66. <plugin>
  67. <groupId>org.apache.maven.plugins</groupId>
  68. <artifactId>maven-surefire-plugin</artifactId>
  69. <version>${maven-surefire-plugin.version}</version>
  70. <configuration>
  71. <skipTests>true</skipTests>
  72. </configuration>
  73. </plugin>
  74. <!-- docker的maven插件 -->
  75. <plugin>
  76. <groupId>com.spotify</groupId>
  77. <artifactId>dockerfile-maven-plugin</artifactId>
  78. <version>${docker.maven.verion}</version>
  79. <executions>
  80. <!--执行 mvn package 时 自动构建docker镜像并推送到仓库 -->
  81. <execution>
  82. <id>default</id>
  83. <phase>package</phase>
  84. <goals>
  85. <goal>build</goal>
  86. <goal>push</goal>
  87. </goals>
  88. </execution>
  89. </executions>
  90. <configuration>
  91. <repository>${docker.registry}/${docker.namespace}/${project.artifactId}</repository>
  92. <tag>latest</tag>
  93. <!-- 镜像服务器账号密码 -->
  94. <username>admin</username>
  95. <password>zd123456..</password>
  96. <!-- 构建参数,指定jar包名称 -->
  97. <buildArgs>
  98. <JAR_FILE>${project.artifactId}.jar</JAR_FILE>
  99. </buildArgs>
  100. </configuration>
  101. </plugin>
  102. </plugins>
  103. </build>
  104. </project>