Class P2RepositoryManager
java.lang.Object
org.eclipse.tycho.p2maven.repository.P2RepositoryManager
Allows unique access to P2 repositories from maven
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddownloadArtifact(org.eclipse.equinox.p2.metadata.IInstallableUnit iu, org.eclipse.equinox.p2.repository.artifact.IArtifactRepository artifactRepository, OutputStream outputStream) org.eclipse.equinox.p2.repository.artifact.IArtifactRepositorygetArtifactRepository(org.apache.maven.model.Repository repository) Loads theIArtifactRepositoryfrom the givenRepository, this method does NOT check the type of the repository!org.eclipse.equinox.p2.repository.artifact.IArtifactRepositorygetArtifactRepository(org.eclipse.tycho.MavenRepositoryLocation repository) Loads theIArtifactRepositoryfrom the givenRepository, this method does NOT check the type of the repository!org.eclipse.equinox.p2.repository.artifact.IArtifactRepositorygetCompositeArtifactRepository(Collection<org.apache.maven.model.Repository> repositories) org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IInstallableUnit> getCompositeMetadataRepository(Collection<org.apache.maven.model.Repository> repositories) org.eclipse.equinox.p2.repository.metadata.IMetadataRepositorygetMetadataRepository(org.apache.maven.model.Repository repository) Loads theIMetadataRepositoryfrom the givenRepository, this method does NOT check the type of the repository!org.eclipse.equinox.p2.repository.metadata.IMetadataRepositorygetMetadataRepository(org.eclipse.tycho.MavenRepositoryLocation repository) Loads theIMetadataRepositoryfrom the givenRepository, this method does NOT check the type of the repository!
-
Constructor Details
-
P2RepositoryManager
public P2RepositoryManager()
-
-
Method Details
-
getArtifactRepository
public org.eclipse.equinox.p2.repository.artifact.IArtifactRepository getArtifactRepository(org.apache.maven.model.Repository repository) throws URISyntaxException, org.eclipse.equinox.p2.core.ProvisionException Loads theIArtifactRepositoryfrom the givenRepository, this method does NOT check the type of the repository!- Parameters:
repository-- Returns:
- the
IArtifactRepositoryfor the givenRepository - Throws:
URISyntaxException- ifRepositoryBase.getUrl()can not be converted into anURIorg.eclipse.equinox.p2.core.ProvisionException- if loading the repository failed
-
getArtifactRepository
public org.eclipse.equinox.p2.repository.artifact.IArtifactRepository getArtifactRepository(org.eclipse.tycho.MavenRepositoryLocation repository) throws org.eclipse.equinox.p2.core.ProvisionException Loads theIArtifactRepositoryfrom the givenRepository, this method does NOT check the type of the repository!- Parameters:
repository-- Returns:
- the
IArtifactRepositoryfor the givenRepository - Throws:
org.eclipse.equinox.p2.core.ProvisionException- if loading the repository failed
-
getCompositeArtifactRepository
public org.eclipse.equinox.p2.repository.artifact.IArtifactRepository getCompositeArtifactRepository(Collection<org.apache.maven.model.Repository> repositories) throws org.eclipse.equinox.p2.core.ProvisionException, URISyntaxException - Throws:
org.eclipse.equinox.p2.core.ProvisionExceptionURISyntaxException
-
getMetadataRepository
public org.eclipse.equinox.p2.repository.metadata.IMetadataRepository getMetadataRepository(org.apache.maven.model.Repository repository) throws URISyntaxException, org.eclipse.equinox.p2.core.ProvisionException Loads theIMetadataRepositoryfrom the givenRepository, this method does NOT check the type of the repository!- Parameters:
repository-- Returns:
- the
IMetadataRepositoryfor the givenRepository - Throws:
URISyntaxException- ifRepositoryBase.getUrl()can not be converted into anURIorg.eclipse.equinox.p2.core.ProvisionException- if loading the repository failed
-
getCompositeMetadataRepository
public org.eclipse.equinox.p2.query.IQueryable<org.eclipse.equinox.p2.metadata.IInstallableUnit> getCompositeMetadataRepository(Collection<org.apache.maven.model.Repository> repositories) throws org.eclipse.equinox.p2.core.ProvisionException, URISyntaxException - Throws:
org.eclipse.equinox.p2.core.ProvisionExceptionURISyntaxException
-
getMetadataRepository
public org.eclipse.equinox.p2.repository.metadata.IMetadataRepository getMetadataRepository(org.eclipse.tycho.MavenRepositoryLocation repository) throws org.eclipse.equinox.p2.core.ProvisionException Loads theIMetadataRepositoryfrom the givenRepository, this method does NOT check the type of the repository!- Parameters:
repository-- Returns:
- the
IMetadataRepositoryfor the givenRepository - Throws:
org.eclipse.equinox.p2.core.ProvisionException- if loading the repository failed
-
downloadArtifact
public void downloadArtifact(org.eclipse.equinox.p2.metadata.IInstallableUnit iu, org.eclipse.equinox.p2.repository.artifact.IArtifactRepository artifactRepository, OutputStream outputStream) throws IOException - Throws:
IOException
-