use of org.eclipse.tycho.ArtifactKey in project tycho by eclipse.
the class IUXmlTransformer method replaceQualifierInRequirements.
public void replaceQualifierInRequirements(IU iu, TargetPlatform targetPlatform) throws MojoFailureException {
List<Element> requirements = iu.getRequiredCapabilites();
if (requirements == null)
return;
for (Element req : requirements) {
String range = req.getAttributeValue(IU.RANGE);
if (range != null && range.endsWith(".qualifier") && IU.P2_IU_NAMESPACE.equals(req.getAttributeValue(IU.NAMESPACE))) {
ArtifactKey artifact = resolveRequirementReference(targetPlatform, req.getAttributeValue(IU.NAME), range, req.toString());
req.setAttribute(IU.RANGE, artifact.getVersion());
}
}
}
Aggregations