Class IndexedMavenRepository

  • All Implemented Interfaces:
    Repository

    public class IndexedMavenRepository
    extends aQute.bnd.osgi.repository.ResourcesRepository
    Provide an OSGi repository (a collection of Resources, see Repository), filled with resolved artifacts from given groupIds.
    • Field Summary

      • Fields inherited from interface org.osgi.service.repository.Repository

        URL
    • Constructor Summary

      Constructors 
      Constructor Description
      IndexedMavenRepository​(String name, List<URL> releaseUrls, List<URL> snapshotUrls, File localRepo, File indexDbDir, aQute.service.reporter.Reporter reporter, aQute.bnd.http.HttpClient client, boolean logIndexing)
      Create a new instance that uses the provided information/resources to perform its work.
    • Constructor Detail

      • IndexedMavenRepository

        public IndexedMavenRepository​(String name,
                                      List<URL> releaseUrls,
                                      List<URL> snapshotUrls,
                                      File localRepo,
                                      File indexDbDir,
                                      aQute.service.reporter.Reporter reporter,
                                      aQute.bnd.http.HttpClient client,
                                      boolean logIndexing)
                               throws Exception
        Create a new instance that uses the provided information/resources to perform its work.
        Parameters:
        name - the name
        releaseUrls - the release urls
        snapshotUrls - the snapshot urls
        localRepo - the local Maven repository (cache)
        indexDbDir - the persistent representation of this repository's content
        reporter - a reporter for reporting the progress
        client - an HTTP client for obtaining information from the Nexus server
        logIndexing - the log indexing
        Throws:
        Exception - the exception
    • Method Detail

      • name

        public final 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
      • logIndexing

        public boolean logIndexing()
        Returns true if indexing is to be logged.
        Returns:
        true, if indexing should be log
      • getOrCreateGroupRepository

        public MavenGroupRepository getOrCreateGroupRepository​(String groupId)
                                                        throws IOException
        Get or create the group repository for the given group id. If the repository is created, it is created as a repository for dependencies.
        Parameters:
        groupId - the group id
        Returns:
        the repository
        Throws:
        IOException - Signals that an I/O exception has occurred.
      • refresh

        public 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