Menu

#1301 Switch to new-style Eclipse update site

3.0.1
closed-fixed
None
5
2015-03-08
2014-09-18
No

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.)

Related

Bugs: #1304

Discussion

  • Andrey Loskutov

    Andrey Loskutov - 2014-09-18
    • assigned_to: Andrey Loskutov
     
  • Andrey Loskutov

    Andrey Loskutov - 2014-09-18

    We have no time to work on this.
    Feel free to provide such patched ant script, contribution is welcome.
    Regards,
    Andrey

     
  • Andreas Sewe

    Andreas Sewe - 2014-09-19

    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?

     
  • Andrey Loskutov

    Andrey Loskutov - 2014-09-21

    ... everything is done with the good old Ant. Check the build.xml files in findbugs and findBugsEclipsePlugin directories.

    CU
    Andrey

     
  • Andreas Sewe

    Andreas Sewe - 2014-09-21

    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 a file 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. :-).

     
  • Andrey Loskutov

    Andrey Loskutov - 2014-09-21

    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

     
  • Andreas Sewe

    Andreas Sewe - 2014-09-22

    Thanks for the comments. I will revise the patch.

     
  • Andreas Sewe

    Andreas Sewe - 2014-09-22

    Please find a revised patch attached, which addresses the issues you raised:

    • please add -nosplash argument to Eclipse executable
      • Fixed.
    • there is now empty "features-release" directory generated
      • Fixed.
    • now there are both extra features directory and site for each kind of build
    • why was it required to change the folder names?
      • AFAIK, the UpdateSitePublisher task assumes that the plugins and features directory exist side by side and bear these exact names. Hence the need to rename some things.
    • 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?
      • Fixed. FYI, the site.xml is not needed. I just used the the wrong task: FeaturesAndBundlesPublisher instead than UpdateSitePublisher (the latter takes a site.xml and uses the information therein to populate the generate context.xml) I still put the site.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.)

     
  • Andreas Sewe

    Andreas Sewe - 2014-09-26

    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.

     
  • Andrey Loskutov

    Andrey Loskutov - 2014-09-28

    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

     
  • Andrey Loskutov

    Andrey Loskutov - 2014-09-28
    • status: open --> open-accepted
    • assigned_to: Andrey Loskutov --> William Pugh
    • Group: 3.x --> 3.0.1
     
  • Andrey Loskutov

    Andrey Loskutov - 2015-03-08
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.