ModuleDefinition moduleDef = new MavenModuleDefinition(repo, location);
ModuleDependencyAnalyser analyser = new ModuleDependencyAnalyser(moduleDef, repo);
if (excludedPatterns!=null) {
analyser.excludePatterns(excludedPatterns);
}
if (!analyser.analyse()) {
String msg = "Missing dependency. See details below:\n" + analyser.getResultAsString();
if (failOnVerificationError) {
throw new MojoExecutionException(msg);
} else {
logger.logp(Level.WARNING, "DependencyAnalyserMojo", "execute", msg);