pom.xml 9.6 KB

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