pom.xml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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.jw</groupId>
  13. <artifactId>svr-cloud-transfor</artifactId>
  14. <packaging>jar</packaging>
  15. <version>${parent.version}</version>
  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>javax.servlet</groupId>
  35. <artifactId>javax.servlet-api</artifactId>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.apache.tomcat.embed</groupId>
  39. <artifactId>tomcat-embed-jasper</artifactId>
  40. </dependency>
  41. <!-- 支持Tomcat启动 -->
  42. <dependency>
  43. <groupId>com.alibaba</groupId>
  44. <artifactId>fastjson</artifactId>
  45. </dependency>
  46. <dependency>
  47. <groupId>com.yihu.jw</groupId>
  48. <artifactId>swagger-starter</artifactId>
  49. <version>2.0.0</version>
  50. </dependency>
  51. <dependency>
  52. <groupId>com.yihu</groupId>
  53. <artifactId>mysql-starter</artifactId>
  54. <version>2.0.0</version>
  55. <exclusions>
  56. <exclusion>
  57. <groupId>org.apache.tomcat</groupId>
  58. <artifactId>tomcat-jdbc</artifactId>
  59. </exclusion>
  60. </exclusions>
  61. </dependency>
  62. <!-- SPRINGSIDE -->
  63. <dependency>
  64. <groupId>org.springside</groupId>
  65. <artifactId>springside-core</artifactId>
  66. <version>4.2.3-GA</version>
  67. </dependency>
  68. <dependency>
  69. <groupId>org.springframework.security</groupId>
  70. <artifactId>spring-security-core</artifactId>
  71. <version>RELEASE</version>
  72. <scope>compile</scope>
  73. </dependency>
  74. </dependencies>
  75. <build>
  76. <finalName>svr-cloud-transfor</finalName>
  77. <plugins>
  78. <plugin>
  79. <groupId>org.apache.maven.plugins</groupId>
  80. <artifactId>maven-jar-plugin</artifactId>
  81. <configuration>
  82. <archive>
  83. <!-- 生成的jar中,不要包含pom.xml和pom.properties这两个文件 -->
  84. <addMavenDescriptor>false</addMavenDescriptor>
  85. <manifest>
  86. <!-- 是否要把第三方jar加入到类构建路径 -->
  87. <addClasspath>true</addClasspath>
  88. <!-- 外部依赖jar包的最终位置 -->
  89. <classpathPrefix>lib/</classpathPrefix>
  90. <mainClass>com.yihu.SvrCloudTransforApplication</mainClass>
  91. </manifest>
  92. </archive>
  93. </configuration>
  94. </plugin>
  95. <!--拷贝依赖到jar外面的lib目录-->
  96. <plugin>
  97. <groupId>org.apache.maven.plugins</groupId>
  98. <artifactId>maven-dependency-plugin</artifactId>
  99. <executions>
  100. <execution>
  101. <id>copy-lib</id>
  102. <phase>package</phase>
  103. <goals>
  104. <goal>copy-dependencies</goal>
  105. </goals>
  106. <configuration>
  107. <!-- 依赖包输出目录,将来不打进jar包里 -->
  108. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  109. <excludeTransitive>false</excludeTransitive>
  110. <stripVersion>false</stripVersion>
  111. <includeScope>runtime</includeScope>
  112. </configuration>
  113. </execution>
  114. </executions>
  115. </plugin>
  116. <!--指定配置文件,将resources打成外部resource-->
  117. <plugin>
  118. <groupId>org.apache.maven.plugins</groupId>
  119. <artifactId>maven-jar-plugin</artifactId>
  120. <configuration>
  121. <archive>
  122. <!-- 指定配置文件目录,这样jar运行时会去找到同目录下的resources文件夹下查找 -->
  123. <manifestEntries>
  124. <Class-Path>resources/</Class-Path>
  125. </manifestEntries>
  126. </archive>
  127. <!-- 打包时忽略的文件(也就是不打进jar包里的文件) -->
  128. <excludes>
  129. <exclude>**/*.yml</exclude>
  130. <exclude>**/*.xml</exclude>
  131. </excludes>
  132. </configuration>
  133. </plugin>
  134. <!-- 拷贝资源文件 外面的resource目录-->
  135. <plugin>
  136. <artifactId>maven-resources-plugin</artifactId>
  137. <executions>
  138. <execution>
  139. <id>copy-dependencies</id>
  140. <phase>package</phase>
  141. <goals>
  142. <goal>copy-resources</goal>
  143. </goals>
  144. <configuration>
  145. <!-- 资源文件输出目录 -->
  146. <outputDirectory>${project.build.directory}/resources</outputDirectory>
  147. <resources>
  148. <resource>
  149. <directory>src/main/resources</directory>
  150. </resource>
  151. </resources>
  152. </configuration>
  153. </execution>
  154. </executions>
  155. </plugin>
  156. </plugins>
  157. </build>
  158. </project>