pom.xml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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. <!-- mqtt-->
  100. <dependency>
  101. <groupId>org.springframework.integration</groupId>
  102. <artifactId>spring-integration-mqtt</artifactId>
  103. </dependency>
  104. <dependency>
  105. <groupId>org.springframework.social</groupId>
  106. <artifactId>spring-social-web</artifactId>
  107. <version>1.1.6.RELEASE</version>
  108. </dependency>
  109. </dependencies>
  110. <repositories> <!-- 配置阿里云镜像仓库 -->
  111. <repository>
  112. <id>nexus-aliyun</id>
  113. <name>nexus-aliyun</name>
  114. <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  115. <releases>
  116. <enabled>true</enabled>
  117. </releases>
  118. <snapshots>
  119. <enabled>false</enabled>
  120. </snapshots>
  121. </repository>
  122. </repositories>
  123. <!-- maven多环境打包配置 -->
  124. <profiles>
  125. <!-- 测试环境 -->
  126. <profile>
  127. <id>test</id>
  128. <properties>
  129. <profiles.active>test</profiles.active>
  130. </properties>
  131. <!-- 设置为默认环境 -->
  132. <activation>
  133. <activeByDefault>true</activeByDefault>
  134. </activation>
  135. </profile>
  136. <!-- 生产环境 -->
  137. <profile>
  138. <id>prod</id>
  139. <properties>
  140. <profiles.active>prod</profiles.active>
  141. </properties>
  142. </profile>
  143. </profiles>
  144. <!--添加maven插件,项目的打包工具,打成jar包,否则在打包运行时报错 -->
  145. <build>
  146. <!-- 打包名格式:项目名-环境.jar -->
  147. <finalName>${project.artifactId}-${profiles.active}</finalName>
  148. <sourceDirectory>src/main/java</sourceDirectory>
  149. <testSourceDirectory>src/test/java</testSourceDirectory>
  150. <resources>
  151. <resource>
  152. <directory>src/main/resources</directory>
  153. <excludes>
  154. <exclude>test/*</exclude>
  155. <exclude>prod/*</exclude>
  156. </excludes>
  157. </resource>
  158. <resource>
  159. <directory>src/main/resources/${profiles.active}</directory>
  160. <filtering>true</filtering>
  161. <includes>
  162. <include>*.yml</include>
  163. <include>*.xml</include>
  164. </includes>
  165. </resource>
  166. </resources>
  167. <plugins>
  168. <plugin>
  169. <groupId>org.springframework.boot</groupId>
  170. <artifactId>spring-boot-maven-plugin</artifactId>
  171. <version>2.2.2.RELEASE</version>
  172. <configuration>
  173. <mainClass>com.welampiot.ServerApplication</mainClass>
  174. <layout>JAR</layout>
  175. </configuration>
  176. <executions>
  177. <execution>
  178. <goals>
  179. <goal>repackage</goal>
  180. </goals>
  181. <configuration>
  182. <attach>false</attach>
  183. </configuration>
  184. </execution>
  185. </executions>
  186. </plugin>
  187. <!-- maven 打包时跳过测试 -->
  188. <plugin>
  189. <groupId>org.apache.maven.plugins</groupId>
  190. <artifactId>maven-surefire-plugin</artifactId>
  191. <configuration>
  192. <skipTests>true</skipTests>
  193. </configuration>
  194. </plugin>
  195. </plugins>
  196. </build>
  197. </project>