This document describes the necessary steps to export a Gizmo based web application and deploy it. After that it's possible to run this application from the command line in headless mode.
First create a new folder called "resources" in the bingo plug-in project. Then select that folder in the Eclipse project explorer view. Now right-click "New > Other..."
In the following dialog select the "Product Configuration" wizard.
Select "resources" as the folder, give the new product configuration a fitting name, like e.g. "bingo.product" and make sure you base the product on the launch configuration you have been developing with earlier on, in this example named "Gizmo." It is important to note that you should try to create and use minimal run configurations to keep the size of the final deployables at a minimum.
Click "Finish" and the product configuration file will be generated and opened in a product configuration editor. Select the "net.heilancoo.portal.gizmo" product identifier:
Make sure the "net.heilancoo.portal.service" is the application to run upon launch:
Save the product configuration file.
To try out this product, click on the "Launch an Eclipse application" link in the product configuration editor. This will start the Gizmo and show a log similar to the one below:
Point your browser to it and play bingo! Once you see the application is running fine (just point your browser at it and try it out), you want to stop it again and export it in a deployable form.
Click on the "Eclipse Product export wizard" and you'll get the following dialog. Here you want to specify a destination folder and a root folder name:
Clicking "Finish" starts the export process. The export should result in something like the following folder structure:
joerg@joerg.laptop:~/export$ find bingo bingo bingo/plugins bingo/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805 bingo/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805/launcher.gtk.linux.x86.properties bingo/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805/about.html bingo/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805/META-INF bingo/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805/META-INF/MANIFEST.MF bingo/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805/META-INF/ECLIPSE.SF bingo/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805/META-INF/ECLIPSE.RSA bingo/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805/META-INF/eclipse.inf bingo/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805/eclipse_1115.so bingo/plugins/org.eclipse.osgi.services_3.1.200.v20071203.jar bingo/plugins/net.heilancoo.portal.documentation_1.0.0.jar bingo/plugins/org.eclipse.core.expressions_3.4.1.r342_v20081203-0800.jar bingo/plugins/net.heilancoo.utils_1.0.0.jar bingo/plugins/org.eclipse.equinox.app_1.1.0.v20080421-2006.jar bingo/plugins/org.eclipse.core.jobs_3.4.1.R34x_v20081128.jar bingo/plugins/org.freemarker_2.3.15.jar bingo/plugins/net.heilancoo.portal.admin_1.0.0.jar bingo/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610 bingo/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610/runtime_registry_compatibility.jar bingo/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610/about.html bingo/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610/META-INF bingo/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610/META-INF/MANIFEST.MF bingo/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610/META-INF/ECLIPSE.SF bingo/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610/META-INF/ECLIPSE.RSA bingo/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610/META-INF/eclipse.inf bingo/plugins/org.eclipse.core.runtime.compatibility.registry_3.2.200.v20080610/fragment.properties bingo/plugins/org.eclipse.core.net.linux.x86_1.0.0.I20080521.jar bingo/plugins/org.eclipse.core.contenttype_3.3.0.v20080604-1400.jar bingo/plugins/net.heilancoo.portal_1.0.0.jar bingo/plugins/org.eclipse.core.filesystem.linux.x86_1.2.0.v20080604-1400.jar bingo/plugins/org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar bingo/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar bingo/plugins/net.heilancoo.bingo_1.0.0.jar bingo/plugins/org.eclipse.core.resources_3.4.2.R34x_v20090126.jar bingo/plugins/org.eclipse.core.net_1.1.0.I20080604.jar bingo/plugins/org.eclipse.core.filesystem_1.2.0.v20080604-1400.jar bingo/plugins/org.eclipse.core.resources.compatibility_3.4.0.v20080604-1400.jar bingo/plugins/org.eclipse.ant.core_3.2.0.v20080529.jar bingo/plugins/net.heilancoo.portal.freemarker_1.0.0.jar bingo/plugins/org.eclipse.core.commands_3.4.0.I20080509-2000.jar bingo/plugins/org.json_1.0.0.jar bingo/plugins/org.apache.log4j_1.2.13.v200806030600.jar bingo/plugins/org.apache.httpcore_4.0.0 bingo/plugins/org.apache.httpcore_4.0.0/META-INF bingo/plugins/org.apache.httpcore_4.0.0/META-INF/MANIFEST.MF bingo/plugins/org.apache.httpcore_4.0.0/httpcore-nio-4.0.jar bingo/plugins/org.apache.httpcore_4.0.0/httpcore-4.0.jar bingo/plugins/net.heilancoo.portal.json_1.0.0.jar bingo/plugins/org.eclipse.core.variables_3.2.100.v20080529-1300.jar bingo/plugins/org.eclipse.core.runtime_3.4.0.v20080512.jar bingo/plugins/org.eclipse.core.runtime.compatibility.auth_3.2.100.v20070502.jar bingo/plugins/org.eclipse.equinox.security_1.0.1.R34x_v20080721.jar bingo/plugins/org.eclipse.equinox.registry_3.4.0.v20080516-0950.jar bingo/plugins/org.eclipse.equinox.common_3.4.0.v20080421-2006.jar bingo/plugins/org.eclipse.equinox.preferences_3.2.201.R34x_v20080709.jar bingo/configuration bingo/configuration/config.ini bingo/eclipse bingo/.eclipseproduct
You can run the new application and see the following in its terminal:
joerg@joerg-laptop:~/export$ ./bingo/eclipse 2009-04-22 23:51:09.008 INFO Activating net.heilancoo.portal 2009-04-22 23:51:09.010 INFO Preparing HTTP service. 2009-04-22 23:51:09.017 INFO Response generator factory net.heilancoo.portal.responses.PlainResponderFactory. 2009-04-22 23:51:09.021 INFO Response generator factory net.heilancoo.portal.freemarker.FreeMarkerResponderFactory. 2009-04-22 23:51:09.031 INFO Response generator factory net.heilancoo.portal.json.JsonResponderFactory. 2009-04-22 23:51:09.036 INFO Mapping URI '/' to handler net.heilancoo.portal.admin.AdminHandler. 2009-04-22 23:51:09.114 INFO Mapping URI 'bingo' to net.heilancoo.bingo.BingoApplication. 2009-04-22 23:51:09.120 INFO Application 'Web Based Bingo' version 1.0. 2009-04-22 23:51:09.121 INFO Initializing web application 'bingo'. 2009-04-22 23:51:09.125 INFO Initialising application class net.heilancoo.bingo.BingoApplication. 2009-04-22 23:51:09.127 INFO Found 0 method(s). 2009-04-22 23:51:09.128 INFO Main entry point login. 2009-04-22 23:51:09.129 INFO Finished initialising application class net.heilancoo.bingo.BingoApplication. 2009-04-22 23:51:09.129 INFO Processing 1 session class(es). 2009-04-22 23:51:09.130 INFO Initialising session class net.heilancoo.bingo.BingoSession. 2009-04-22 23:51:09.151 INFO Making FreeMarker responder for method other. 2009-04-22 23:51:09.152 INFO Default response format is txt. 2009-04-22 23:51:09.153 INFO Valid response format html maps to text/html. 2009-04-22 23:51:09.153 INFO Valid response format txt maps to text/plain. 2009-04-22 23:51:09.154 INFO Making FreeMarker responder for method main. 2009-04-22 23:51:09.155 INFO Default response format is html. 2009-04-22 23:51:09.155 INFO Valid response format html maps to text/html. 2009-04-22 23:51:09.156 INFO Found 2 method(s). 2009-04-22 23:51:09.156 INFO Main entry point main. 2009-04-22 23:51:09.156 INFO Finished initialising session class net.heilancoo.bingo.BingoSession. 2009-04-22 23:51:09.165 INFO Mapping web folder '/adminfiles' to private dir '/home/joerg/export/bingo/configuration/org.eclipse.osgi/bundles/3/1/.cp/statics'. 2009-04-22 23:51:09.165 INFO MIME configuration '/home/joerg/export/bingo/configuration/org.eclipse.osgi/bundles/2/1/.cp/config/mimetypes.txt'. 2009-04-22 23:51:09.170 INFO Mapping web folder '/portaldocs' to private dir '/home/joerg/export/bingo/configuration/org.eclipse.osgi/bundles/4/1/.cp/doc'. 2009-04-22 23:51:09.171 INFO MIME configuration '/home/joerg/export/bingo/configuration/org.eclipse.osgi/bundles/2/1/.cp/config/mimetypes.txt'. 2009-04-22 23:51:09.177 INFO Starting HTTP service.
That's it. The deployed bingo web application should now be accessible through your web browser.