springboot打jar包分离lib

ゞ 浴缸里的玫瑰 2022-01-31 12:07 452阅读 0赞

pom.xml


  1. <plugins>
  2. <plugin>
  3. <groupId>org.springframework.boot</groupId>
  4. <artifactId>spring-boot-maven-plugin</artifactId>
  5. <!--在这里添加 springloader plugin,热部署 -->
  6. <configuration>
  7. <layout>ZIP</layout>
  8. <includes>
  9. <include>
  10. <groupId>cn.jstars</groupId>
  11. <artifactId>datatocloud</artifactId>
  12. </include>
  13. </includes>
  14. </configuration>
  15. <dependencies>
  16. <dependency>
  17. <groupId>org.springframework</groupId>
  18. <artifactId>springloaded</artifactId>
  19. <version>1.2.4.RELEASE</version>
  20. </dependency>
  21. </dependencies>
  22. </plugin>
  23. <plugin>
  24. <groupId>org.apache.maven.plugins</groupId>
  25. <artifactId>maven-dependency-plugin</artifactId>
  26. <executions>
  27. <execution>
  28. <id>copy-dependencies</id>
  29. <phase>package</phase>
  30. <goals>
  31. <goal>copy-dependencies</goal>
  32. </goals>
  33. <configuration>
  34. <outputDirectory>target/lib</outputDirectory>
  35. <excludeTransitive>false</excludeTransitive>
  36. <stripVersion>false</stripVersion>
  37. <includeScope>runtime</includeScope>
  38. </configuration>
  39. </execution>
  40. </executions>
  41. </plugin>
  42. <plugin>
  43. <groupId>org.apache.maven.plugins</groupId>
  44. <artifactId>maven-resources-plugin</artifactId>
  45. <configuration>
  46. <encoding>UTF-8</encoding>
  47. </configuration>
  48. </plugin>
  49. <plugin>
  50. <groupId>org.apache.maven.plugins</groupId>
  51. <artifactId>maven-surefire-plugin</artifactId>
  52. <configuration>
  53. <skip>true</skip>
  54. </configuration>
  55. </plugin>
  56. </plugins>

发表评论

表情:
评论列表 (有 0 条评论,452人围观)

还没有评论,来说两句吧...

相关阅读