pom.xml 6.3 KB

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