|
73 | 73 | <exec-maven-plugin.version>3.6.3</exec-maven-plugin.version> |
74 | 74 | <flatten-maven-plugin.version>1.7.3</flatten-maven-plugin.version> |
75 | 75 | <google-java-style.version>1.32.0</google-java-style.version> |
| 76 | + <jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version> |
76 | 77 | <maven-assembly-plugin.version>3.8.0</maven-assembly-plugin.version> |
77 | 78 | <maven-clean-plugin.version>3.5.0</maven-clean-plugin.version> |
78 | 79 | <maven-compiler-plugin.version>3.14.1</maven-compiler-plugin.version> |
|
213 | 214 | but `site:stage` works. |
214 | 215 | --> |
215 | 216 | <id>unicode-org.github.io</id> |
216 | | - <url>scp://https://unicode-org.github.io/</url> |
| 217 | + <url>https://unicode-org.github.io/</url> |
217 | 218 | </site> |
218 | 219 | <repository> |
219 | 220 | <id>central</id> |
|
579 | 580 | <configuration> |
580 | 581 | <rulesets> |
581 | 582 | <!-- Hand-picked rules --> |
582 | | - <ruleset>tools/pmd/src/main/resources/icu4j/pmd-ruleset.xml</ruleset> |
| 583 | + <ruleset>icu4j/tools/pmd/src/main/resources/icu4j/pmd-ruleset.xml</ruleset> |
583 | 584 | <!-- Uncomment the block below to enable all known checks. |
584 | 585 | All of these rulesets can be specified in pmd-ruleset.xml instead. |
585 | 586 | --> |
|
621 | 622 | </java> |
622 | 623 | </configuration> |
623 | 624 | </plugin> |
| 625 | + <plugin> |
| 626 | + <groupId>org.jacoco</groupId> |
| 627 | + <artifactId>jacoco-maven-plugin</artifactId> |
| 628 | + <version>${jacoco-maven-plugin.version}</version> |
| 629 | + </plugin> |
624 | 630 | </plugins> |
625 | 631 | </pluginManagement> |
626 | 632 |
|
|
805 | 811 | </reporting> |
806 | 812 | </profile> |
807 | 813 |
|
| 814 | + <profile> |
| 815 | + <!-- |
| 816 | + Generating a merged report, see https://www.eclemma.org/jacoco/trunk/doc/cli.html |
| 817 | + The result can be inspected starting from target/jacocoreport/html/index.html |
| 818 | + Execute these commands in cli, in the root of the ICU repo: |
| 819 | +
|
| 820 | + mvn clean install site site:stage -P coverage |
| 821 | +
|
| 822 | + rm -fr target/jacoco |
| 823 | +
|
| 824 | + mvn dependency:copy \ |
| 825 | + -Dartifact=org.jacoco:jacoco:LATEST:zip \ |
| 826 | + -DoutputDirectory=target/jacoco \ |
| 827 | + -Dmdep.stripVersion=true \ |
| 828 | + -q -ntp |
| 829 | +
|
| 830 | + unzip -q target/jacoco/jacoco.zip -d target/jacoco |
| 831 | +
|
| 832 | + java -jar target/jacoco/lib/jacococli.jar report \ |
| 833 | + icu4j/main/core/target/jacoco.exec \ |
| 834 | + icu4j/main/collate/target/jacoco.exec \ |
| 835 | + icu4j/main/common_tests/target/jacoco.exec \ |
| 836 | + icu4j/main/framework/target/jacoco.exec \ |
| 837 | + icu4j/main/translit/target/jacoco.exec \ |
| 838 | + icu4j/main/charset/target/jacoco.exec \ |
| 839 | + \-\-classfiles icu4j/main/core/target/core-79.0.1-SNAPSHOT.jar \ |
| 840 | + \-\-classfiles icu4j/main/collate/target/collate-79.0.1-SNAPSHOT.jar \ |
| 841 | + \-\-classfiles icu4j/main/currdata/target/currdata-79.0.1-SNAPSHOT.jar \ |
| 842 | + \-\-classfiles icu4j/main/langdata/target/langdata-79.0.1-SNAPSHOT.jar \ |
| 843 | + \-\-classfiles icu4j/main/regiondata/target/regiondata-79.0.1-SNAPSHOT.jar \ |
| 844 | + \-\-classfiles icu4j/main/translit/target/translit-79.0.1-SNAPSHOT.jar \ |
| 845 | + \-\-classfiles icu4j/main/charset/target/icu4j-charset-79.0.1-SNAPSHOT.jar \ |
| 846 | + \-\-sourcefiles icu4j/main/core/src/main/java \ |
| 847 | + \-\-sourcefiles icu4j/main/collate/src/main/java \ |
| 848 | + \-\-sourcefiles icu4j/main/currdata/src/main/java \ |
| 849 | + \-\-sourcefiles icu4j/main/langdata/src/main/java \ |
| 850 | + \-\-sourcefiles icu4j/main/regiondata/src/main/java \ |
| 851 | + \-\-sourcefiles icu4j/main/translit/src/main/java \ |
| 852 | + \-\-sourcefiles icu4j/main/charset/src/main/java \ |
| 853 | + \-\-encoding utf-8 \ |
| 854 | + \-\-csv target/jacocoreport/jacoco.csv \ |
| 855 | + \-\-xml target/jacocoreport/jacoco.xml \ |
| 856 | + \-\-html target/jacocoreport/html |
| 857 | + --> |
| 858 | + <id>coverage</id> |
| 859 | + <build> |
| 860 | + <plugins> |
| 861 | + <plugin> |
| 862 | + <groupId>org.jacoco</groupId> |
| 863 | + <artifactId>jacoco-maven-plugin</artifactId> |
| 864 | + <executions> |
| 865 | + <execution> |
| 866 | + <goals> |
| 867 | + <goal>prepare-agent</goal> |
| 868 | + </goals> |
| 869 | + </execution> |
| 870 | + <execution> |
| 871 | + <id>report</id> |
| 872 | + <phase>verify</phase> |
| 873 | + <goals> |
| 874 | + <goal>report-aggregate</goal> |
| 875 | + </goals> |
| 876 | + <configuration> |
| 877 | + <dataFileIncludes> |
| 878 | + <dataFileInclude>**/jacoco.exec</dataFileInclude> |
| 879 | + </dataFileIncludes> |
| 880 | + </configuration> |
| 881 | + </execution> |
| 882 | + </executions> |
| 883 | + </plugin> |
| 884 | + </plugins> |
| 885 | + </build> |
| 886 | + </profile> |
| 887 | + |
808 | 888 | </profiles> |
809 | 889 |
|
810 | 890 | </project> |
0 commit comments