pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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. <groupId>com.persagy</groupId>
  7. <artifactId>fm-parent</artifactId>
  8. <version>3.0.0</version>
  9. <packaging>pom</packaging>
  10. <parent>
  11. <groupId>org.springframework.boot</groupId>
  12. <artifactId>spring-boot-starter-parent</artifactId>
  13. <version>2.1.14.RELEASE</version>
  14. </parent>
  15. <properties>
  16. <fm.version>3.0.0</fm.version>
  17. <platform.version>1.0.0</platform.version>
  18. </properties>
  19. <dependencyManagement>
  20. <dependencies>
  21. <dependency>
  22. <groupId>com.persagy</groupId>
  23. <artifactId>fm-server</artifactId>
  24. <version>${fm.version}</version>
  25. </dependency>
  26. <dependency>
  27. <groupId>com.persagy</groupId>
  28. <artifactId>integrated-common-core</artifactId>
  29. <version>${platform.version}</version>
  30. </dependency>
  31. <dependency>
  32. <groupId>com.persagy</groupId>
  33. <artifactId>integrated-log-spring-boot-starter</artifactId>
  34. <version>${platform.version}</version>
  35. </dependency>
  36. </dependencies>
  37. </dependencyManagement>
  38. <!-- 插件配置 -->
  39. <build>
  40. <pluginManagement>
  41. <plugins>
  42. <!-- compiler插件, 设定JDK版本 -->
  43. <plugin>
  44. <groupId>org.apache.maven.plugins</groupId>
  45. <artifactId>maven-compiler-plugin</artifactId>
  46. <version>3.7.0</version>
  47. <configuration>
  48. <source>${java.version}</source>
  49. <target>${java.version}</target>
  50. <showWarnings>true</showWarnings>
  51. </configuration>
  52. </plugin>
  53. <plugin>
  54. <groupId>org.scala-tools</groupId>
  55. <artifactId>maven-scala-plugin</artifactId>
  56. <version>2.15.2</version>
  57. <executions>
  58. <execution>
  59. <id>scala-compile-first</id>
  60. <phase>process-resources</phase>
  61. <goals>
  62. <goal>compile</goal>
  63. </goals>
  64. </execution>
  65. <execution>
  66. <id>scala-test-compile</id>
  67. <phase>process-test-resources</phase>
  68. <goals>
  69. <goal>testCompile</goal>
  70. </goals>
  71. </execution>
  72. </executions>
  73. </plugin>
  74. <!-- resource插件 -->
  75. <plugin>
  76. <groupId>org.apache.maven.plugins</groupId>
  77. <artifactId>maven-resources-plugin</artifactId>
  78. <version>3.0.2</version>
  79. </plugin>
  80. <!-- test插件, 仅测试名称为*Test的类, 使用支持分组测试的surefire-junit47 driver -->
  81. <plugin>
  82. <groupId>org.apache.maven.plugins</groupId>
  83. <artifactId>maven-surefire-plugin</artifactId>
  84. <version>2.20.1</version>
  85. <configuration>
  86. <includes>
  87. <include>**/*Test.java</include>
  88. <include>**/*Test.scala</include>
  89. </includes>
  90. <skipTests>true</skipTests>
  91. </configuration>
  92. <dependencies>
  93. <dependency>
  94. <groupId>org.apache.maven.surefire</groupId>
  95. <artifactId>surefire-junit4</artifactId>
  96. <version>2.18.1</version>
  97. </dependency>
  98. </dependencies>
  99. </plugin>
  100. <!-- 增加更多的Source和Test Source目录插件 -->
  101. <plugin>
  102. <groupId>org.codehaus.mojo</groupId>
  103. <artifactId>build-helper-maven-plugin</artifactId>
  104. <version>3.0.0</version>
  105. </plugin>
  106. <!-- cobertura 测试覆盖率统计插插件 -->
  107. <plugin>
  108. <groupId>org.codehaus.mojo</groupId>
  109. <artifactId>cobertura-maven-plugin</artifactId>
  110. <version>2.7</version>
  111. </plugin>
  112. <!-- war打包插件, 设定war包名称不带版本号 -->
  113. <plugin>
  114. <groupId>org.apache.maven.plugins</groupId>
  115. <artifactId>maven-war-plugin</artifactId>
  116. <version>3.2.0</version>
  117. <configuration>
  118. <warName>${project.artifactId}${chassis.version}</warName>
  119. <failOnMissingWebXml>false</failOnMissingWebXml>
  120. </configuration>
  121. </plugin>
  122. <!-- jar打包相关插件 -->
  123. <plugin>
  124. <groupId>org.apache.maven.plugins</groupId>
  125. <artifactId>maven-jar-plugin</artifactId>
  126. <version>3.1.0</version>
  127. <executions>
  128. <execution>
  129. <goals>
  130. <goal>test-jar</goal>
  131. </goals>
  132. </execution>
  133. </executions>
  134. <configuration>
  135. <archive>
  136. <manifest>
  137. <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
  138. </manifest>
  139. </archive>
  140. </configuration>
  141. </plugin>
  142. <plugin>
  143. <groupId>org.apache.maven.plugins</groupId>
  144. <artifactId>maven-source-plugin</artifactId>
  145. <version>3.0.1</version>
  146. <configuration>
  147. <attach>true</attach>
  148. </configuration>
  149. <executions>
  150. <execution>
  151. <phase>compile</phase>
  152. <goals>
  153. <goal>jar</goal>
  154. </goals>
  155. </execution>
  156. </executions>
  157. </plugin>
  158. <!-- clean插件 -->
  159. <plugin>
  160. <groupId>org.apache.maven.plugins</groupId>
  161. <artifactId>maven-clean-plugin</artifactId>
  162. <version>3.0.0</version>
  163. </plugin>
  164. <!-- install插件 -->
  165. <plugin>
  166. <groupId>org.apache.maven.plugins</groupId>
  167. <artifactId>maven-install-plugin</artifactId>
  168. <version>2.5.2</version>
  169. </plugin>
  170. <!-- enforcer插件, 避免被依赖的依赖引入过期的jar包 -->
  171. <plugin>
  172. <groupId>org.apache.maven.plugins</groupId>
  173. <artifactId>maven-enforcer-plugin</artifactId>
  174. <version>1.4.1</version>
  175. <executions>
  176. <execution>
  177. <id>enforce-banned-dependencies</id>
  178. <goals>
  179. <goal>enforce</goal>
  180. </goals>
  181. <configuration>
  182. <rules>
  183. <requireMavenVersion>
  184. <version>3.0.3</version>
  185. </requireMavenVersion>
  186. <requireJavaVersion>
  187. <version>1.7</version>
  188. </requireJavaVersion>
  189. <bannedDependencies>
  190. <searchTransitive>true</searchTransitive>
  191. <excludes>
  192. <exclude>commons-logging</exclude>
  193. <exclude>aspectj:aspectj*</exclude>
  194. <exclude>org.springframework</exclude>
  195. </excludes>
  196. <includes>
  197. <include>org.springframework:*:4.3.*</include>
  198. </includes>
  199. </bannedDependencies>
  200. </rules>
  201. <fail>true</fail>
  202. </configuration>
  203. </execution>
  204. </executions>
  205. </plugin>
  206. <!-- dependency相关插件 -->
  207. <plugin>
  208. <groupId>org.apache.maven.plugins</groupId>
  209. <artifactId>maven-dependency-plugin</artifactId>
  210. <version>2.10</version>
  211. </plugin>
  212. <!-- ant插件 -->
  213. <plugin>
  214. <groupId>org.apache.maven.plugins</groupId>
  215. <artifactId>maven-antrun-plugin</artifactId>
  216. <version>1.8</version>
  217. </plugin>
  218. <!-- exec java 插件 -->
  219. <plugin>
  220. <groupId>org.codehaus.mojo</groupId>
  221. <artifactId>exec-maven-plugin</artifactId>
  222. <version>1.6.0</version>
  223. </plugin>
  224. <plugin>
  225. <groupId>org.apache.maven.plugins</groupId>
  226. <artifactId>maven-release-plugin</artifactId>
  227. <version>2.5.3</version>
  228. <configuration>
  229. <!--<tagBase>https://192.168.1.100:8443/svn/myapp/tags/</tagBase>-->
  230. </configuration>
  231. </plugin>
  232. <plugin>
  233. <groupId>org.eclipse.m2e</groupId>
  234. <artifactId>lifecycle-mapping</artifactId>
  235. <version>1.0.0</version>
  236. <configuration>
  237. <lifecycleMappingMetadata>
  238. <pluginExecutions>
  239. <pluginExecution>
  240. <pluginExecutionFilter>
  241. <groupId>org.apache.maven.plugins</groupId>
  242. <artifactId>maven-dependency-plugin</artifactId>
  243. <versionRange>[2.0,)</versionRange>
  244. <goals>
  245. <goal>copy-dependencies</goal>
  246. </goals>
  247. </pluginExecutionFilter>
  248. <action>
  249. <ignore/>
  250. </action>
  251. </pluginExecution>
  252. </pluginExecutions>
  253. </lifecycleMappingMetadata>
  254. </configuration>
  255. </plugin>
  256. </plugins>
  257. </pluginManagement>
  258. <plugins>
  259. <plugin>
  260. <groupId>org.apache.maven.plugins</groupId>
  261. <artifactId>maven-source-plugin</artifactId>
  262. </plugin>
  263. </plugins>
  264. </build>
  265. </project>