return pomDetails;
}
@Override
public String resolvePackageVersion(String packageName) {
DependencyTree dependency = resolvePackageDependency(packageName);
if (dependency != null) {
// lets find the export packages and use the version from that
if (dependency.isBundle()) {
String exportPackages = dependency.getManifestEntry("Export-Package");
if (notEmpty(exportPackages)) {
Parameters values = new Analyzer().parseHeader(exportPackages);
Map<String, String> map = values.get(packageName);
if (map != null) {
String version = map.get("version");
if (version == null) {
version = map.get("specification-version");
}
if (version != null) {
return toVersionRange(version);
}
}
}
}
String version = dependency.getVersion();
if (version != null) {
// lets convert to OSGi
String osgiVersion = VersionCleaner.clean(version);
return toVersionRange(osgiVersion);
}