Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Installing features during runtime
Installing features during runtime [message #1403610] Thu, 24 July 2014 15:02 Go to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 524
Registered: November 2009
Senior Member
Hello,

I am looking for a way to install features from my update site when product launches and specific conditions are met.

I've looked at possibility of provisioning p2 repository and using DirectorApplication directly. Do I understand correctly that if I need to to create p2 repository? But how can I do that on the fly from remote update site?

Using DirectorApplication I do:
DirectorApplication app = new DirectorApplication();
String[] args = new String[]{"-repository", "http://myRepo","-installIU", "myFeature.feature.feature.group", "-destination", "myDestination"};
app.run(args);


which seems to work, but I get into trouble during installation because of missing dependencies:
requires 'bundle org.eclipse.core.runtime 0.0.0' but it could not be found


Can anyone offer advice on how I should proceed? Is using DirectorApplication like that a correct way to go, even though it's in internal package?



Re: Installing features during runtime [message #1403730 is a reply to message #1403610] Fri, 25 July 2014 16:23 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1738
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 24/07/2014 17:02, Alex Kravets wrote:
> Hello,
>
> I am looking for a way to install features from my update site when
> product launches and specific conditions are met.
>
> I've looked at possibility of
> http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fp2_api_overview.htm
> and using DirectorApplication directly. Do I understand correctly that
> if I need to to create p2 repository? But how can I do that on the fly
> from remote update site?
> Using DirectorApplication I do:
>
> DirectorApplication app = new DirectorApplication();
> String[] args = new String[]{"-repository",
> "http://myRepo","-installIU", "myFeature.feature.feature.group",
> "-destination", "myDestination"};
> app.run(args);
>
>
> which seems to work, but I get into trouble during installation because
> of missing dependencies:
>
> requires 'bundle org.eclipse.core.runtime 0.0.0' but it could not be found
>
>
> Can anyone offer advice on how I should proceed? Is using
> DirectorApplication like that a correct way to go, even though it's in
> internal package?

Hi

as far as I know, when the director installs features it first computes
a plan and tries to solve all the dependencies; I think in your case the
remote update site does not provide all the requirements (that's quite
usual, that's why in Eclipse it's better to check "Contact all update
sites" when installing features from a remote update site).

You should add all the repositories in the string "http://myRepo"
separated by commas; I guess just putting the main Kepler, Luna (or
whatever Eclipse version you're targetting) should be enough.

Hope this helps
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Re: Installing features during runtime [message #1403734 is a reply to message #1403610] Fri, 25 July 2014 17:05 Go to previous message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 524
Registered: November 2009
Senior Member
Thanks Lorenzo, this works!
Previous Topic:Open Folder Quickly
Next Topic:can't create "New android project"
Goto Forum:
  


Current Time: Sun Dec 17 00:09:29 GMT 2017

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

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