Class IndexedMavenRepository
- java.lang.Object
-
- aQute.bnd.osgi.repository.BaseRepository
-
- aQute.bnd.osgi.repository.ResourcesRepository
-
- de.mnl.osgi.bnd.repository.maven.idxmvn.IndexedMavenRepository
-
- All Implemented Interfaces:
Repository
public class IndexedMavenRepository extends aQute.bnd.osgi.repository.ResourcesRepository
Provide an OSGi repository (a collection ofResource
s, seeRepository
), 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MavenGroupRepository
getOrCreateGroupRepository(String groupId)
Get or create the group repository for the given group id.File
location()
Return the representation of this repository in the local file system.boolean
logIndexing()
Returns true if indexing is to be logged.MavenResourceRepository
mavenRepository()
Return the Maven repository object used to implements this repository.String
name()
Return the name of this repository.boolean
refresh()
Refresh this repository's content.-
Methods inherited from class aQute.bnd.osgi.repository.ResourcesRepository
add, addAll, findProvider, findProviders, getResources, set, toCapabilities, toResourcesRepository, toString
-
-
-
-
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 namereleaseUrls
- the release urlssnapshotUrls
- the snapshot urlslocalRepo
- the local Maven repository (cache)indexDbDir
- the persistent representation of this repository's contentreporter
- a reporter for reporting the progressclient
- an HTTP client for obtaining information from the Nexus serverlogIndexing
- the log indexing- Throws:
Exception
- the exception
-
-
Method Detail
-
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
-
mavenRepository
public MavenResourceRepository mavenRepository()
Return the Maven repository object used to implements this repository.- Returns:
- the repository
-
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.
-
-