Search in sources :

Example 1 with ResourceInfo

use of aQute.bnd.osgi.repository.BridgeRepository.ResourceInfo in project bnd by bndtools.

the class BndPomRepository method get.

@Override
public File get(String bsn, Version version, Map<String, String> properties, DownloadListener... listeners) throws Exception {
    init();
    ResourceInfo resource = bridge.getInfo(bsn, version);
    if (resource == null)
        return null;
    String name = resource.getInfo().name();
    Archive archive = Archive.valueOf(name);
    Promise<File> p = repoImpl.getMavenRepository().get(archive);
    if (listeners.length == 0)
        return p.getValue();
    new DownloadListenerPromise(reporter, name + ": get " + bsn + ";" + version, p, listeners);
    return repoImpl.getMavenRepository().toLocalFile(archive);
}
Also used : ResourceInfo(aQute.bnd.osgi.repository.BridgeRepository.ResourceInfo) Archive(aQute.maven.api.Archive) DownloadListenerPromise(aQute.bnd.util.repository.DownloadListenerPromise) File(java.io.File)

Aggregations

ResourceInfo (aQute.bnd.osgi.repository.BridgeRepository.ResourceInfo)1 DownloadListenerPromise (aQute.bnd.util.repository.DownloadListenerPromise)1 Archive (aQute.maven.api.Archive)1 File (java.io.File)1