Home » Eclipse Projects » P2 » Creating an Update Site(Update Sites with source bundles - there doesn't seem to be any official documentation)
Creating an Update Site [message #1638156] |
Fri, 27 February 2015 02:30 |
Marian Schedenig Messages: 18 Registered: July 2012 |
Junior Member |
|
|
For the past years I've been developing a handful of Eclipse plug-ins, which I distribute via an update site. I've never been entirely sure how to *correctly* manage an update site, but mostly mine has been working well enough, with the occasional hiccup now and then. However, I've once again hit a problem I can't seem to fix, and as a result I'm once again questioning my whole process. The main problem with all this is that there seems to be no useful documentation on update sites at all - or if there is, I haven't been able to find it.
My specific problem has to do with providing source code for extension plug-ins, but instead of focusing on that, I'll describe my overall deployment process, in the hope of once and for all getting it right. My main issue with the whole thing (to which I'll get back at the end of my description) is the generation of source features.
This is how I've been creating my update site for a few years:
I have several plug-ins, mostly unrelated (though there are a few dependencies). For each plug-in there's the plug-in project, a feature project and a German translation plug-in project with a matching feature project (I'm considering dropping these, as they're tedious to maintain and I rather doubt anyone is actually using them - I'm not using them myself). There's also a source feature project for the plug-in itself, though I'm no longer sure this is even necessary or correct (it's been working for me though - until now).
The source feature has the following lines in its build.properties file:
individualSourceBundles=true
generateSourceBundle=true
generate.plugin@name.schedenig.eclipse.grepconsole.source=name.schedenig.eclipse.grepconsole
For all these projects, I have two update site projects, one for the official update site (containing only release builds) and one for my own testing purposes, containing alphas, betas and release candidates so I can easily install them in my Eclipse instances at home at at work.
The update site has a category for each individual plug-in, which contains the features for the plug-in itself, the German translation and the source code. This looks like this in the site.xml:
<feature url="features/name.schedenig.eclipse.grepconsole_3.6.2.alpha1.jar" id="name.schedenig.eclipse.grepconsole" version="3.6.2.alpha1">
<category name="grepconsole"/>
</feature>
<feature url="features/name.schedenig.eclipse.grepconsole.german_3.6.2.alpha1.jar" id="name.schedenig.eclipse.grepconsole.german" version="3.6.2.alpha1">
<category name="grepconsole"/>
</feature>
<feature url="features/name.schedenig.eclipse.grepconsole.source_3.6.2.alpha1.jar" id="name.schedenig.eclipse.grepconsole.source" version="3.6.2.alpha1">
<category name="grepconsole"/>
</feature>
<category-def name="grepconsole" label="Grep Console">
<description>
Grep Console highlights console lines according to fully customisable regular expressions.
</description>
</category-def>
Whenever I want to deploy a new release (on the official update site) or a pre-release version (on my own private update site), I update the version numbers of all plug-ins and features, update them version number references in the site.xml and then click "Build all" in the Site Map tab of the site.xml file in the editor. This generates all the new jars for the features and plugins, and updated artfiacts.jar and content.jar files in my project in the file system. I then manually copy the new feature and plugin jars to my web server, and finally also the artifacts.jar, content.jar and site.xml, overwriting the three old files already on the server.
A long time ago I tried to figure out how to automate this for a headless console build, but without much success. I would like to have it, but as long as a button in Eclipse works, I can live with that.
(Incidentally, whenever something goes wrong - e.g. I mistype a version number reference and the build is missing a file - I have to update all the version numbers yet again to get Eclipse to produce any new artifacts. I understand that this is necessary for actual deployments, but for half-broken builds it's rather annoying).
This has been working resonably well, but now I added an extension point to one of my plug-ins and created two new plug-ins providing extensions for it. For some reason, I haven't been able to get the update site to build the source features for these new plug-ins, even though all my descriptor files seem to be consistent with my other projects where it's been working for years. Using Eclipse's "Export/Deployable features" wizard to export my plug-ins and features to the file system works, including sources (using "Generate source bundles") - but for that, I don't even need source features.
It seems clear to me that there's something very (or possibly entirely) wrong with the way I've been handling the generation of source artifacts, but somehow it's been working (until now), and all the (few) bits and pieces I've been able to dig up on this on the internet and in the Eclipse documentation make it work even less - and in fact rarely refer to update sites at all.
It would be VERY helpful if anyone can explain what I'm doing wrong and how to do it right, or even just point me in the direction of ANY reasonably up to date documentation for generating update sites with sources. Bonus points for hints on headless builds. But as long as it works, I'm happy either way.
Thanks in advance,
Marian.
|
|
|
Re: Creating an Update Site [message #1638936 is a reply to message #1638156] |
Fri, 27 February 2015 11:19 |
|
On 27/02/2015 03:30, Marian Schedenig wrote:
> A long time ago I tried to figure out how to automate this for a
> headless console build, but without much success. I would like to have
> it, but as long as a button in Eclipse works, I can live with that.
you might want to give headless building tools, such as Buckminster or
Maven/Tycho, another try :)
Everything will be much easier and automatic.
--
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
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
Re: Creating an Update Site [message #1641973 is a reply to message #1638936] |
Sat, 28 February 2015 22:08 |
Marian Schedenig Messages: 18 Registered: July 2012 |
Junior Member |
|
|
Thanks. I've had another look at Buckminster - without specific pointers, I wasn't even sure where to look amongst the dozens of Eclipse projects.
It leads me back to my original problem, though: Barely useful documentation. Once I found the right tutorials, it was pretty easy to setup a feature (with feature.xml and build.properties) that I can use to produce a P2 update site from within Eclipse. Easier to maintain than the old update site project, and much quicker at building, too.
However, I haven't been able to run a headless build so far. After more digging, I found some tutorials that explain how to install the headless version of Buckminster with the necessary features. But it fails to build my project:
$ ./buckminster -data ~/projects/java/workspaces/java perform -P ~/projects/java/workspaces/java/schedenig_p2_unstable/buckminster.properties name.schedenig.eclipse.p2.unstable#site.p2
No component named org.eclipse.ui:osgi.bundle is known to Buckminster
Google doesn't turn up anything useful for that error message.
There's some heavily in-depth documentation (mainly the BuckyBook) that might explain everything I need to know, but to be perfectly honest, it starts out with descriptions of so many terms and concepts that I don't even fully understand the scope of the whole thing (other than that it can do much more than I need). Surely headlessly building a simple update site for plug-ins is enough of a standard use case that one could expect some straightforward documentation for that specific scenario? I appreciate that the tool is powerful, but I don't want to learn an entire build tool - I'd like to keep the effort for publishing my plug-ins lower than that actual effort for developing them.
Is there anything that can guide me through this without having to read an entire book?
Thx!
|
|
| | | | |
Goto Forum:
Current Time: Thu Dec 12 16:50:49 GMT 2024
Powered by FUDForum. Page generated in 0.04378 seconds
|