pom.xml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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.github.kfcfans</groupId>
  7. <artifactId>powerjob</artifactId>
  8. <version>1.0.0</version>
  9. <packaging>pom</packaging>
  10. <name>powerjob</name>
  11. <url>https://github.com/KFCFans/OhMyScheduler</url>
  12. <description>Distributed scheduling and execution framework</description>
  13. <licenses>
  14. <license>
  15. <name>Apache License, Version 2.0</name>
  16. <url>http://www.apache.org/licenses/LICENSE-2.0</url>
  17. <distribution>repo</distribution>
  18. </license>
  19. </licenses>
  20. <scm>
  21. <url>https://github.com/KFCFans/OhMyScheduler</url>
  22. <connection>https://github.com/KFCFans/OhMyScheduler.git</connection>
  23. </scm>
  24. <developers>
  25. <developer>
  26. <name>tengjiqi</name>
  27. <id>tengjiqi</id>
  28. <email>tengjiqi@gmail.com</email>
  29. <roles>
  30. <role>Developer</role>
  31. </roles>
  32. <timezone>+8</timezone>
  33. </developer>
  34. </developers>
  35. <modules>
  36. <module>powerjob-worker</module>
  37. <module>powerjob-server</module>
  38. <module>powerjob-common</module>
  39. <module>powerjob-client</module>
  40. <module>powerjob-worker-samples</module>
  41. <module>powerjob-worker-agent</module>
  42. </modules>
  43. <properties>
  44. <java.version>1.8</java.version>
  45. <maven.compiler.source>1.8</maven.compiler.source>
  46. <maven.compiler.target>1.8</maven.compiler.target>
  47. <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
  48. <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
  49. <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
  50. <maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
  51. <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
  52. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  53. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  54. <lombok.version>1.18.12</lombok.version>
  55. </properties>
  56. <dependencies>
  57. <!-- lombok -->
  58. <dependency>
  59. <groupId>org.projectlombok</groupId>
  60. <artifactId>lombok</artifactId>
  61. <version>${lombok.version}</version>
  62. <scope>provided</scope>
  63. </dependency>
  64. </dependencies>
  65. <profiles>
  66. <!-- 发布到中央仓库,需要使用 mvn xxx -Prelease 启用 -->
  67. <profile>
  68. <id>release</id>
  69. <build>
  70. <plugins>
  71. <!-- 编译插件 -->
  72. <plugin>
  73. <groupId>org.apache.maven.plugins</groupId>
  74. <artifactId>maven-compiler-plugin</artifactId>
  75. <version>${maven-compiler-plugin.version}</version>
  76. <configuration>
  77. <source>${java.version}</source>
  78. <target>${java.version}</target>
  79. <testSource>${java.version}</testSource>
  80. <testTarget>${java.version}</testTarget>
  81. </configuration>
  82. </plugin>
  83. <!-- 打包源码 -->
  84. <plugin>
  85. <groupId>org.apache.maven.plugins</groupId>
  86. <artifactId>maven-source-plugin</artifactId>
  87. <version>${maven-source-plugin.version}</version>
  88. <executions>
  89. <execution>
  90. <phase>package</phase>
  91. <goals>
  92. <goal>jar-no-fork</goal>
  93. </goals>
  94. </execution>
  95. </executions>
  96. </plugin>
  97. <!-- 编辑 MANIFEST.MF -->
  98. <plugin>
  99. <groupId>org.apache.maven.plugins</groupId>
  100. <artifactId>maven-jar-plugin</artifactId>
  101. <version>${maven-jar-plugin.version}</version>
  102. <configuration>
  103. <archive>
  104. <manifestEntries>
  105. <Implementation-Title>${project.artifactId}</Implementation-Title>
  106. <Implementation-Version>${project.version}</Implementation-Version>
  107. </manifestEntries>
  108. </archive>
  109. </configuration>
  110. </plugin>
  111. <!-- Java Doc -->
  112. <plugin>
  113. <groupId>org.apache.maven.plugins</groupId>
  114. <artifactId>maven-javadoc-plugin</artifactId>
  115. <version>${maven-javadoc-plugin.version}</version>
  116. <configuration>
  117. <!-- JavaDoc 编译错误不影响正常构建 -->
  118. <failOnError>false</failOnError>
  119. <!-- 非严格模式...以后要好好按格式写注释啊... -->
  120. <additionalJOption>-Xdoclint:none</additionalJOption>
  121. </configuration>
  122. <executions>
  123. <execution>
  124. <phase>package</phase>
  125. <goals>
  126. <goal>jar</goal>
  127. </goals>
  128. </execution>
  129. </executions>
  130. </plugin>
  131. <!-- GPG -->
  132. <plugin>
  133. <groupId>org.apache.maven.plugins</groupId>
  134. <artifactId>maven-gpg-plugin</artifactId>
  135. <version>${maven-gpg-plugin.version}</version>
  136. <executions>
  137. <execution>
  138. <phase>verify</phase>
  139. <goals>
  140. <goal>sign</goal>
  141. </goals>
  142. </execution>
  143. </executions>
  144. </plugin>
  145. </plugins>
  146. </build>
  147. <distributionManagement>
  148. <snapshotRepository>
  149. <id>ossrh</id>
  150. <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
  151. </snapshotRepository>
  152. <repository>
  153. <id>ossrh</id>
  154. <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
  155. </repository>
  156. </distributionManagement>
  157. </profile>
  158. <!-- 本地使用 -->
  159. <profile>
  160. <id>dev</id>
  161. <activation>
  162. <activeByDefault>true</activeByDefault>
  163. </activation>
  164. <build>
  165. <plugins>
  166. <!-- 编译插件 -->
  167. <plugin>
  168. <groupId>org.apache.maven.plugins</groupId>
  169. <artifactId>maven-compiler-plugin</artifactId>
  170. <version>${maven-compiler-plugin.version}</version>
  171. <configuration>
  172. <source>${java.version}</source>
  173. <target>${java.version}</target>
  174. <testSource>${java.version}</testSource>
  175. <testTarget>${java.version}</testTarget>
  176. </configuration>
  177. </plugin>
  178. <!-- 编辑 MANIFEST.MF -->
  179. <plugin>
  180. <groupId>org.apache.maven.plugins</groupId>
  181. <artifactId>maven-jar-plugin</artifactId>
  182. <version>${maven-jar-plugin.version}</version>
  183. <configuration>
  184. <archive>
  185. <manifestEntries>
  186. <Implementation-Title>${project.artifactId}</Implementation-Title>
  187. <Implementation-Version>${project.version}</Implementation-Version>
  188. </manifestEntries>
  189. </archive>
  190. </configuration>
  191. </plugin>
  192. </plugins>
  193. </build>
  194. </profile>
  195. </profiles>
  196. </project>