pom.xml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  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. <parent>
  7. <groupId>com.yihu.jw</groupId>
  8. <artifactId>wlyy-parent-pom</artifactId>
  9. <version>2.0.0</version>
  10. <relativePath>../../wlyy-parent-pom/pom.xml</relativePath>
  11. </parent>
  12. <groupId>com.yihu.iot</groupId>
  13. <artifactId>svr-iot</artifactId>
  14. <version>${parent.version}</version>
  15. <packaging>jar</packaging>
  16. <dependencies>
  17. <!-- 支持Tomcat启动 -->
  18. <dependency>
  19. <groupId>org.springframework.boot</groupId>
  20. <artifactId>spring-boot-starter-web</artifactId>
  21. <exclusions>
  22. <exclusion>
  23. <groupId>org.springframework.boot</groupId>
  24. <artifactId>spring-boot-starter-tomcat</artifactId>
  25. </exclusion>
  26. </exclusions>
  27. </dependency>
  28. <dependency>
  29. <groupId>org.springframework.boot</groupId>
  30. <artifactId>spring-boot-starter-tomcat</artifactId>
  31. <scope>provided</scope>
  32. </dependency>
  33. <dependency>
  34. <groupId>org.springframework.cloud</groupId>
  35. <artifactId>spring-cloud-starter-eureka</artifactId>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.springframework.cloud</groupId>
  39. <artifactId>spring-cloud-starter-config</artifactId>
  40. </dependency>
  41. <dependency>
  42. <groupId>javax.servlet</groupId>
  43. <artifactId>javax.servlet-api</artifactId>
  44. </dependency>
  45. <dependency>
  46. <groupId>org.apache.tomcat.embed</groupId>
  47. <artifactId>tomcat-embed-jasper</artifactId>
  48. </dependency>
  49. <!-- 支持Tomcat启动 -->
  50. <dependency>
  51. <groupId>com.alibaba</groupId>
  52. <artifactId>fastjson</artifactId>
  53. </dependency>
  54. <dependency>
  55. <groupId>org.apache.commons</groupId>
  56. <artifactId>commons-lang3</artifactId>
  57. <version>3.3.2</version>
  58. </dependency>
  59. <dependency>
  60. <groupId>org.apache.poi</groupId>
  61. <artifactId>poi</artifactId>
  62. <version>3.15-beta1</version>
  63. </dependency>
  64. <dependency>
  65. <groupId>com.auth0</groupId>
  66. <artifactId>java-jwt</artifactId>
  67. <version>3.1.0</version>
  68. </dependency>
  69. <dependency>
  70. <groupId>com.yihu.jw</groupId>
  71. <artifactId>common-entity</artifactId>
  72. </dependency>
  73. <dependency>
  74. <groupId>com.yihu.jw</groupId>
  75. <artifactId>common-entity-es</artifactId>
  76. </dependency>
  77. <dependency>
  78. <groupId>com.yihu.jw</groupId>
  79. <artifactId>common-request-mapping</artifactId>
  80. </dependency>
  81. <dependency>
  82. <groupId>com.yihu.jw</groupId>
  83. <artifactId>common-exception</artifactId>
  84. </dependency>
  85. <dependency>
  86. <groupId>com.yihu.jw</groupId>
  87. <artifactId>common-rest-model</artifactId>
  88. </dependency>
  89. <dependency>
  90. <groupId>com.yihu.jw</groupId>
  91. <artifactId>common-rest-model-es</artifactId>
  92. </dependency>
  93. <dependency>
  94. <groupId>com.yihu.jw</groupId>
  95. <artifactId>common-util</artifactId>
  96. </dependency>
  97. <dependency>
  98. <groupId>com.yihu.jw</groupId>
  99. <artifactId>common-web</artifactId>
  100. </dependency>
  101. <!-- jkzl starter -->
  102. <dependency>
  103. <groupId>com.yihu</groupId>
  104. <artifactId>swagger-starter</artifactId>
  105. <version>2.0.0</version>
  106. </dependency>
  107. <dependency>
  108. <groupId>com.yihu</groupId>
  109. <artifactId>mysql-starter</artifactId>
  110. <version>2.0.0</version>
  111. <exclusions>
  112. <exclusion>
  113. <groupId>org.apache.tomcat</groupId>
  114. <artifactId>tomcat-jdbc</artifactId>
  115. </exclusion>
  116. </exclusions>
  117. </dependency>
  118. <dependency>
  119. <groupId>com.zaxxer</groupId>
  120. <artifactId>HikariCP</artifactId>
  121. <!-- <scope>runtime</scope> -->
  122. </dependency>
  123. <dependency>
  124. <groupId>com.yihu</groupId>
  125. <artifactId>elasticsearch-starter</artifactId>
  126. <version>2.0.0</version>
  127. </dependency>
  128. <dependency>
  129. <groupId>com.yihu</groupId>
  130. <artifactId>fastdfs-starter</artifactId>
  131. </dependency>
  132. <dependency>
  133. <groupId>org.elasticsearch.plugin</groupId>
  134. <artifactId>shield</artifactId>
  135. <version>2.4.6</version>
  136. <scope>compile</scope>
  137. </dependency>
  138. <dependency>
  139. <groupId>cn.hutool</groupId>
  140. <artifactId>hutool-all</artifactId>
  141. <version>5.8.16</version>
  142. </dependency>
  143. </dependencies>
  144. <build>
  145. <finalName>svr-iot</finalName>
  146. <plugins>
  147. <plugin>
  148. <groupId>org.apache.maven.plugins</groupId>
  149. <artifactId>maven-jar-plugin</artifactId>
  150. <configuration>
  151. <archive>
  152. <!-- 生成的jar中,不要包含pom.xml和pom.properties这两个文件 -->
  153. <addMavenDescriptor>false</addMavenDescriptor>
  154. <manifest>
  155. <!-- 是否要把第三方jar加入到类构建路径 -->
  156. <addClasspath>true</addClasspath>
  157. <!-- 外部依赖jar包的最终位置 -->
  158. <classpathPrefix>lib/</classpathPrefix>
  159. <mainClass>com.yihu.IOTApplication</mainClass>
  160. </manifest>
  161. </archive>
  162. </configuration>
  163. </plugin>
  164. <!--拷贝依赖到jar外面的lib目录-->
  165. <plugin>
  166. <groupId>org.apache.maven.plugins</groupId>
  167. <artifactId>maven-dependency-plugin</artifactId>
  168. <executions>
  169. <execution>
  170. <id>copy-lib</id>
  171. <phase>package</phase>
  172. <goals>
  173. <goal>copy-dependencies</goal>
  174. </goals>
  175. <configuration>
  176. <!-- 依赖包输出目录,将来不打进jar包里 -->
  177. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  178. <excludeTransitive>false</excludeTransitive>
  179. <stripVersion>false</stripVersion>
  180. <includeScope>runtime</includeScope>
  181. </configuration>
  182. </execution>
  183. </executions>
  184. </plugin>
  185. <!--指定配置文件,将resources打成外部resource-->
  186. <plugin>
  187. <groupId>org.apache.maven.plugins</groupId>
  188. <artifactId>maven-jar-plugin</artifactId>
  189. <configuration>
  190. <archive>
  191. <!-- 指定配置文件目录,这样jar运行时会去找到同目录下的resources文件夹下查找 -->
  192. <manifestEntries>
  193. <Class-Path>resources/</Class-Path>
  194. </manifestEntries>
  195. </archive>
  196. <!-- 打包时忽略的文件(也就是不打进jar包里的文件) -->
  197. <excludes>
  198. <exclude>**/*.yml</exclude>
  199. <exclude>**/*.xml</exclude>
  200. </excludes>
  201. </configuration>
  202. </plugin>
  203. <!-- 拷贝资源文件 外面的resource目录-->
  204. <plugin>
  205. <artifactId>maven-resources-plugin</artifactId>
  206. <executions>
  207. <execution>
  208. <id>copy-dependencies</id>
  209. <phase>package</phase>
  210. <goals>
  211. <goal>copy-resources</goal>
  212. </goals>
  213. <configuration>
  214. <!-- 资源文件输出目录 -->
  215. <outputDirectory>${project.build.directory}/resources</outputDirectory>
  216. <resources>
  217. <resource>
  218. <directory>src/main/resources</directory>
  219. </resource>
  220. </resources>
  221. </configuration>
  222. </execution>
  223. </executions>
  224. </plugin>
  225. </plugins>
  226. </build>
  227. </project>