if ("test".equals(scope)) {
// don't test this for "test" dependencies...
return;
}
// get the projects manager for this dependency
MavenProjectsManager manager = MavenProjectsManager.getInstance(xmltag.getProject());
// try to resolve the jar file
File artifactFile = MavenArtifactUtil
.getArtifactFile(manager.getLocalRepository(), dependency.getGroupId().getStringValue(),
dependency.getArtifactId().getStringValue(),
dependency.getVersion().getStringValue(), "jar");
if (artifactFile.exists() && !CachingBundleInfoProvider.isBundle(artifactFile.getPath())) {
problemsHolder.registerProblem(xmltag, "Dependency is not OSGi-ready", new FindOsgiCapableMavenDependencyQuickFix());
}