pom.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <!--父工程信息-->
  5. <parent>
  6. <groupId>com.shkpr.service</groupId>
  7. <artifactId>kpr-custom-gateway</artifactId>
  8. <version>1.0.0</version>
  9. </parent>
  10. <!--工件名-->
  11. <artifactId>custom-gateway-app</artifactId>
  12. <!--版本号-->
  13. <version>${project.version}</version>
  14. <!--打包方式-->
  15. <packaging>jar</packaging>
  16. <!--项目名-->
  17. <name>CustomGatewayApp</name>
  18. <!--项目描述-->
  19. <description>启动模块</description>
  20. <!--依赖项-->
  21. <dependencies>
  22. <!--启用模块-->
  23. <dependency>
  24. <groupId>com.shkpr.service</groupId>
  25. <artifactId>custom-gateway-${enable.module}</artifactId>
  26. <version>${project.version}</version>
  27. </dependency>
  28. </dependencies>
  29. <!--构建脚本-->
  30. <build>
  31. <!-- 打成jar包的名称 -->
  32. <finalName>${parent.artifactId}-${project.version}</finalName>
  33. <!--插件项-->
  34. <plugins>
  35. <!--maven-compiler-->
  36. <plugin>
  37. <groupId>org.apache.maven.plugins</groupId>
  38. <artifactId>maven-compiler-plugin</artifactId>
  39. <configuration>
  40. <source>${maven.compiler.source}</source>
  41. <target>${maven.compiler.target}</target>
  42. <encoding>${project.build.sourceEncoding}</encoding>
  43. <compilerArguments>
  44. <extdirs>${project.basedir}/../libs</extdirs>
  45. </compilerArguments>
  46. <annotationProcessorPaths>
  47. <path>
  48. <groupId>org.projectlombok</groupId>
  49. <artifactId>lombok</artifactId>
  50. </path>
  51. </annotationProcessorPaths>
  52. </configuration>
  53. </plugin>
  54. <!--maven-resources-->
  55. <plugin>
  56. <groupId>org.apache.maven.plugins</groupId>
  57. <artifactId>maven-resources-plugin</artifactId>
  58. <configuration>
  59. <encoding>UTF-8</encoding>
  60. <!-- 过滤后缀为pem、pfx的证书文件 -->
  61. <nonFilteredFileExtensions>
  62. <nonFilteredFileExtension>pem</nonFilteredFileExtension>
  63. <nonFilteredFileExtension>pfx</nonFilteredFileExtension>
  64. <nonFilteredFileExtension>p12</nonFilteredFileExtension>
  65. </nonFilteredFileExtensions>
  66. </configuration>
  67. </plugin>
  68. <!--maven-surefire-->
  69. <plugin>
  70. <groupId>org.apache.maven.plugins</groupId>
  71. <artifactId>maven-surefire-plugin</artifactId>
  72. <configuration>
  73. <skipTests>true</skipTests>
  74. <systemPropertyVariables>
  75. <spring.datasource.config-path>../db_config.yml</spring.datasource.config-path>
  76. <device.map-path>../dev_${enable.module}.yml</device.map-path>
  77. <spring.datasource.multi.embedded.url>jdbc:h2:file:../data
  78. </spring.datasource.multi.embedded.url>
  79. </systemPropertyVariables>
  80. </configuration>
  81. </plugin>
  82. <!--spring-boot-->
  83. <plugin>
  84. <groupId>org.springframework.boot</groupId>
  85. <artifactId>spring-boot-maven-plugin</artifactId>
  86. <version>${spring.boot.version}</version>
  87. <configuration>
  88. <fork>true</fork>
  89. <executable>true</executable>
  90. <mainClass>com.shkpr.service.customgateway.CustomGatewayApplication</mainClass>
  91. </configuration>
  92. <executions>
  93. <execution>
  94. <goals>
  95. <goal>repackage</goal>
  96. </goals>
  97. </execution>
  98. </executions>
  99. </plugin>
  100. </plugins>
  101. <!--资源包-->
  102. <resources>
  103. <!--lib-->
  104. <resource>
  105. <directory>${project.basedir}/../libs</directory>
  106. <targetPath>BOOT-INF/lib/</targetPath>
  107. <includes>
  108. <include>**/*.jar</include>
  109. </includes>
  110. </resource>
  111. <!--resources-->
  112. <resource>
  113. <directory>src/main/resources</directory>
  114. <includes>
  115. <include>**/**</include>
  116. </includes>
  117. <filtering>true</filtering>
  118. </resource>
  119. </resources>
  120. </build>
  121. </project>