Class LocalMavenBackedOsgiRepository

  • All Implemented Interfaces:
    Repository
    Direct Known Subclasses:
    NexusSearchOsgiRepository

    public abstract class LocalMavenBackedOsgiRepository
    extends aQute.bnd.osgi.repository.ResourcesRepository
    Provide an OSGi repository (a collection of Resources, see Repository), filled with the results from recursively resolving an initial set of artifacts.

    The resources in this repository are maintained in a local maven repository.

    • Constructor Detail

      • LocalMavenBackedOsgiRepository

        public LocalMavenBackedOsgiRepository​(String name,
                                              File obrIndexFile)
                                       throws Exception
        Create a new instance that uses the provided information/resources to perform its work.
        Parameters:
        name - the name
        obrIndexFile - the persistent representation of this repository's content
        Throws:
        Exception - if a problem occurs
    • Method Detail

      • name

        public String name()
        Return the name of this repository.
        Returns:
        the name;
      • location

        public final File location()
        Return the representation of this repository in the local file system.
        Returns:
        the location
      • refresh

        public abstract boolean refresh()
                                 throws Exception
        Refresh this repository's content.
        Returns:
        true if refreshed, false if not refreshed possibly due to error
        Throws:
        Exception - if a problem occurs
      • refresh

        public boolean refresh​(aQute.maven.provider.MavenRepository mavenRepository,
                               Collection<? extends aQute.maven.api.Revision> startArtifacts)
                        throws Exception
        Refresh this repository's content.
        Parameters:
        mavenRepository - the maven repository
        startArtifacts - the collection of artifacts to start with
        Returns:
        true if refreshed, false if not refreshed possibly due to error
        Throws:
        Exception - if a problem occurs