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

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