|
28 | 28 |
|
29 | 29 | <scm> |
30 | 30 |
|
31 | | - <connection>scm:git:https:github.com/easy-4-java/${project.artifactId}.git</connection> |
32 | | - <developerConnection>scm:git:https:github.com/easy-4-java/${project.artifactId}.git</developerConnection> |
33 | | - <url>https:github.com/easy-4-java/${project.artifactId}</url> |
| 31 | + <connection>scm:git:https://github.com/easy-4-java/${project.artifactId}.git</connection> |
| 32 | + <developerConnection>scm:git:https://github.com/easy-4-java/${project.artifactId}.git</developerConnection> |
| 33 | + <url>https://github.com/easy-4-java/${project.artifactId}</url> |
34 | 34 | <tag>${project.artifactId}</tag> |
35 | 35 | </scm> |
36 | 36 |
|
|
168 | 168 | <version>${maven-surefire-plugin.version}</version> |
169 | 169 | <configuration> |
170 | 170 | <!-- 跳过单元测试 --> |
171 | | - <skip>true</skip> |
172 | | - <skipTests>true</skipTests> |
173 | 171 | <!-- forkMode 可设置值有 “never”, “once”, “always” 和 “pertest”。 pretest: |
174 | 172 | 每一个测试创建一个新进程,为每个测试创建新的JVM是单独测试的最彻底方式,但也是最慢的,不适合hudson上持续回归。 once:在一个进程中进行所有测试。once为默认设置,在Hudson上持续回归时建议使用默认设置。 |
175 | 173 | always:在一个进程中并行的运行脚本,Junit4.7以上版本才可以使用,surefire的版本要在2.6以上提供这个功能,其中 threadCount:执行时,指定可分配的线程数量。只和参数parallel配合使用有效。默认:5。 --> |
176 | 174 | <!--<forkMode>once</forkMode>--> |
177 | | - <argLine>-Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8</argLine> |
| 175 | + <argLine>${argLine} -Xmx1024m -Dfile.encoding=UTF-8</argLine> |
178 | 176 | <additionalClasspathElements> |
179 | 177 | <additionalClasspathElement>${basedir}/target/test-classes</additionalClasspathElement> |
180 | 178 | </additionalClasspathElements> |
181 | 179 | <includes> |
182 | 180 | <include>**/*Test.java</include> |
| 181 | + <include>**/*_Test.java</include> |
183 | 182 | </includes> |
184 | 183 | <excludes> |
185 | 184 | <exclude>**/TestBean.java</exclude> |
|
238 | 237 | <detectBuildFailures>true</detectBuildFailures> |
239 | 238 | </configuration> |
240 | 239 | </plugin> |
| 240 | + <!-- 中央仓库发布插件: 将制品发布至 Maven Central --> |
| 241 | + <!-- https://mvnrepository.com/artifact/org.sonatype.central/central-publishing-maven-plugin --> |
| 242 | + <plugin> |
| 243 | + <!-- 中央仓库发布插件: 将制品发布至 Maven Central --> |
| 244 | + <groupId>org.sonatype.central</groupId> |
| 245 | + <artifactId>central-publishing-maven-plugin</artifactId> |
| 246 | + <version>${maven-central-publishing-plugin.version}</version> |
| 247 | + <extensions>true</extensions> |
| 248 | + <configuration> |
| 249 | + <publishingServerId>central</publishingServerId> |
| 250 | + </configuration> |
| 251 | + </plugin> |
241 | 252 | </plugins> |
242 | 253 | </pluginManagement> |
243 | 254 | <plugins> |
244 | 255 | <!--环境检查插件:代码编译前的环境检查 --> |
245 | 256 | <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-enforcer-plugin --> |
| 257 | + |
| 258 | + <!-- 单元测试覆盖率插件: 强制要求 90% 覆盖率 --> |
| 259 | + <!-- https://mvnrepository.com/artifact/org.jacoco/jacoco-maven-plugin --> |
| 260 | + <plugin> |
| 261 | + <!-- 单元测试覆盖率插件: 强制要求 90% 覆盖率 --> |
| 262 | + <groupId>org.jacoco</groupId> |
| 263 | + <artifactId>jacoco-maven-plugin</artifactId> |
| 264 | + <version>${maven-jacoco-plugin.version}</version> |
| 265 | + <executions> |
| 266 | + <execution> |
| 267 | + <id>prepare-agent</id> |
| 268 | + <goals> |
| 269 | + <goal>prepare-agent</goal> |
| 270 | + </goals> |
| 271 | + </execution> |
| 272 | + <execution> |
| 273 | + <id>report</id> |
| 274 | + <phase>verify</phase> |
| 275 | + <goals> |
| 276 | + <goal>report</goal> |
| 277 | + </goals> |
| 278 | + </execution> |
| 279 | + <execution> |
| 280 | + <id>check</id> |
| 281 | + <phase>verify</phase> |
| 282 | + <goals> |
| 283 | + <goal>check</goal> |
| 284 | + </goals> |
| 285 | + <configuration> |
| 286 | + <haltOnFailure>true</haltOnFailure> |
| 287 | + <rules> |
| 288 | + <rule> |
| 289 | + <element>BUNDLE</element> |
| 290 | + <limits> |
| 291 | + <limit> |
| 292 | + <counter>LINE</counter> |
| 293 | + <value>COVEREDRATIO</value> |
| 294 | + <minimum>0.90</minimum> |
| 295 | + </limit> |
| 296 | + </limits> |
| 297 | + </rule> |
| 298 | + </rules> |
| 299 | + </configuration> |
| 300 | + </execution> |
| 301 | + </executions> |
| 302 | + </plugin> |
| 303 | + |
246 | 304 | <plugin> |
247 | 305 | <!-- 环境检查插件:代码编译前的环境检查 --> |
248 | 306 | <groupId>org.apache.maven.plugins</groupId> |
|
397 | 455 | <!-- 将制品 staging 至 OSS Sonatype Nexus --> |
398 | 456 | <groupId>org.sonatype.plugins</groupId> |
399 | 457 | <artifactId>nexus-staging-maven-plugin</artifactId> |
| 458 | + </plugin> <!-- https://mvnrepository.com/artifact/org.sonatype.central/central-publishing-maven-plugin --> |
| 459 | + <plugin> |
| 460 | + <!-- 中央仓库发布插件: 将制品发布至 Maven Central --> |
| 461 | + <groupId>org.sonatype.central</groupId> |
| 462 | + <artifactId>central-publishing-maven-plugin</artifactId> |
400 | 463 | </plugin> |
| 464 | + |
401 | 465 | </plugins> |
402 | 466 | </build> |
403 | 467 | </profile> |
|
424 | 488 | <maven-help-plugin.version>3.5.0</maven-help-plugin.version> |
425 | 489 | <maven-install-plugin.version>3.1.3</maven-install-plugin.version> |
426 | 490 | <maven-invoker-plugin.version>3.8.0</maven-invoker-plugin.version> |
| 491 | + <maven-jacoco-plugin.version>0.8.15</maven-jacoco-plugin.version> |
| 492 | + <maven-central-publishing-plugin.version>0.11.0</maven-central-publishing-plugin.version> |
427 | 493 | <maven-jar-plugin.version>3.4.2</maven-jar-plugin.version> |
428 | 494 | <maven-javadoc-plugin.version>3.8.0</maven-javadoc-plugin.version> |
429 | 495 | <maven-nexus-staging-plugin.version>1.7.0</maven-nexus-staging-plugin.version> |
|
0 commit comments