pom.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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>mybatis-plus-samples</artifactId>
  7. <groupId>com.baomidou</groupId>
  8. <version>0.0.1-SNAPSHOT</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <artifactId>mybatis-plus-sample-assembly</artifactId>
  12. <dependencies>
  13. <dependency>
  14. <groupId>org.springframework.boot</groupId>
  15. <artifactId>spring-boot-starter</artifactId>
  16. </dependency>
  17. <dependency>
  18. <groupId>org.springframework.boot</groupId>
  19. <artifactId>spring-boot-starter-web</artifactId>
  20. </dependency>
  21. <dependency>
  22. <groupId>com.h2database</groupId>
  23. <artifactId>h2</artifactId>
  24. <scope>runtime</scope>
  25. </dependency>
  26. <dependency>
  27. <groupId>com.baomidou</groupId>
  28. <artifactId>${mybatisplus.artifactId}</artifactId>
  29. </dependency>
  30. </dependencies>
  31. <build>
  32. <plugins>
  33. <plugin>
  34. <groupId>org.apache.maven.plugins</groupId>
  35. <artifactId>maven-jar-plugin</artifactId>
  36. <version>3.4.2</version>
  37. <configuration>
  38. <excludes>
  39. <exclude>*.**</exclude>
  40. <exclude>*/*.xml</exclude>
  41. </excludes>
  42. <archive>
  43. <manifest>
  44. <addClasspath>true</addClasspath>
  45. <classpathPrefix>lib/</classpathPrefix>
  46. <useUniqueVersions>false</useUniqueVersions>
  47. <mainClass>com.baomidou.mybatisplus.samples.assembly.AssemblyApplication</mainClass>
  48. </manifest>
  49. <manifestEntries>
  50. <Class-Path>./resources/</Class-Path>
  51. </manifestEntries>
  52. </archive>
  53. <outputDirectory>${project.build.directory}</outputDirectory>
  54. </configuration>
  55. </plugin>
  56. <plugin>
  57. <groupId>org.apache.maven.plugins</groupId>
  58. <artifactId>maven-dependency-plugin</artifactId>
  59. <executions>
  60. <execution>
  61. <id>copy-dependencies</id>
  62. <phase>package</phase>
  63. <goals>
  64. <goal>copy-dependencies</goal>
  65. </goals>
  66. <configuration>
  67. <outputDirectory>
  68. ${project.build.directory}/lib/
  69. </outputDirectory>
  70. </configuration>
  71. </execution>
  72. </executions>
  73. </plugin>
  74. <plugin>
  75. <artifactId>maven-resources-plugin</artifactId>
  76. <version>3.3.1</version>
  77. <executions>
  78. <execution>
  79. <id>copy-resources</id>
  80. <phase>package</phase>
  81. <goals>
  82. <goal>copy-resources</goal>
  83. </goals>
  84. <configuration>
  85. <resources>
  86. <resource>
  87. <directory>src/main/resources</directory>
  88. </resource>
  89. </resources>
  90. <outputDirectory>${project.build.directory}/resources</outputDirectory>
  91. </configuration>
  92. </execution>
  93. </executions>
  94. </plugin>
  95. <!-- 3.3.2版本以下不支持spring-boot-maven-plugin打包,需要注释此插件
  96. <plugin>
  97. <groupId>org.springframework.boot</groupId>
  98. <artifactId>spring-boot-maven-plugin</artifactId>
  99. <configuration>
  100. <includes>
  101. <include>
  102. <groupId>null</groupId>
  103. <artifactId>null</artifactId>
  104. </include>
  105. </includes>
  106. <layout>ZIP</layout>
  107. <addResources>true</addResources>
  108. <outputDirectory>${project.build.directory}</outputDirectory>
  109. </configuration>
  110. <executions>
  111. <execution>
  112. <goals>
  113. <goal>repackage</goal>
  114. </goals>
  115. </execution>
  116. </executions>
  117. </plugin>
  118. -->
  119. </plugins>
  120. </build>
  121. </project>