pom.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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 https://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>3.1.1</version>
  9. <relativePath/> <!-- lookup parent from repository -->
  10. </parent>
  11. <groupId>com.example</groupId>
  12. <artifactId>test</artifactId>
  13. <version>0.0.1-SNAPSHOT</version>
  14. <name>test</name>
  15. <description>test</description>
  16. <url/>
  17. <licenses>
  18. <license/>
  19. </licenses>
  20. <developers>
  21. <developer/>
  22. </developers>
  23. <scm>
  24. <connection/>
  25. <developerConnection/>
  26. <tag/>
  27. <url/>
  28. </scm>
  29. <properties>
  30. <java.version>17</java.version>
  31. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  32. </properties>
  33. <dependencies>
  34. <dependency>
  35. <groupId>org.springframework.boot</groupId>
  36. <artifactId>spring-boot-starter</artifactId>
  37. </dependency>
  38. <dependency>
  39. <groupId>org.springframework.boot</groupId>
  40. <artifactId>spring-boot-starter-test</artifactId>
  41. <scope>test</scope>
  42. </dependency>
  43. <dependency>
  44. <groupId>org.springframework.boot</groupId>
  45. <artifactId>spring-boot-starter-web</artifactId>
  46. </dependency>
  47. <!-- Redis -->
  48. <dependency>
  49. <groupId>org.springframework.boot</groupId>
  50. <artifactId>spring-boot-starter-cache</artifactId>
  51. </dependency>
  52. <dependency>
  53. <groupId>org.springframework.boot</groupId>
  54. <artifactId>spring-boot-starter-data-redis</artifactId>
  55. </dependency>
  56. <dependency>
  57. <groupId>org.redisson</groupId>
  58. <artifactId>redisson</artifactId>
  59. <version>3.23.2</version>
  60. <exclusions>
  61. <exclusion>
  62. <groupId>org.slf4j</groupId>
  63. <artifactId>slf4j-simple</artifactId>
  64. </exclusion>
  65. </exclusions>
  66. </dependency>
  67. <dependency>
  68. <groupId>com.baomidou</groupId>
  69. <artifactId>mybatis-plus-boot-starter</artifactId>
  70. <version>3.5.3.2</version>
  71. </dependency>
  72. <dependency>
  73. <groupId>com.mysql</groupId>
  74. <artifactId>mysql-connector-j</artifactId>
  75. <scope>runtime</scope>
  76. </dependency>
  77. <!-- lombok -->
  78. <dependency>
  79. <groupId>org.projectlombok</groupId>
  80. <artifactId>lombok</artifactId>
  81. <optional>true</optional>
  82. </dependency>
  83. <dependency>
  84. <groupId>com.github.yulichang</groupId>
  85. <artifactId>mybatis-plus-join-boot-starter</artifactId>
  86. <version>1.5.3</version>
  87. </dependency>
  88. </dependencies>
  89. <profiles>
  90. <profile>
  91. <id>local</id>
  92. <properties>
  93. <profile.active>local</profile.active>
  94. <finalName>${project.artifactId}-local</finalName>
  95. </properties>
  96. <activation>
  97. <activeByDefault>true</activeByDefault>
  98. </activation>
  99. </profile>
  100. <profile>
  101. <id>prod</id>
  102. <properties>
  103. <profile.active>prod</profile.active>
  104. <finalName>${project.artifactId}</finalName>
  105. </properties>
  106. </profile>
  107. <profile>
  108. <id>dev</id>
  109. <properties>
  110. <profile.active>dev</profile.active>
  111. <finalName>${project.artifactId}-dev</finalName>
  112. </properties>
  113. </profile>
  114. </profiles>
  115. <build>
  116. <finalName>${finalName}</finalName>
  117. <plugins>
  118. <plugin>
  119. <groupId>org.apache.maven.plugins</groupId>
  120. <artifactId>maven-compiler-plugin</artifactId>
  121. <version>3.8.1</version>
  122. <configuration>
  123. <parameters>true</parameters>
  124. <source>${java.version}</source>
  125. <target>${java.version}</target>
  126. <encoding>${project.build.sourceEncoding}</encoding>
  127. <compilerArgs>
  128. <!-- <arg>-Xlint:deprecation</arg> -->
  129. <!-- <arg>-Xlint:unchecked</arg> -->
  130. </compilerArgs>
  131. </configuration>
  132. </plugin>
  133. <!-- 创建一个不包含依赖的jar包,称为瘦jar,新增依赖需要打开下面maven-dependency-plugin注释 -->
  134. <plugin>
  135. <groupId>org.springframework.boot</groupId>
  136. <artifactId>spring-boot-maven-plugin</artifactId>
  137. <version>3.5.6</version>
  138. <configuration>
  139. <mainClass>com.example.TestApplication</mainClass>
  140. <layout>ZIP</layout>
  141. <includes>
  142. <include>
  143. <groupId>nothing</groupId>
  144. <artifactId>nothing</artifactId>
  145. </include>
  146. </includes>
  147. </configuration>
  148. <executions>
  149. <execution>
  150. <goals>
  151. <goal>repackage</goal>
  152. </goals>
  153. </execution>
  154. </executions>
  155. </plugin>
  156. <!--将第三方依赖包拷贝到lib目录 (没有更新时注释)(第一次部署需要取消注释) -->
  157. <!-- <plugin>
  158. <groupId>org.apache.maven.plugins</groupId>
  159. <artifactId>maven-dependency-plugin</artifactId>
  160. <executions>
  161. <execution>
  162. <id>copy-dependencies</id>
  163. <phase>package</phase>
  164. <goals>
  165. <goal>copy-dependencies</goal>
  166. </goals>
  167. <configuration>
  168. <outputDirectory>${project.build.directory}/libs</outputDirectory>
  169. &lt;!&ndash;<outputDirectory>libs</outputDirectory>&ndash;&gt;
  170. </configuration>
  171. </execution>
  172. </executions>
  173. </plugin>-->
  174. </plugins>
  175. </build>
  176. <repositories>
  177. <repository>
  178. <id>public</id>
  179. <name>aliyun nexus</name>
  180. <url>https://maven.aliyun.com/repository/public</url>
  181. <releases>
  182. <enabled>true</enabled>
  183. </releases>
  184. </repository>
  185. </repositories>
  186. </project>