多租户商城-后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

224 lines
6.3 KiB

2 years ago
  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. <groupId>com.shop</groupId>
  6. <artifactId>cereshop-admin</artifactId>
  7. <version>2.0</version>
  8. <name>cereshop-admin</name>
  9. <description>Admin project for Spring Boot</description>
  10. <packaging>jar</packaging>
  11. <parent>
  12. <groupId>com.shop</groupId>
  13. <artifactId>cereshop</artifactId>
  14. <version>2.0</version>
  15. </parent>
  16. <dependencies>
  17. <!-- Spring Boot Redis依赖 -->
  18. <!-- 注意:1.5版本的依赖和2.0的依赖不一样,注意看哦 1.5我记得名字里面应该没有“data”, 2.0必须是“spring-boot-starter-data-redis” 这个才行-->
  19. <dependency>
  20. <groupId>org.springframework.boot</groupId>
  21. <artifactId>spring-boot-starter-data-redis</artifactId>
  22. </dependency>
  23. <!-- 添加jedis客户端 -->
  24. <dependency>
  25. <groupId>redis.clients</groupId>
  26. <artifactId>jedis</artifactId>
  27. </dependency>
  28. <dependency>
  29. <groupId>org.apache.commons</groupId>
  30. <artifactId>commons-pool2</artifactId>
  31. </dependency>
  32. <!--aliyunOSS-->
  33. <dependency>
  34. <groupId>com.aliyun.oss</groupId>
  35. <artifactId>aliyun-sdk-oss</artifactId>
  36. </dependency>
  37. <!--阿里短信服务-->
  38. <dependency>
  39. <groupId>com.aliyun</groupId>
  40. <artifactId>aliyun-java-sdk-core</artifactId>
  41. </dependency>
  42. <dependency>
  43. <groupId>com.aliyun</groupId>
  44. <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
  45. </dependency>
  46. <dependency>
  47. <groupId>com.shop</groupId>
  48. <artifactId>cereshop-commons</artifactId>
  49. <version>2.0</version>
  50. </dependency>
  51. <dependency>
  52. <groupId>org.springframework.boot</groupId>
  53. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  54. </dependency>
  55. <dependency>
  56. <groupId>com.baomidou</groupId>
  57. <artifactId>mybatis-plus-core</artifactId>
  58. </dependency>
  59. <dependency>
  60. <groupId>com.baomidou</groupId>
  61. <artifactId>mybatis-plus-extension</artifactId>
  62. </dependency>
  63. </dependencies>
  64. <profiles>
  65. <profile>
  66. <id>admin-prod</id>
  67. <properties>
  68. <package.environment>admin-prod</package.environment>
  69. </properties>
  70. <build>
  71. <resources>
  72. <resource>
  73. <directory>src/main/resources</directory>
  74. <!-- 资源根目录排除各环境的配置,使用单独的资源目录来指定 -->
  75. <includes>
  76. <include>static/**</include>
  77. <include>mybatis/**</include>
  78. <include>service/**</include>
  79. <include>cert/**</include>
  80. </includes>
  81. <!-- 是否替换资源中的属性 -->
  82. <filtering>true</filtering>
  83. </resource>
  84. </resources>
  85. </build>
  86. </profile>
  87. <profile>
  88. <id>admin-dev</id>
  89. <activation>
  90. <activeByDefault>true</activeByDefault>
  91. </activation>
  92. <properties>
  93. <package.environment>admin-dev</package.environment>
  94. </properties>
  95. <build>
  96. <resources>
  97. <resource>
  98. <directory>src/main/resources</directory>
  99. <!-- 资源根目录排除各环境的配置,使用单独的资源目录来指定 -->
  100. <includes>
  101. <include>static/**</include>
  102. <include>mybatis/**</include>
  103. <include>service/**</include>
  104. <include>cert/**</include>
  105. <include>**/*.xml</include>
  106. <include>**/*.yml</include>
  107. <include>**/*.properties</include>
  108. </includes>
  109. <!-- 是否替换资源中的属性 -->
  110. <filtering>true</filtering>
  111. </resource>
  112. </resources>
  113. </build>
  114. </profile>
  115. </profiles>
  116. <build>
  117. <finalName>${project.artifactId}</finalName>
  118. <plugins>
  119. <!-- 设置编译版本 -->
  120. <plugin>
  121. <groupId>org.apache.maven.plugins</groupId>
  122. <artifactId>maven-compiler-plugin</artifactId>
  123. <configuration>
  124. <source>1.8</source>
  125. <target>1.8</target>
  126. <encoding>UTF-8</encoding>
  127. </configuration>
  128. </plugin>
  129. <!-- 打包jar文件时,配置manifest文件,加入lib包的jar依赖 -->
  130. <plugin>
  131. <groupId>org.apache.maven.plugins</groupId>
  132. <artifactId>maven-jar-plugin</artifactId>
  133. <configuration>
  134. <archive>
  135. <!-- 清单文件 -->
  136. <manifest>
  137. <mainClass>com.shop.cereshop.admin.CereshopAdminApplication</mainClass>
  138. <!-- 打包时 MANIFEST.MF文件不记录的时间戳版本 父工程开发版本需要加,不然依赖的父工程jar引用不了-->
  139. <useUniqueVersions>false</useUniqueVersions>
  140. <addClasspath>true</addClasspath>
  141. <classpathPrefix>lib/</classpathPrefix>
  142. </manifest>
  143. <!-- 给清单文件添加键值对(配置文件外置) -->
  144. <manifestEntries>
  145. <Class-Path>config/</Class-Path>
  146. </manifestEntries>
  147. </archive>
  148. <classesDirectory>
  149. </classesDirectory>
  150. </configuration>
  151. </plugin>
  152. <!-- 拷贝依赖的jar包到lib目录 -->
  153. <plugin>
  154. <groupId>org.apache.maven.plugins</groupId>
  155. <artifactId>maven-dependency-plugin</artifactId>
  156. <executions>
  157. <execution>
  158. <id>copy</id>
  159. <phase>package</phase>
  160. <goals>
  161. <goal>copy-dependencies</goal>
  162. </goals>
  163. <configuration>
  164. <outputDirectory>
  165. ${project.build.directory}/lib
  166. </outputDirectory>
  167. </configuration>
  168. </execution>
  169. </executions>
  170. </plugin>
  171. <!-- 解决资源文件的编码问题 -->
  172. <plugin>
  173. <groupId>org.apache.maven.plugins</groupId>
  174. <artifactId>maven-resources-plugin</artifactId>
  175. <configuration>
  176. <encoding>UTF-8</encoding>
  177. <!-- 过滤后缀文件 -->
  178. <nonFilteredFileExtensions>
  179. <nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
  180. <nonFilteredFileExtension>xls</nonFilteredFileExtension>
  181. <nonFilteredFileExtension>p12</nonFilteredFileExtension>
  182. </nonFilteredFileExtensions>
  183. </configuration>
  184. </plugin>
  185. <!-- 打包source文件为zip文件 -->
  186. <plugin>
  187. <groupId>org.apache.maven.plugins</groupId>
  188. <artifactId>maven-assembly-plugin</artifactId>
  189. <configuration>
  190. <descriptors>
  191. <descriptor>src/main/assembly/assembly.xml</descriptor>
  192. </descriptors>
  193. </configuration>
  194. <executions>
  195. <execution>
  196. <id>make-assembly</id>
  197. <phase>package</phase>
  198. <goals>
  199. <goal>single</goal>
  200. </goals>
  201. </execution>
  202. </executions>
  203. </plugin>
  204. </plugins>
  205. </build>
  206. </project>