pom.xml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. <parent>
  6. <groupId>org.springframework.boot</groupId>
  7. <artifactId>spring-boot-starter-parent</artifactId>
  8. <version>2.2.6.RELEASE</version>
  9. <relativePath/>
  10. </parent>
  11. <groupId>info.aspirecn.cloud.yysj</groupId>
  12. <artifactId>cloud-yysj-admin-k8s</artifactId>
  13. <version>1.0.0</version>
  14. <name>cloud-yysj-admin-k8s</name>
  15. <description>springboot admin application</description>
  16. <properties>
  17. <java.version>1.8</java.version>
  18. </properties>
  19. <dependencies>
  20. <!--web-->
  21. <dependency>
  22. <groupId>org.springframework.boot</groupId>
  23. <artifactId>spring-boot-starter-web</artifactId>
  24. </dependency>
  25. <!--SpringBoot Admin-->
  26. <dependency>
  27. <groupId>de.codecentric</groupId>
  28. <artifactId>spring-boot-admin-starter-server</artifactId>
  29. <version>2.2.2</version>
  30. </dependency>
  31. <!--SpringCloud Kubernetes-->
  32. <dependency>
  33. <groupId>org.springframework.cloud</groupId>
  34. <artifactId>spring-cloud-kubernetes-discovery</artifactId>
  35. <version>1.1.1.RELEASE</version>
  36. </dependency>
  37. </dependencies>
  38. <build>
  39. <plugins>
  40. <!--设置应用 Main 参数启动依赖查找的地址指向外部 lib 文件夹-->
  41. <plugin>
  42. <groupId>org.apache.maven.plugins</groupId>
  43. <artifactId>maven-jar-plugin</artifactId>
  44. <configuration>
  45. <archive>
  46. <manifest>
  47. <addClasspath>true</addClasspath>
  48. <classpathPrefix>lib/</classpathPrefix>
  49. </manifest>
  50. </archive>
  51. </configuration>
  52. </plugin>
  53. <!--设置 SpringBoot 打包插件不包含任何 Jar 依赖包-->
  54. <plugin>
  55. <groupId>org.springframework.boot</groupId>
  56. <artifactId>spring-boot-maven-plugin</artifactId>
  57. <configuration>
  58. <includes>
  59. <include>
  60. <groupId>nothing</groupId>
  61. <artifactId>nothing</artifactId>
  62. </include>
  63. </includes>
  64. </configuration>
  65. </plugin>
  66. <!--设置将 lib 拷贝到应用 Jar 外面-->
  67. <plugin>
  68. <groupId>org.apache.maven.plugins</groupId>
  69. <artifactId>maven-dependency-plugin</artifactId>
  70. <executions>
  71. <execution>
  72. <id>copy-dependencies</id>
  73. <phase>prepare-package</phase>
  74. <goals>
  75. <goal>copy-dependencies</goal>
  76. </goals>
  77. <configuration>
  78. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  79. </configuration>
  80. </execution>
  81. </executions>
  82. </plugin>
  83. </plugins>
  84. </build>
  85. </project>