|
30 | 30 | <wagon.version>2.2</wagon.version> |
31 | 31 | <gmaven.provider.selection>2.0</gmaven.provider.selection> |
32 | 32 | <groovy.version>3.0.7</groovy.version> |
33 | | - |
34 | | - <clover.version>3.3.0</clover.version> |
35 | | - <clover.license>/private/reficio/clover.license</clover.license> |
| 33 | + <jacoco.version>0.8.7</jacoco.version> |
36 | 34 | </properties> |
37 | 35 |
|
38 | 36 | <licenses> |
|
362 | 360 | <executions> |
363 | 361 | <execution> |
364 | 362 | <goals> |
| 363 | + <goal>addSources</goal> <!-- important for jacoco that it recognizes to measure the coverage of classes in src/main/groovy--> |
| 364 | + <goal>addTestSources</goal> <!-- important for jacoco that it recognizes to use tests in src/test/groovy for coverage measuring--> |
| 365 | + <goal>compile</goal> |
365 | 366 | <goal>generateStubs</goal> |
366 | 367 | <goal>compile</goal> |
367 | 368 | <goal>generateTestStubs</goal> |
|
401 | 402 | </excludes> |
402 | 403 | </configuration> |
403 | 404 | </plugin> |
| 405 | + <plugin> |
| 406 | + <groupId>org.jacoco</groupId> |
| 407 | + <artifactId>jacoco-maven-plugin</artifactId> |
| 408 | + <version>${jacoco.version}</version> |
| 409 | + <executions> |
| 410 | + <execution> |
| 411 | + <goals> |
| 412 | + <goal>prepare-agent</goal> <!-- add javaagent to surefire's test run --> |
| 413 | + </goals> |
| 414 | + </execution> |
| 415 | + </executions> |
| 416 | + </plugin> |
404 | 417 | <plugin> |
405 | 418 | <groupId>com.mycila</groupId> |
406 | 419 | <artifactId>license-maven-plugin</artifactId> |
|
419 | 432 | <excludes> |
420 | 433 | <exclude>target/**</exclude> |
421 | 434 | <exclude>**/resources/**</exclude> |
422 | | - <exclude>.clover/**</exclude> |
423 | 435 | <exclude>.dependabot/**</exclude> |
424 | 436 | </excludes> |
425 | 437 | <useDefaultExcludes>true</useDefaultExcludes> |
|
602 | 614 | </build> |
603 | 615 | </profile> |
604 | 616 |
|
605 | | - <profile> |
606 | | - <id>clover</id> |
607 | | - <build> |
608 | | - <plugins> |
609 | | - <plugin> |
610 | | - <groupId>com.atlassian.maven.plugins</groupId> |
611 | | - <artifactId>maven-clover2-plugin</artifactId> |
612 | | - <version>${clover.version}</version> |
613 | | - <executions> |
614 | | - <execution> |
615 | | - <id>clover</id> |
616 | | - </execution> |
617 | | - </executions> |
618 | | - <configuration> |
619 | | - <generateHtml>true</generateHtml> |
620 | | - <generateXml>true</generateXml> |
621 | | - <excludes> |
622 | | - <exclude>**/Logger.java</exclude> |
623 | | - </excludes> |
624 | | - <licenseLocation>${clover.license}</licenseLocation> |
625 | | - </configuration> |
626 | | - </plugin> |
627 | | - </plugins> |
628 | | - </build> |
629 | | - </profile> |
630 | | - |
631 | 617 | <profile> |
632 | 618 | <id>release</id> |
633 | 619 | <build> |
|
683 | 669 |
|
684 | 670 | <profile> |
685 | 671 | <id>it</id> |
| 672 | + <properties> |
| 673 | + <!-- Enable recording of coverage during execution of maven-invoker-plugin --> |
| 674 | + <jacoco.propertyName>invoker.mavenOpts</jacoco.propertyName> |
| 675 | + <jacoco.includes>org.reficio.p2.*</jacoco.includes> |
| 676 | + </properties> |
686 | 677 | <build> |
687 | 678 | <plugins> |
688 | 679 | <plugin> |
|
711 | 702 | <localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath> |
712 | 703 | <preBuildHookScript>setup.groovy</preBuildHookScript> |
713 | 704 | <postBuildHookScript>validate.groovy</postBuildHookScript> |
| 705 | + <extraArtifacts> |
| 706 | + <extraArtifact>org.jacoco:org.jacoco.agent:${jacoco.version}:jar:runtime</extraArtifact> |
| 707 | + </extraArtifacts> |
714 | 708 | <scriptVariables> |
715 | 709 | <originalLocalRepository>${settings.localRepository}</originalLocalRepository> |
716 | 710 | </scriptVariables> |
|
807 | 801 | </reportSet> |
808 | 802 | </reportSets> |
809 | 803 | </plugin> |
810 | | - <plugin> |
811 | | - <groupId>com.atlassian.maven.plugins</groupId> |
812 | | - <artifactId>maven-clover2-plugin</artifactId> |
813 | | - <configuration> |
814 | | - <generateHtml>true</generateHtml> |
815 | | - <generateXml>true</generateXml> |
816 | | - <excludes> |
817 | | - <exclude>**/Logger.java</exclude> |
818 | | - </excludes> |
819 | | - <licenseLocation>${clover.license}</licenseLocation> |
820 | | - </configuration> |
821 | | - </plugin> |
822 | 804 | </plugins> |
823 | 805 | </reporting> |
824 | 806 |
|
|
0 commit comments