pom.xml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (c) 2019 Of Him Code Technology Studio
  4. Jpom is licensed under Mulan PSL v2.
  5. You can use this software according to the terms and conditions of the Mulan PSL v2.
  6. You may obtain a copy of Mulan PSL v2 at:
  7. http://license.coscl.org.cn/MulanPSL2
  8. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  9. See the Mulan PSL v2 for more details.
  10. -->
  11. <project xmlns="http://maven.apache.org/POM/4.0.0"
  12. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  13. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  14. <parent>
  15. <artifactId>jpom-parent</artifactId>
  16. <groupId>org.dromara.jpom</groupId>
  17. <version>2.11.12.1</version>
  18. <relativePath>../../pom.xml</relativePath>
  19. </parent>
  20. <modelVersion>4.0.0</modelVersion>
  21. <artifactId>agent</artifactId>
  22. <version>2.11.12.1</version>
  23. <name>Jpom Agent</name>
  24. <properties>
  25. <start-class>org.dromara.jpom.JpomAgentApplication</start-class>
  26. <!--当前程序兼容 jpom 最新版本号-->
  27. <jpom-min-version>1.0.0</jpom-min-version>
  28. </properties>
  29. <dependencies>
  30. <dependency>
  31. <groupId>org.dromara.jpom</groupId>
  32. <artifactId>common</artifactId>
  33. <version>${project.version}</version>
  34. </dependency>
  35. <dependency>
  36. <groupId>org.dromara.jpom.plugins</groupId>
  37. <artifactId>webhook</artifactId>
  38. <version>${project.version}</version>
  39. </dependency>
  40. <dependency>
  41. <groupId>org.springframework.boot</groupId>
  42. <artifactId>spring-boot-configuration-processor</artifactId>
  43. <optional>true</optional>
  44. </dependency>
  45. <dependency>
  46. <groupId>com.github.oshi</groupId>
  47. <artifactId>oshi-core</artifactId>
  48. <version>${oshi.version}</version>
  49. </dependency>
  50. <dependency>
  51. <groupId>commons-codec</groupId>
  52. <artifactId>commons-codec</artifactId>
  53. <version>1.15</version>
  54. </dependency>
  55. </dependencies>
  56. <build>
  57. <plugins>
  58. </plugins>
  59. <resources>
  60. <!--版权文件,更新日志-->
  61. <resource>
  62. <filtering>false</filtering>
  63. <directory>../../</directory>
  64. <includes>
  65. <include>CHANGELOG.md</include>
  66. <include>CHANGELOG-BETA.md</include>
  67. <include>LICENSE</include>
  68. </includes>
  69. </resource>
  70. <resource>
  71. <directory>src/main/resources</directory>
  72. <filtering>false</filtering>
  73. </resource>
  74. </resources>
  75. </build>
  76. <profiles>
  77. <profile>
  78. <id>agent-default-profile</id>
  79. <activation>
  80. <activeByDefault>true</activeByDefault>
  81. </activation>
  82. <build>
  83. <plugins>
  84. <plugin>
  85. <groupId>org.apache.maven.plugins</groupId>
  86. <artifactId>maven-jar-plugin</artifactId>
  87. <version>3.3.0</version>
  88. <configuration>
  89. <archive>
  90. <manifest>
  91. <mainClass>${start-class}</mainClass>
  92. <!-- 是否指定项目classpath下的依赖 -->
  93. <addClasspath>true</addClasspath>
  94. <!-- 指定依赖的时候声明前缀 -->
  95. <classpathPrefix>./</classpathPrefix>
  96. </manifest>
  97. <manifestEntries>
  98. <!-- 项目版本号 -->
  99. <Jpom-Project-Version>${project.version}</Jpom-Project-Version>
  100. <!-- 打包时间 -->
  101. <Jpom-Timestamp>${maven.build.timestamp}</Jpom-Timestamp>
  102. <Jpom-Type>${project.artifactId}</Jpom-Type>
  103. <Implementation-URL>https://gitee.com/dromara/Jpom</Implementation-URL>
  104. <Jpom-Min-Version>${jpom-min-version}</Jpom-Min-Version>
  105. </manifestEntries>
  106. <addMavenDescriptor>true</addMavenDescriptor>
  107. </archive>
  108. <excludes>
  109. <exclude>logback.xml</exclude>
  110. <exclude>application.yml</exclude>
  111. </excludes>
  112. </configuration>
  113. </plugin>
  114. <plugin>
  115. <groupId>org.springframework.boot</groupId>
  116. <artifactId>spring-boot-maven-plugin</artifactId>
  117. <configuration>
  118. <fork>true</fork>
  119. <mainClass>${start-class}</mainClass>
  120. <jvmArguments>-Dfile.encoding=UTF-8</jvmArguments>
  121. <!-- <excludeGroupIds>org.dromara.jpom.plugins</excludeGroupIds>-->
  122. <excludes>
  123. <exclude>
  124. <groupId>org.projectlombok</groupId>
  125. <artifactId>lombok</artifactId>
  126. </exclude>
  127. </excludes>
  128. </configuration>
  129. <executions>
  130. <execution>
  131. <goals>
  132. <goal>repackage</goal>
  133. </goals>
  134. </execution>
  135. </executions>
  136. </plugin>
  137. </plugins>
  138. </build>
  139. </profile>
  140. <!-- 生成打包文件-->
  141. <profile>
  142. <id>install-assembly</id>
  143. <activation>
  144. <activeByDefault>true</activeByDefault>
  145. </activation>
  146. <build>
  147. <plugins>
  148. <plugin>
  149. <groupId>org.apache.maven.plugins</groupId>
  150. <artifactId>maven-assembly-plugin</artifactId>
  151. <version>3.3.0</version>
  152. <configuration>
  153. <encoding>${project.build.sourceEncoding}</encoding>
  154. <descriptors>
  155. <descriptor>src/main/assembly/release.xml</descriptor>
  156. </descriptors>
  157. <outputDirectory>${project.build.directory}</outputDirectory>
  158. </configuration>
  159. <executions>
  160. <execution>
  161. <id>make-assembly</id>
  162. <phase>package</phase>
  163. <goals>
  164. <goal>single</goal>
  165. </goals>
  166. </execution>
  167. </executions>
  168. </plugin>
  169. <!-- 生成 sha1 校验文件 -->
  170. <plugin>
  171. <groupId>net.nicoulaj.maven.plugins</groupId>
  172. <artifactId>checksum-maven-plugin</artifactId>
  173. <version>1.11</version>
  174. <executions>
  175. <execution>
  176. <id>checksum-maven-plugin-files</id>
  177. <phase>package</phase>
  178. <goals>
  179. <goal>files</goal>
  180. </goals>
  181. </execution>
  182. </executions>
  183. <configuration>
  184. <fileSets>
  185. <fileSet>
  186. <directory>${project.build.directory}</directory>
  187. <includes>
  188. <include>*.jar</include>
  189. <include>*.zip</include>
  190. <include>*.tar.gz</include>
  191. </includes>
  192. </fileSet>
  193. </fileSets>
  194. <algorithms>
  195. <algorithm>SHA-1</algorithm>
  196. </algorithms>
  197. </configuration>
  198. </plugin>
  199. </plugins>
  200. </build>
  201. </profile>
  202. </profiles>
  203. </project>