Search in sources :

Example 61 with RepositoryPlugin

use of aQute.bnd.service.RepositoryPlugin in project bnd by bndtools.

the class AetherRepsitoryTests method testVersionsBadBsn.

public void testVersionsBadBsn() throws Exception {
    RepositoryPlugin repo = createRepo();
    SortedSet<Version> versions = repo.versions("foo.bar.foobar");
    assertNull(versions);
}
Also used : Version(aQute.bnd.version.Version) RepositoryPlugin(aQute.bnd.service.RepositoryPlugin)

Example 62 with RepositoryPlugin

use of aQute.bnd.service.RepositoryPlugin in project bndtools by bndtools.

the class RepositoryBundlesContentProvider method getChildren.

@Override
public Object[] getChildren(Object parentElement) {
    RepositoryPlugin repoPlugin = (RepositoryPlugin) parentElement;
    List<String> bsns;
    try {
        bsns = repoPlugin.list(null);
    } catch (Exception e) {
        logger.logError("Error querying repository " + repoPlugin.getName(), e);
        bsns = Collections.emptyList();
    }
    return bsns.toArray(new String[0]);
}
Also used : RepositoryPlugin(aQute.bnd.service.RepositoryPlugin)

Aggregations

RepositoryPlugin (aQute.bnd.service.RepositoryPlugin)62 Version (aQute.bnd.version.Version)25 File (java.io.File)24 Workspace (aQute.bnd.build.Workspace)12 IOException (java.io.IOException)10 Project (aQute.bnd.build.Project)9 ArrayList (java.util.ArrayList)9 HashMap (java.util.HashMap)9 Jar (aQute.bnd.osgi.Jar)7 CoreException (org.eclipse.core.runtime.CoreException)7 RemoteRepositoryPlugin (aQute.bnd.service.RemoteRepositoryPlugin)5 VersionRange (aQute.bnd.version.VersionRange)5 Description (aQute.lib.getopt.Description)5 Parameters (aQute.bnd.header.Parameters)4 WorkspaceJob (org.eclipse.core.resources.WorkspaceJob)4 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)4 IStatus (org.eclipse.core.runtime.IStatus)4 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)4 PartInitException (org.eclipse.ui.PartInitException)4 Attrs (aQute.bnd.header.Attrs)3