Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Running p2 director and p2 mirrorapp in commandline
Running p2 director and p2 mirrorapp in commandline [message #1109060] Sat, 14 September 2013 21:21
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi,

The background is, that I think I have no os dependend things in my application (e.g. no swt) - while it's a simple uiless commandline app. But if I want to create an eclipse product with a headless plugin in it, eclipse generates some os dependend runners. So i think I have to export a product for every os.
But I simply want to have one app at all.

So I want to run both director application and mirror application of p2 in commandline.
Does this work? What do I need?
Or do you have another suggestion to solve my problem?

16.09. - additional info:

I googled a bit and one some posts.
I try it in the following way:


Framework framework = frameworkFactory.newFramework(config);
framework.start();
BundleContext context = framework.getBundleContext();

.... than install all my bundles, that I need

.... and then start them

ServiceReference providerRef = framework.getBundleContext().getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
if (providerRef == null) {
throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
}
IProvisioningAgentProvider provider = (IProvisioningAgentProvider) context.getService(providerRef);
if (provider == null) {
throw new RuntimeException("No provisioning agent provider is available"); //$NON-NLS-1$
}


But my problem is, that there seems to be any service of type IProvisioningAgentProvider.SERVICE_NAME available since providerRef == null

Can you please give me a hint if I'm on the right way and how this service is started, so I can get a reference?

Thanks a lot


Best regards
Markus

[Updated on: Sun, 15 September 2013 22:12]

Report message to a moderator

Previous Topic:[p2] List IUs of installation plan
Next Topic:Adding p2/Equinox to existing Eclipse client
Goto Forum:
  


Current Time: Fri Apr 26 10:45:31 GMT 2024

Powered by FUDForum. Page generated in 0.02684 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top