pom.xml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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. </dependencies>
  133. <build>
  134. <finalName>svr-iot</finalName>
  135. <plugins>
  136. <plugin>
  137. <groupId>org.apache.maven.plugins</groupId>
  138. <artifactId>maven-jar-plugin</artifactId>
  139. <configuration>
  140. <archive>
  141. <!-- 生成的jar中,不要包含pom.xml和pom.properties这两个文件 -->
  142. <addMavenDescriptor>false</addMavenDescriptor>
  143. <manifest>
  144. <!-- 是否要把第三方jar加入到类构建路径 -->
  145. <addClasspath>true</addClasspath>
  146. <!-- 外部依赖jar包的最终位置 -->
  147. <classpathPrefix>lib/</classpathPrefix>
  148. <mainClass>com.yihu.IOTApplication</mainClass>
  149. </manifest>
  150. </archive>
  151. </configuration>
  152. </plugin>
  153. <!--拷贝依赖到jar外面的lib目录-->
  154. <plugin>
  155. <groupId>org.apache.maven.plugins</groupId>
  156. <artifactId>maven-dependency-plugin</artifactId>
  157. <executions>
  158. <execution>
  159. <id>copy-lib</id>
  160. <phase>package</phase>
  161. <goals>
  162. <goal>copy-dependencies</goal>
  163. </goals>
  164. <configuration>
  165. <!-- 依赖包输出目录,将来不打进jar包里 -->
  166. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  167. <excludeTransitive>false</excludeTransitive>
  168. <stripVersion>false</stripVersion>
  169. <includeScope>runtime</includeScope>
  170. </configuration>
  171. </execution>
  172. </executions>
  173. </plugin>
  174. <!--指定配置文件,将resources打成外部resource-->
  175. <plugin>
  176. <groupId>org.apache.maven.plugins</groupId>
  177. <artifactId>maven-jar-plugin</artifactId>
  178. <configuration>
  179. <archive>
  180. <!-- 指定配置文件目录,这样jar运行时会去找到同目录下的resources文件夹下查找 -->
  181. <manifestEntries>
  182. <Class-Path>resources/</Class-Path>
  183. </manifestEntries>
  184. </archive>
  185. <!-- 打包时忽略的文件(也就是不打进jar包里的文件) -->
  186. <excludes>
  187. <exclude>**/*.yml</exclude>
  188. <exclude>**/*.xml</exclude>
  189. </excludes>
  190. </configuration>
  191. </plugin>
  192. <!-- 拷贝资源文件 外面的resource目录-->
  193. <plugin>
  194. <artifactId>maven-resources-plugin</artifactId>
  195. <executions>
  196. <execution>
  197. <id>copy-dependencies</id>
  198. <phase>package</phase>
  199. <goals>
  200. <goal>copy-resources</goal>
  201. </goals>
  202. <configuration>
  203. <!-- 资源文件输出目录 -->
  204. <outputDirectory>${project.build.directory}/resources</outputDirectory>
  205. <resources>
  206. <resource>
  207. <directory>src/main/resources</directory>
  208. </resource>
  209. </resources>
  210. </configuration>
  211. </execution>
  212. </executions>
  213. </plugin>
  214. </plugins>
  215. </build>
  216. </project>