The Eclipse update site at http://findbugs.cs.umd.edu/eclipse/ is still an old-style (non-p2, pre-3.4) Eclipse update site.
The "Install New Software" dialog still can cope with the old style, but many modern build tools like Tycho lack the compatibility layer, which makes it hard to consume the update site in one's build, e.g., when writing a FindBugs plugin.
(See http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fp2_publisher.html for information how to generate the necessary metadata files for a new-style update site with Ant.)
We have no time to work on this.
Feel free to provide such patched ant script, contribution is welcome.
Regards,
Andrey
Hi Andrey. Fair enough.
Can you give me a bit more information about how you guys run your build scripts, so I can try to provide a patch?
Is the Tycho build (findbugs-eclipse/pom.xml) actually used for something? (Tycho is really great at assembly p2-style update site.) Or is everything done with good old Ant?
... everything is done with the good old Ant. Check the build.xml files in findbugs and findBugsEclipsePlugin directories.
CU
Andrey
Good old Ant? While I am much more familiar with Maven, I have pieced together a patch (attached) that uses the p2 features-and-bundles publisher.
There are still a few caveats:
The build now produces three update sites:
eclipsePlugin/bin_build/site/daily
eclipsePlugin/bin_build/site/candidate
eclipsePlugin/bin_build/site/release
The exact location of the three sites is different than before (the two former update sites are no longer in a nested directory of the latter). This may require some changes to your deployment scripts.
Also, the way I convert
${site.dir}
into afile
URI may not work on Windows, where the path separator is different. Alas, my Ant knowledge is limited, so I didn't find a better way.While there still may be a bit of clean up to do, the attached patch does produce a new-style p2 update site (which Tycho is happy with. :-).
I'm not convinced yet, but thanks for the patch.
Few issues:
* please add -nosplash argument to Eclipse executable
* there is now empty "features-release" directory generated
* now there are both extra features directory and site for each kind of build
* why was it required to change the folder names?
* the generated update site does not have "group" category (or Eclipse installer doesn't show it for whatever reason), so that average user would not see anything. May be site.xml is still needed?
Ideally the patch would generate old structure and left no extra (unneeded) folders.
Regards,
Andrey
Thanks for the comments. I will revise the patch.
Please find a revised patch attached, which addresses the issues you raised:
UpdateSitePublisher
task assumes that theplugins
andfeatures
directory exist side by side and bear these exact names. Hence the need to rename some things.FeaturesAndBundlesPublisher
instead thanUpdateSitePublisher
(the latter takes asite.xml
and uses the information therein to populate the generatecontext.xml
) I still put thesite.xml
on the update site, however, so really old Eclipse versions which don't support new-style update sites can pick it up.Now the build produces three folders
eclipsePlugin/bin_build/eclipse
eclipsePlugin/bin_build/eclipse-candidate
eclipsePlugin/bin_build/eclipse-daily
that can be copied as-is to the respective update site
I hope the naming convention I chose is one you can agree on. (As I said, I didn't see a way to preserve the shared
plugins
directory.)Any chance 3.0.1 will be published on a new-style update site? I am very much interested in consuming FindBugs from my Maven/Tycho build once https://sourceforge.net/p/findbugs/bugs/1305/ has been fixed.
Thanks Andreas,
I've applied the patch, see https://code.google.com/p/findbugs/source/detail?r=d81d6643279cb25a0ff4ed374f848efe00436d1d.
@Bill: the patch implies that we must update the way the site was published to the web server. Now it is enough to copy the entire content of the appropriate directory to the web.
"Release" build should use bin_build/site/eclipse
"Candidate" bin_build/site/eclipse-candidate
"Daily" bin_build/site/eclipse-daily
directory content.
Please can you update the deployment scripts and close this bug together with https://sourceforge.net/p/findbugs/bugs/1304/?
Thanks,
Andrey