多租户商城-后台
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.

229 lines
6.4 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-app</artifactId>
  7. <version>2.0</version>
  8. <name>cereshop-app</name>
  9. <description>App 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. <!-- redis分布式锁框架 -->
  29. <dependency>
  30. <groupId>org.redisson</groupId>
  31. <artifactId>redisson</artifactId>
  32. </dependency>
  33. <dependency>
  34. <groupId>org.apache.commons</groupId>
  35. <artifactId>commons-pool2</artifactId>
  36. </dependency>
  37. <!--aliyunOSS-->
  38. <dependency>
  39. <groupId>com.aliyun.oss</groupId>
  40. <artifactId>aliyun-sdk-oss</artifactId>
  41. </dependency>
  42. <!--阿里短信服务-->
  43. <dependency>
  44. <groupId>com.aliyun</groupId>
  45. <artifactId>aliyun-java-sdk-core</artifactId>
  46. </dependency>
  47. <dependency>
  48. <groupId>com.aliyun</groupId>
  49. <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
  50. </dependency>
  51. <dependency>
  52. <groupId>com.shop</groupId>
  53. <artifactId>cereshop-commons</artifactId>
  54. <version>2.0</version>
  55. </dependency>
  56. <dependency>
  57. <groupId>org.bouncycastle</groupId>
  58. <artifactId>bcprov-jdk16</artifactId>
  59. <version>1.46</version>
  60. </dependency>
  61. <!--<dependency>
  62. <groupId>com.baomidou</groupId>
  63. <artifactId>mybatis-plus-boot-starter</artifactId>
  64. </dependency>-->
  65. <dependency>
  66. <groupId>com.github.gotson</groupId>
  67. <artifactId>webp-imageio</artifactId>
  68. <version>0.2.1</version>
  69. </dependency>
  70. </dependencies>
  71. <profiles>
  72. <profile>
  73. <id>app-prod</id>
  74. <properties>
  75. <package.environment>app-prod</package.environment>
  76. </properties>
  77. <build>
  78. <resources>
  79. <resource>
  80. <directory>src/main/resources</directory>
  81. <!-- 资源根目录排除各环境的配置,使用单独的资源目录来指定 -->
  82. <includes>
  83. <include>static/**</include>
  84. <include>mybatis/**</include>
  85. <include>cert/**</include>
  86. <include>service/**</include>
  87. </includes>
  88. <!-- 是否替换资源中的属性 -->
  89. <filtering>true</filtering>
  90. </resource>
  91. </resources>
  92. </build>
  93. </profile>
  94. <profile>
  95. <id>app-dev</id>
  96. <activation>
  97. <activeByDefault>true</activeByDefault>
  98. </activation>
  99. <properties>
  100. <package.environment>app-dev</package.environment>
  101. </properties>
  102. <build>
  103. <resources>
  104. <resource>
  105. <directory>src/main/resources</directory>
  106. <!-- 资源根目录排除各环境的配置,使用单独的资源目录来指定 -->
  107. <includes>
  108. <include>static/**</include>
  109. <include>mybatis/**</include>
  110. <include>service/**</include>
  111. <include>cert/**</include>
  112. <include>**/*.xml</include>
  113. <include>**/*.yml</include>
  114. </includes>
  115. <!-- 是否替换资源中的属性 -->
  116. <filtering>true</filtering>
  117. </resource>
  118. </resources>
  119. </build>
  120. </profile>
  121. </profiles>
  122. <build>
  123. <finalName>${project.artifactId}</finalName>
  124. <plugins>
  125. <!-- 设置编译版本 -->
  126. <plugin>
  127. <groupId>org.apache.maven.plugins</groupId>
  128. <artifactId>maven-compiler-plugin</artifactId>
  129. <configuration>
  130. <source>1.8</source>
  131. <target>1.8</target>
  132. <encoding>UTF-8</encoding>
  133. </configuration>
  134. </plugin>
  135. <!-- 打包jar文件时,配置manifest文件,加入lib包的jar依赖 -->
  136. <plugin>
  137. <groupId>org.apache.maven.plugins</groupId>
  138. <artifactId>maven-jar-plugin</artifactId>
  139. <configuration>
  140. <archive>
  141. <!-- 清单文件 -->
  142. <manifest>
  143. <mainClass>com.shop.cereshop.app.CereshopAppApplication</mainClass>
  144. <!-- 打包时 MANIFEST.MF文件不记录的时间戳版本 父工程开发版本需要加,不然依赖的父工程jar引用不了-->
  145. <useUniqueVersions>false</useUniqueVersions>
  146. <addClasspath>true</addClasspath>
  147. <classpathPrefix>lib/</classpathPrefix>
  148. </manifest>
  149. <!-- 给清单文件添加键值对(配置文件外置) -->
  150. <manifestEntries>
  151. <Class-Path>config/</Class-Path>
  152. </manifestEntries>
  153. </archive>
  154. <classesDirectory>
  155. </classesDirectory>
  156. </configuration>
  157. </plugin>
  158. <!-- 拷贝依赖的jar包到lib目录 -->
  159. <plugin>
  160. <groupId>org.apache.maven.plugins</groupId>
  161. <artifactId>maven-dependency-plugin</artifactId>
  162. <executions>
  163. <execution>
  164. <id>copy</id>
  165. <phase>package</phase>
  166. <goals>
  167. <goal>copy-dependencies</goal>
  168. </goals>
  169. <configuration>
  170. <outputDirectory>
  171. ${project.build.directory}/lib
  172. </outputDirectory>
  173. </configuration>
  174. </execution>
  175. </executions>
  176. </plugin>
  177. <!-- 解决资源文件的编码问题 -->
  178. <plugin>
  179. <groupId>org.apache.maven.plugins</groupId>
  180. <artifactId>maven-resources-plugin</artifactId>
  181. <configuration>
  182. <encoding>UTF-8</encoding>
  183. <!-- 过滤后缀文件 -->
  184. <nonFilteredFileExtensions>
  185. <nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
  186. <nonFilteredFileExtension>xls</nonFilteredFileExtension>
  187. <nonFilteredFileExtension>p12</nonFilteredFileExtension>
  188. </nonFilteredFileExtensions>
  189. </configuration>
  190. </plugin>
  191. <!-- 打包source文件为zip文件 -->
  192. <plugin>
  193. <groupId>org.apache.maven.plugins</groupId>
  194. <artifactId>maven-assembly-plugin</artifactId>
  195. <configuration>
  196. <descriptors>
  197. <descriptor>src/main/assembly/assembly.xml</descriptor>
  198. </descriptors>
  199. </configuration>
  200. <executions>
  201. <execution>
  202. <id>make-assembly</id>
  203. <phase>package</phase>
  204. <goals>
  205. <goal>single</goal>
  206. </goals>
  207. </execution>
  208. </executions>
  209. </plugin>
  210. </plugins>
  211. </build>
  212. </project>