[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] P2 based installer that installs into an alternate location

Hi,
I'm trying to create a p2 based installer that installs into a location that is different from its own agent location (I want to be able to run it from within an Eclipse IDE). I've done some experimenting with starting and stopping services but it just doesn't seem doable. Among other things I hit this piece of code in the SurrogateProfileHandler:


private synchronized SimpleProfileRegistry getProfileRegistry() {
if (profileRegistry == null) {
String installArea = EngineActivator.getContext().getProperty(OSGI_INSTALL_AREA);
try {
URL registryURL = new URL(installArea + P2_ENGINE_DIR + SimpleProfileRegistry.DEFAULT_STORAGE_DIR);
File sharedRegistryDirectory = new File(registryURL.getPath());
profileRegistry = new SimpleProfileRegistry(sharedRegistryDirectory, null, false);
} catch (MalformedURLException e) {
//this is not possible because we know the above URL is valid
}
}
return profileRegistry;
}


Why does it base the 'installArea' on the OSGI_INSTALL_AREA here? Why isn't the 'eclipse.p2.data.area' used?

- thomas