For all the effort that appears to have gone into allowing the Eclipse Help “Infocenter” to run as a deployed web application, the documentation is not great, and more importantly – why isn’t there a download thats “ready to go”? This is something that’s bothered me for sometime now.
For the impatient, you can skip the rest of this, and just download a WAR from my Google Docs account at https://docs.google.com/a/ipov.net/leaf?id=0B1u9Agj_s0HLZWZhNWFjNzItNzI4Ny00NzAxLTlhMmMtYjhiZmIxYzdlOGQ5&sort=name&layout=list&num=50 Just expand the WAR and add your help plugin(s) to the WEB-INF/plugins/ directory. Make sure that your plugins to not depend on anything other than the Eclipse Help bundles and you should be fine. I’ve noticed while preparing this, that a number of help plugins/bundles actually declare the same dependencies as the plugin they document, thus making running standalone impossible as the OGSi container will refuse to activate them. Hopefully someone will take over hosting this WAR for me, it would be great if Eclipse.org made it available for download as part of their normal release schedule, but that’s asking for a lot.
Anyway, in case its useful to others, or I need to reference this in the future, here’s what I had to do to get this WAR file running.
First, I google’d the issue; I found a smallish number of blogs already out there, and the offical documentation (e.g. http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/ua_help_war.htm). Warning: Many of the blogs are for an older version of the runtime, and will instruct you to place files under WEB-INF/eclipse, this is incorrect and will result in the web-app failing to start. The instructions in the Eclipse help are correct.
From the instructions:
- This is correct enough, although you don’t really have to use a temporary directory, I just extracted the plugin JAR directly to my local development install of Tomcat to facilitate testing, e.g. to %TOMCAT_HOME%/webapps/help
- Note that you’ll need Eclipse Plugin Development Kit for this. I also ran into a problem with using my install as my target platform, some issue with the JUnit addon for PDE, so I had to define a platform and exclude the JUnit plugin, not a big deal, but an extra step.
- Note that this step assumes you extracted the “temporary” directory referenced at the start as “webapps/help”
- Again, not that if you copy help plugins which declare extra, usually unneeded, dependencies, the help system will start, but will exclude those help plugins. You can edit the WEB-INF/web.xml to add the -console option so that you can access the OSGi console and get some diagnostic information on why the plugins aren’t started (it isn’t logged to the Tomcat log files).
- Downloads of the ServletBridge. I haven’t experimented, but I placed both files into my webapps/help/WEB-INF/plugin, and then also copied the org.eclipse.equinox.servletbridge to my WEB-INF/lib directory. This seemed to work fine.
- Note that previous versions of the instructions tell you to “extact the servletbridge.jar” form the plugin jar, this is no longer correct.
- No other variations/extra information should be needed.
Comments and addition information are welcome. I hope this helps others, and maybe someone can eventually get the Standalone Infocenter WAR added as a standard part of the Eclipse release builds.