for( OsgiDependency osgiDependency : plugin.getRequiredBundles() ) {
OsgiBundle osgiPlugin = repository.resolveDependency( osgiDependency );
if( osgiPlugin == null ) {
// TODO Handle not found dependencies. For the moment ignoring is sufficient.
} else {
MavenDependencyBuilder dependencyBuilder = artefactBuilder.addDependency();
dependencyBuilder.setArtefactId( createArtifactName( osgiPlugin.getName() ) );
dependencyBuilder.setGroupId( createGroupId( osgiPlugin.getName() ) );
// VersionRange versionRange =
// osgiDependency.getVersionRange();
dependencyBuilder.setVersionRange( createMavenVersion( osgiPlugin.getVersion() ),
true,
createMavenVersion( osgiPlugin.getVersion() ),
true );
dependencyBuilder.build();
}
}
artefactBuilder.build();
}