use of org.eclipse.tycho.p2.target.facade.TargetDefinition.InstallableUnitLocation in project tycho by eclipse.
the class TargetDefinitionResolver method resolveContentWithExceptions.
TargetDefinitionContent resolveContentWithExceptions(TargetDefinition definition) throws TargetDefinitionSyntaxException, TargetDefinitionResolutionException, ResolverException {
List<URI> artifactRepositories = new ArrayList<>();
ResolverRun resolverRun = new ResolverRun();
for (Location locationDefinition : definition.getLocations()) {
if (locationDefinition instanceof InstallableUnitLocation) {
resolverRun.addLocation((InstallableUnitLocation) locationDefinition);
for (Repository repository : ((InstallableUnitLocation) locationDefinition).getRepositories()) {
artifactRepositories.add(repository.getLocation());
}
} else {
logger.warn("Target location type '" + locationDefinition.getTypeDescription() + "' is not supported");
}
}
if (definition.hasIncludedBundles()) {
// the bundle selection list is currently not taken into account (see bug 373776)
logger.warn("De-selecting bundles in a target definition file is not supported. See http://wiki.eclipse.org/Tycho_Messages_Explained#Target_File_Include_Bundles for alternatives.");
}
return new TargetDefinitionContent(resolverRun.resolve(), artifactRepositories);
}
Aggregations