pom.xml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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. <groupId>com.welampiot</groupId>
  7. <artifactId>CIS</artifactId>
  8. <version>1.0-SNAPSHOT</version>
  9. <properties>
  10. <maven.compiler.source>8</maven.compiler.source>
  11. <maven.compiler.target>8</maven.compiler.target>
  12. <log4j2.version>2.13.3</log4j2.version>
  13. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  14. </properties>
  15. <!-- 导入springboot版本和框架依赖 -->
  16. <parent>
  17. <groupId>org.springframework.boot</groupId>
  18. <artifactId>spring-boot-starter-parent</artifactId>
  19. <version>2.5.1</version>
  20. <relativePath></relativePath>
  21. </parent>
  22. <dependencies>
  23. <dependency>
  24. <groupId>org.springframework.boot</groupId>
  25. <artifactId>spring-boot-starter-web</artifactId>
  26. </dependency>
  27. <dependency>
  28. <groupId>mysql</groupId>
  29. <artifactId>mysql-connector-java</artifactId>
  30. </dependency>
  31. <dependency>
  32. <groupId>org.mybatis.spring.boot</groupId>
  33. <artifactId>mybatis-spring-boot-starter</artifactId>
  34. <version>2.2.2</version>
  35. </dependency>
  36. <dependency>
  37. <groupId>com.alibaba</groupId>
  38. <artifactId>druid</artifactId>
  39. <version>1.2.3</version>
  40. </dependency>
  41. <dependency>
  42. <groupId>com.alibaba</groupId>
  43. <artifactId>druid-spring-boot-starter</artifactId>
  44. <version>1.1.20</version>
  45. </dependency>
  46. <dependency>
  47. <groupId>org.apache.commons</groupId>
  48. <artifactId>commons-lang3</artifactId>
  49. <version>3.9</version>
  50. </dependency>
  51. <dependency>
  52. <groupId>org.projectlombok</groupId>
  53. <artifactId>lombok</artifactId>
  54. </dependency>
  55. <dependency>
  56. <groupId>junit</groupId>
  57. <artifactId>junit</artifactId>
  58. <scope>test</scope>
  59. </dependency>
  60. <dependency>
  61. <groupId>org.springframework.boot</groupId>
  62. <artifactId>spring-boot-starter-test</artifactId>
  63. <scope>test</scope>
  64. <exclusions>
  65. <exclusion>
  66. <groupId>org.junit.vintage</groupId>
  67. <artifactId>junit-vintage-engine</artifactId>
  68. </exclusion>
  69. </exclusions>
  70. </dependency>
  71. <dependency>
  72. <groupId>org.springframework.boot</groupId>
  73. <artifactId>spring-boot-starter-security</artifactId>
  74. </dependency>
  75. <dependency>
  76. <groupId>org.springframework.security</groupId>
  77. <artifactId>spring-security-config</artifactId>
  78. </dependency>
  79. <dependency>
  80. <groupId>org.springframework.boot</groupId>
  81. <artifactId>spring-boot-starter-validation</artifactId>
  82. </dependency>
  83. <dependency>
  84. <groupId>commons-codec</groupId>
  85. <artifactId>commons-codec</artifactId>
  86. <version>1.14</version>
  87. </dependency>
  88. <dependency>
  89. <groupId>be.c4j.ee.security.octopus</groupId>
  90. <artifactId>authentication</artifactId>
  91. <version>0.9.7.2</version>
  92. <type>pom</type>
  93. </dependency>
  94. <dependency>
  95. <groupId>com.alibaba</groupId>
  96. <artifactId>fastjson</artifactId>
  97. <version>1.2.33</version>
  98. </dependency>
  99. </dependencies>
  100. <repositories> <!-- 配置阿里云镜像仓库 -->
  101. <repository>
  102. <id>nexus-aliyun</id>
  103. <name>nexus-aliyun</name>
  104. <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  105. <releases>
  106. <enabled>true</enabled>
  107. </releases>
  108. <snapshots>
  109. <enabled>false</enabled>
  110. </snapshots>
  111. </repository>
  112. </repositories>
  113. <!-- maven多环境打包配置 -->
  114. <profiles>
  115. <!-- 测试环境 -->
  116. <profile>
  117. <id>test</id>
  118. <properties>
  119. <profiles.active>test</profiles.active>
  120. </properties>
  121. <!-- 设置为默认环境 -->
  122. <activation>
  123. <activeByDefault>true</activeByDefault>
  124. </activation>
  125. </profile>
  126. <!-- 生产环境 -->
  127. <profile>
  128. <id>prod</id>
  129. <properties>
  130. <profiles.active>prod</profiles.active>
  131. </properties>
  132. </profile>
  133. </profiles>
  134. <!--添加maven插件,项目的打包工具,打成jar包,否则在打包运行时报错 -->
  135. <build>
  136. <!-- 打包名格式:项目名-环境.jar -->
  137. <finalName>${project.artifactId}-${profiles.active}</finalName>
  138. <sourceDirectory>src/main/java</sourceDirectory>
  139. <testSourceDirectory>src/test/java</testSourceDirectory>
  140. <resources>
  141. <resource>
  142. <directory>src/main/resources</directory>
  143. <excludes>
  144. <exclude>test/*</exclude>
  145. <exclude>prod/*</exclude>
  146. </excludes>
  147. </resource>
  148. <resource>
  149. <directory>src/main/resources/${profiles.active}</directory>
  150. <filtering>true</filtering>
  151. <includes>
  152. <include>*.yml</include>
  153. <include>*.xml</include>
  154. </includes>
  155. </resource>
  156. </resources>
  157. <plugins>
  158. <plugin>
  159. <groupId>org.springframework.boot</groupId>
  160. <artifactId>spring-boot-maven-plugin</artifactId>
  161. <version>2.2.2.RELEASE</version>
  162. <configuration>
  163. <mainClass>com.welampiot.ServerApplication</mainClass>
  164. <layout>JAR</layout>
  165. </configuration>
  166. <executions>
  167. <execution>
  168. <goals>
  169. <goal>repackage</goal>
  170. </goals>
  171. <configuration>
  172. <attach>false</attach>
  173. </configuration>
  174. </execution>
  175. </executions>
  176. </plugin>
  177. <!-- maven 打包时跳过测试 -->
  178. <plugin>
  179. <groupId>org.apache.maven.plugins</groupId>
  180. <artifactId>maven-surefire-plugin</artifactId>
  181. <configuration>
  182. <skipTests>true</skipTests>
  183. </configuration>
  184. </plugin>
  185. </plugins>
  186. </build>
  187. </project>