public static List<Resource> copyResources(AbstractIndexedRepo sourceRepo, AbstractIndexedRepo targetRepo, String bsn, String version) throws Exception {
return copyResources(sourceRepo, targetRepo, bsn, version, "*");
}
public static List<Resource> copyResources(AbstractIndexedRepo sourceRepo, AbstractIndexedRepo targetRepo, String bsn, String version, String type) throws Exception {
Requirement requirement = new CapReqBuilder("osgi.identity")
.addDirective("filter", String.format("(&(osgi.identity=%s)(version=%s)(type=%s))", bsn, version, type))
.buildSyntheticRequirement();
return copyResources(sourceRepo, targetRepo, requirement);
}