From 6d733018782e1c140127fd53ecf5127af4736b46 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Fri, 19 Aug 2022 08:20:34 -0500 Subject: [PATCH] Add -n to xpath for reporting jacoco coverage --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f1436792..ea1003a4 100644 --- a/pom.xml +++ b/pom.xml @@ -261,7 +261,7 @@ echo "------------------------------------------------------------" which xpath > /dev/null 2>&1 if [ "$?" == "0" ]; then echo "Element\nInstructions Missed\nInstruction Coverage\nBranches Missed\nBranch Coverage\nComplexity Missed\nComplexity Hit\nLines Missed\nLines Hit\nMethods Missed\nMethods Hit\nClasses Missed\nClasses Hit\n" > /tmp/$$.headers - xpath -q -e '/html/body/table/tfoot/tr[1]/td/text()' target/site/jacoco/index.html > /tmp/$$.values + xpath -n -q -e '/html/body/table/tfoot/tr[1]/td/text()' target/site/jacoco/index.html > /tmp/$$.values paste /tmp/$$.headers /tmp/$$.values | tail +2 | awk -v FS='\t' '{printf("%-20s %s\n",$1,$2)}' rm /tmp/$$.headers /tmp/$$.values else