pom.xml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. <modelVersion>4.0.0</modelVersion>
  6. <parent>
  7. <groupId>com.haha</groupId>
  8. <artifactId>haha-parent</artifactId>
  9. <version>0.0.1-SNAPSHOT</version>
  10. <relativePath>../pom.xml</relativePath>
  11. </parent>
  12. <artifactId>haha-admin</artifactId>
  13. <name>haha-admin</name>
  14. <description>运营平台后端</description>
  15. <dependencies>
  16. <dependency>
  17. <groupId>org.springframework.boot</groupId>
  18. <artifactId>spring-boot-starter-actuator</artifactId>
  19. </dependency>
  20. <!-- 依赖Service模块 -->
  21. <dependency>
  22. <groupId>com.haha</groupId>
  23. <artifactId>haha-service</artifactId>
  24. </dependency>
  25. <!-- Spring Boot 核心依赖 -->
  26. <dependency>
  27. <groupId>org.springframework.boot</groupId>
  28. <artifactId>spring-boot-starter-web</artifactId>
  29. </dependency>
  30. <dependency>
  31. <groupId>org.springframework.boot</groupId>
  32. <artifactId>spring-boot-starter-test</artifactId>
  33. <scope>test</scope>
  34. </dependency>
  35. <!-- 数据库相关 -->
  36. <dependency>
  37. <groupId>org.springframework.boot</groupId>
  38. <artifactId>spring-boot-starter-jdbc</artifactId>
  39. </dependency>
  40. <dependency>
  41. <groupId>com.mysql</groupId>
  42. <artifactId>mysql-connector-j</artifactId>
  43. </dependency>
  44. <!-- Redis 依赖 -->
  45. <dependency>
  46. <groupId>org.springframework.boot</groupId>
  47. <artifactId>spring-boot-starter-data-redis</artifactId>
  48. </dependency>
  49. <!-- Sa-Token 认证框架 -->
  50. <dependency>
  51. <groupId>cn.dev33</groupId>
  52. <artifactId>sa-token-spring-boot3-starter</artifactId>
  53. </dependency>
  54. <!-- Sa-Token 整合 Redis(使用 jackson 序列化) -->
  55. <dependency>
  56. <groupId>cn.dev33</groupId>
  57. <artifactId>sa-token-redis-jackson</artifactId>
  58. </dependency>
  59. <!-- 提供 Redis 连接池 -->
  60. <dependency>
  61. <groupId>org.apache.commons</groupId>
  62. <artifactId>commons-pool2</artifactId>
  63. </dependency>
  64. <!-- AspectJ AOP -->
  65. <dependency>
  66. <groupId>org.aspectj</groupId>
  67. <artifactId>aspectjweaver</artifactId>
  68. </dependency>
  69. </dependencies>
  70. <build>
  71. <plugins>
  72. <plugin>
  73. <groupId>org.springframework.boot</groupId>
  74. <artifactId>spring-boot-maven-plugin</artifactId>
  75. <configuration>
  76. <mainClass>com.haha.admin.AdminApplication</mainClass>
  77. <excludes>
  78. <exclude>
  79. <groupId>org.projectlombok</groupId>
  80. <artifactId>lombok</artifactId>
  81. </exclude>
  82. </excludes>
  83. </configuration>
  84. <executions>
  85. <execution>
  86. <goals>
  87. <goal>repackage</goal>
  88. </goals>
  89. </execution>
  90. </executions>
  91. </plugin>
  92. <plugin>
  93. <groupId>com.github.eirslett</groupId>
  94. <artifactId>frontend-maven-plugin</artifactId>
  95. <version>1.15.0</version>
  96. <configuration>
  97. <workingDirectory>${project.basedir}/../haha-admin-web</workingDirectory>
  98. <installDirectory>${project.build.directory}</installDirectory>
  99. </configuration>
  100. <executions>
  101. <execution>
  102. <id>install node and pnpm</id>
  103. <goals>
  104. <goal>install-node-and-pnpm</goal>
  105. </goals>
  106. <configuration>
  107. <nodeVersion>v20.19.0</nodeVersion>
  108. <pnpmVersion>v9.0.0</pnpmVersion>
  109. </configuration>
  110. </execution>
  111. <execution>
  112. <id>pnpm install</id>
  113. <goals>
  114. <goal>pnpm</goal>
  115. </goals>
  116. <configuration>
  117. <arguments>install</arguments>
  118. </configuration>
  119. </execution>
  120. <execution>
  121. <id>pnpm build</id>
  122. <goals>
  123. <goal>pnpm</goal>
  124. </goals>
  125. <phase>prepare-package</phase>
  126. <configuration>
  127. <arguments>run build</arguments>
  128. </configuration>
  129. </execution>
  130. </executions>
  131. </plugin>
  132. <plugin>
  133. <groupId>org.apache.maven.plugins</groupId>
  134. <artifactId>maven-resources-plugin</artifactId>
  135. <version>3.3.1</version>
  136. <executions>
  137. <execution>
  138. <id>copy-frontend-build</id>
  139. <phase>prepare-package</phase>
  140. <goals>
  141. <goal>copy-resources</goal>
  142. </goals>
  143. <configuration>
  144. <outputDirectory>${project.build.outputDirectory}/static</outputDirectory>
  145. <resources>
  146. <resource>
  147. <directory>${project.basedir}/../haha-admin-web/dist</directory>
  148. <includes>
  149. <include>**/*</include>
  150. </includes>
  151. </resource>
  152. </resources>
  153. </configuration>
  154. </execution>
  155. </executions>
  156. </plugin>
  157. </plugins>
  158. </build>
  159. </project>