<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<check>
<haltOnFailure>false</haltOnFailure>
<totalLineRate>85</totalLineRate>
</check>
<formats>
<format>html</format>
<format>xml</format>
</formats>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>cobertura</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<formats>
<format>xml</format>
</formats>
</configuration>
</plugin>
необходимо проверить, указан ли тег "format" со значением "xml" в файле pom для плагина cobertura. попытался проанализировать файл xml в bash
temp= $(grep -n -oP '(?<=<format>)[^<]+' pom.xml)
, при этом возвращается все значение с тегом, включая html, xml. Как разобрать этот файл и проверить?