pom.xml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <parent>
  6. <artifactId>fs</artifactId>
  7. <groupId>com.fs</groupId>
  8. <version>1.1.0</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <artifactId>fs-api</artifactId>
  12. <properties>
  13. <maven.compiler.source>8</maven.compiler.source>
  14. <maven.compiler.target>8</maven.compiler.target>
  15. </properties>
  16. <dependencies>
  17. <!-- spring-boot-devtools -->
  18. <dependency>
  19. <groupId>org.springframework.boot</groupId>
  20. <artifactId>spring-boot-devtools</artifactId>
  21. <optional>true</optional> <!-- 表示依赖不会传递 -->
  22. </dependency>
  23. <!-- swagger2-->
  24. <dependency>
  25. <groupId>io.springfox</groupId>
  26. <artifactId>springfox-swagger2</artifactId>
  27. </dependency>
  28. <!-- swagger2-UI-->
  29. <dependency>
  30. <groupId>io.springfox</groupId>
  31. <artifactId>springfox-swagger-ui</artifactId>
  32. </dependency>
  33. <dependency>
  34. <groupId>com.github.xiaoymin</groupId>
  35. <artifactId>swagger-bootstrap-ui</artifactId>
  36. <version>1.9.3</version>
  37. </dependency>
  38. <!-- Mysql驱动包 -->
  39. <dependency>
  40. <groupId>mysql</groupId>
  41. <artifactId>mysql-connector-java</artifactId>
  42. </dependency>
  43. <!-- SpringBoot Web容器 -->
  44. <dependency>
  45. <groupId>org.springframework.boot</groupId>
  46. <artifactId>spring-boot-starter-web</artifactId>
  47. </dependency>
  48. <!-- SpringBoot 拦截器 -->
  49. <dependency>
  50. <groupId>org.springframework.boot</groupId>
  51. <artifactId>spring-boot-starter-aop</artifactId>
  52. </dependency>
  53. <!-- 阿里数据库连接池 -->
  54. <dependency>
  55. <groupId>com.alibaba</groupId>
  56. <artifactId>druid-spring-boot-starter</artifactId>
  57. </dependency>
  58. <!-- 验证码 -->
  59. <dependency>
  60. <groupId>com.github.penggle</groupId>
  61. <artifactId>kaptcha</artifactId>
  62. <exclusions>
  63. <exclusion>
  64. <artifactId>javax.servlet-api</artifactId>
  65. <groupId>javax.servlet</groupId>
  66. </exclusion>
  67. </exclusions>
  68. </dependency>
  69. <!-- 系统模块-->
  70. <dependency>
  71. <groupId>com.fs</groupId>
  72. <artifactId>fs-service-system</artifactId>
  73. </dependency>
  74. <dependency>
  75. <groupId>org.springframework.boot</groupId>
  76. <artifactId>spring-boot-starter-security</artifactId>
  77. </dependency>
  78. </dependencies>
  79. <build>
  80. <plugins>
  81. <plugin>
  82. <groupId>org.springframework.boot</groupId>
  83. <artifactId>spring-boot-maven-plugin</artifactId>
  84. <version>2.1.1.RELEASE</version>
  85. <configuration>
  86. <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
  87. </configuration>
  88. <executions>
  89. <execution>
  90. <goals>
  91. <goal>repackage</goal>
  92. </goals>
  93. </execution>
  94. </executions>
  95. </plugin>
  96. <plugin>
  97. <groupId>org.apache.maven.plugins</groupId>
  98. <artifactId>maven-war-plugin</artifactId>
  99. <version>3.1.0</version>
  100. <configuration>
  101. <failOnMissingWebXml>false</failOnMissingWebXml>
  102. <warName>${project.artifactId}</warName>
  103. </configuration>
  104. </plugin>
  105. <plugin>
  106. <groupId>com.spotify</groupId>
  107. <artifactId>docker-maven-plugin</artifactId>
  108. <version>1.0.0</version>
  109. <configuration>
  110. <imageName>${project.artifactId}:${project.version}</imageName>
  111. <baseImage>kdvolder/jdk8</baseImage>
  112. <maintainer>docker_maven docker_maven@email.com</maintainer>
  113. <workdir>/</workdir>
  114. <cmd>["java", "-version"]</cmd>
  115. <entryPoint>["java", "-jar", "${project.build.finalName}.jar"]</entryPoint>
  116. <!-- 这里是复制 jar 包到 docker 容器指定目录配置 -->
  117. <resources>
  118. <resource>
  119. <targetPath>/</targetPath>
  120. <directory>${project.build.directory}</directory>
  121. <include>${project.build.finalName}.jar</include>
  122. </resource>
  123. </resources>
  124. <dockerHost>http://8.140.143.122:2375</dockerHost>
  125. </configuration>
  126. </plugin>
  127. </plugins>
  128. <finalName>${project.artifactId}</finalName>
  129. </build>
  130. </project>