[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Installation bundles in non-standard location

On Wed, 2013-07-03 at 15:20 +0000, Pascal Rapicault wrote:
> The IU that represent the actual bundle that needs to be installed needs to have an artifact and this artifacts needs to be found a local repository.
> Is it your case?
I stole the artifact repo loading code from dropins:
public static IArtifactRepository loadArtifactRepository(URI location,
IProgressMonitor monitor) throws ProvisionException {
	IArtifactRepositoryManager manager = (IArtifactRepositoryManager)
getAgent().getService(IArtifactRepositoryManager.SERVICE_NAME);
	if (manager == null)
		throw new IllegalStateException("ArtifactRepositoryManager not
registered."); //$NON-NLS-1$
	IArtifactRepository repository = manager.loadRepository(location,
monitor);
	manager.setRepositoryProperty(location, IRepository.PROP_SYSTEM,
String.valueOf(true));
	return repository;
}



the file.name property seems to be coming from directorywatcher,
EntryAdvice class (it looks like dropins have repo per bundle). This is
something that I don't have and I'm wondering if I need to copy that,
too.



-- 
Krzysztof Daniel <kdaniel@xxxxxxxxxx>
Red Hat