in src/main/java/org/apache/maven/plugins/verifier/VerifierMojo.java [151:170]
private boolean verifyFileContent(
org.apache.maven.plugins.verifier.model.File fileCheck, VerificationResult results) throws IOException {
boolean result = false;
getLog().debug("Verifying contents of " + fileCheck.getLocation());
Pattern pattern = Pattern.compile(fileCheck.getContains());
// Note: Very inefficient way as we load the whole file in memory. If you have a better
// idea, please submit it!
Matcher matcher = pattern.matcher(FileUtils.fileRead(new File(fileCheck.getLocation())));
if (matcher.find()) {
result = true;
} else {
results.addContentFailure(fileCheck);
}
return result;
}