[go: up one dir, main page]

Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Using P2 outside eclipse/rcp application
Using P2 outside eclipse/rcp application [message #755937] Thu, 10 November 2011 09:19 Go to next message
Lars Briem is currently offline Lars BriemFriend
Messages: 22
Registered: June 2011
Junior Member
Hello,

at the moment I am maintaining an application with a swing GUI and no relation to eclipse or RCP. In this application I want to integrate an update mechanism to load different jar files from the web. These files have different versions and are updated very often.

Coming from different eclipse plug-in projects, I thought that p2 is a good way to do that. So I tried to find some articles or tutorials about this, but everything I found is related to eclipse or RCP applications.

Does anybody of you know how to use p2 outside of an eclipse/rcp application?

Greetings
Lars
Re: Using P2 outside eclipse/rcp application [message #755956 is a reply to message #755937] Thu, 10 November 2011 10:17 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Should be doable as long as it is OSGi based (if not, making your app
OSGi should not be very difficult). IIRC, the latest Equinox-book
(JeffMcAffer, ...) explains OSGi/p2 in action.

In a worst case scenario, you can always run p2 as an external updater,
managing something other than "itself".

Regards
- henrik

On 11/10/11 10:19 AM, Lars Briem wrote:
> Hello,
>
> at the moment I am maintaining an application with a swing GUI and no
> relation to eclipse or RCP. In this application I want to integrate an
> update mechanism to load different jar files from the web. These files
> have different versions and are updated very often.
>
> Coming from different eclipse plug-in projects, I thought that p2 is a
> good way to do that. So I tried to find some articles or tutorials about
> this, but everything I found is related to eclipse or RCP applications.
>
> Does anybody of you know how to use p2 outside of an eclipse/rcp
> application?
>
> Greetings
> Lars
Re: Using P2 outside eclipse/rcp application [message #755976 is a reply to message #755956] Thu, 10 November 2011 11:14 Go to previous messageGo to next message
Lars Briem is currently offline Lars BriemFriend
Messages: 22
Registered: June 2011
Junior Member
Thanks for your fast answer.

At the moment the software is not OSGi based and I think in the next time the software will not be ported to OSGi. So the worst case scenario which you described will be the preferred solution.

But how can I use p2 as an external updater and which jars do I need?
The only thing I found about this was the p2 director app. But in every case where the director app was used they updated an eclipse application and used the eclipse.exe as input for the director.
Re: Using P2 outside eclipse/rcp application [message #756067 is a reply to message #755976] Thu, 10 November 2011 18:21 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
p2 is a framework and there is plenty of opportunity to pick it
apart/asemble it a different way. It is essential to first understand
the parts and what they do.

The default packaging just happens to contain what is needed to install
into Eclipse and/or an OSGi runtime.

BTW: I think it is easier to convert your app to OSGi than to write the
required p2 logic to make it update and configure something else.

A way to start learning - try to figure out how to deliver a single file
on a specific place on users disk. Compare this to what the
corresponding logic for OSGi does when it installs a bundle. (Look at
the Touchpoints, and what you can do with them).

p2 has many concepts and learning curve is quite steep. I would
recommend searching for examples (like in the book I mentioned) and
other "server side p2" as they are free from many of the concerns in the
IDE.

Also Pascal's presentation IIRC "Customizing p2 for fun and profit" has
quite a lot of information.

Other than that, there is some (somewhat) dated material on the wiki,
and as always the source code....

Regards
- henrik

On 11/10/11 12:14 PM, Lars Briem wrote:
> Thanks for your fast answer.
>
> At the moment the software is not OSGi based and I think in the next
> time the software will not be ported to OSGi. So the worst case scenario
> which you described will be the preferred solution.
>
> But how can I use p2 as an external updater and which jars do I need?
> The only thing I found about this was the p2 director app. But in every
> case where the director app was used they updated an eclipse application
> and used the eclipse.exe as input for the director.
>
Re: Using P2 outside eclipse/rcp application [message #756223 is a reply to message #756067] Fri, 11 November 2011 15:03 Go to previous message
Lars Briem is currently offline Lars BriemFriend
Messages: 22
Registered: June 2011
Junior Member
The problem is solved. In a meeting with the project owner we decided to use osgi. So I searched a bit in the internet and books and finally I implemented a small test application. The way until the application was finished was not always easy. I think a small tutorial for this case would be nice. If I can reserve some time in the next weeks I will create one and post it in the wiki.
Previous Topic:Dropins feature not working in Helios RCP
Next Topic:Disable p2 garbage collector
Goto Forum:
  


Current Time: Thu Dec 12 18:49:30 GMT 2024

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

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

Back to the top