Difference between revisions of "RAP/Equinox WAR products"

From Eclipsepedia

< RAP
Jump to: navigation, search
(Project Goal)
(Download/Install)
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This document is a proposal for the GSoC 2010 project: [http://wiki.eclipse.org/Google_Summer_of_Code_2010_Ideas WAR deployment for Equinox based applications] and was created by [http://eclipsesource.com/blogs/author/hstaudacher/ Holger Staudacher] as part of his GSoC application. This is a living document. Feel free to edit or add things.<br><br><br>
+
=Download/Install =
 +
The WAR Products Tooling requires Eclipse 3.7 (Indigo) which can be found [http://www.eclipse.org/downloads/index-developer.php here].
 +
To install the WAR Products Tooling, please use this software repository: http://download.eclipsesource.com/~hstaudacher/warproducts/3.7/
  
 
= WAR deployment for Equinox based applications =
 
= WAR deployment for Equinox based applications =
 +
 +
Project Lead: Holger Staudacher
 +
 +
Mentor: Rüdiger Herrmann
 +
 +
This project is part of the [[Google Summer of Code 2010]]
  
 
== Abstract ==
 
== Abstract ==
Line 13: Line 21:
 
== Why does Equinox have special deployment requirements? ==
 
== Why does Equinox have special deployment requirements? ==
  
While deploying a Server-Side Equinox Application, Equinox and all bundles required by the application need to be integrated in a servlet-contianer. The incoming requests must be forwarded from the Equinox instance to the participating resources. This creates certain requirements for successfully deploying an Equinox based application as a WAR. The requirements are:  
+
While deploying a Server-Side Equinox Application, Equinox and all bundles required by the application need to be integrated in a servlet-container. The incoming requests must be forwarded from the Equinox instance to the participating resources. This creates certain requirements for successfully deploying an Equinox based application as a WAR. The requirements are:  
 
*All dependencies need to be resolved for the bundles that are being deployed.  
 
*All dependencies need to be resolved for the bundles that are being deployed.  
 
*The config.ini must be set up properly.  
 
*The config.ini must be set up properly.  
Line 19: Line 27:
 
*The servletbridge (both sides) must be present.  
 
*The servletbridge (both sides) must be present.  
 
*A bundle that provides the HttpService must be present.  
 
*A bundle that provides the HttpService must be present.  
*The basic folder structure must be intact (WEB-INF folder, web.xml, etc.).  
+
*The basic folder structure must be intact (WEB-INF folder, web.xml, etc.).
  
 
== How can the deployment process be improved? ==
 
== How can the deployment process be improved? ==
Line 25: Line 33:
 
A good approach for building eclipse based applications is the RCP product approach. With this approach developers can create product configurations. These configurations are the basis for exporting RCP applications as executable products. To improve the server-side Equinox deployment process this approach can be adopted. A concept called the WAR product should be introduced. With this concept developers can create WAR product configurations which hold the necessary information for exporting an Equinox based application as a deployable WAR.  
 
A good approach for building eclipse based applications is the RCP product approach. With this approach developers can create product configurations. These configurations are the basis for exporting RCP applications as executable products. To improve the server-side Equinox deployment process this approach can be adopted. A concept called the WAR product should be introduced. With this concept developers can create WAR product configurations which hold the necessary information for exporting an Equinox based application as a deployable WAR.  
  
Having a good approach is one thing, but the right tooling is needed as well. Decent tooling exists for the RCP product. PDE comes with wizards for creating product configurations and for exporting a product. In addition, a configuration editor is available to help avoid syntax errors. Similar tooling for the WAR product will be needed. This tooling will make the deployment process much simpler and avoid errors during deployment. The following images show the RCP product tooling. This tooling can act as the basis for the WAR product tooling and will make RCP developers feel at home.  
+
Having a good approach is one thing, but the right tooling is needed as well. Decent tooling exists for the RCP product. PDE comes with wizards for creating product configurations and for exporting a product. In addition, a configuration editor is available to help avoid syntax errors. Similar tooling for the WAR product will be needed. This tooling will make the deployment process much simpler and avoid errors during deployment. This tooling can act as the basis for the WAR product tooling and will make RCP developers feel at home.
 
+
[[Image:newConfigurationWizard.png]]
+
[[Image:ConfigurationEditor.png]]
+
[[Image:exportProductWizard.png]]
+
  
 
==Primary goals==
 
==Primary goals==
Line 42: Line 46:
 
</div>
 
</div>
  
*[[Image:Glass.gif]] '''new .warproduct wizard'''
+
*[[Image:Ok_green.gif]] '''new .warproduct wizard''' - [https://bugs.eclipse.org/bugs/show_bug.cgi?id=315471 bug 315471]
:[[Image:Glass.gif]] let the user choose the name of the .warproduct configuration
+
:[[Image:Ok_green.gif]] let the user choose the name of the .warproduct configuration
:[[Image:Glass.gif]] make the workspace bundles selectable (basic settings)
+
:[[Image:Ok_green.gif]] make the workspace bundles selectable (basic settings)
:[[Image:Glass.gif]] provide a way to start from an osgi/rap launch configuration (take all bundles and so on)
+
:[[Image:Ok_green.gif]] provide a way to start from an osgi/rap launch configuration (take all bundles and so on)
  
*[[Image:Glass.gif]] '''.warproduct editor'''
+
*[[Image:Ok_green.gif]] '''.warproduct editor''' - [https://bugs.eclipse.org/bugs/show_bug.cgi?id=315472 bug 315472]
:[[Image:Glass.gif]] Investigate which parts can be reused from the PDE product editor and how to make it pluggable.
+
:[[Image:Ok_green.gif]] Investigate which parts can be reused from the PDE product editor and how to make it pluggable.
:[[Image:Glass.gif]] bundle validation
+
:[[Image:Ok_green.gif]] Provide a way to add bundles and features - [https://bugs.eclipse.org/bugs/show_bug.cgi?id=315475 bug 315475], [https://bugs.eclipse.org/bugs/show_bug.cgi?id=315476 bug 315476]
::[[Image:Glass.gif]] make sure all added bundles can be resolved (if not show error marker)
+
:[[Image:Ok_green.gif]] bundle validation
::[[Image:Glass.gif]] make sure the javax.servlet bundle is not contained into the used bundles
+
::[[Image:Ok_green.gif]] make sure all added bundles can be resolved (if not show error marker)
::[[Image:Glass.gif]] make sure a bundle which provides an HTTP service is present (maybe hardcoded org.eclipse.equinox.http.servlet?)
+
::[[Image:Ok_green.gif]] make sure the javax.servlet bundle is not contained into the used bundles
::[[Image:Glass.gif]] make sure that the needed equinox bundles are included (servletbridge and so on). The equinox bundles should not be deletable from the definition. Maybe they can be resolved from the target platform (show error marker if they can't be resolved)
+
::[[Image:Ok_green.gif]] make sure a bundle which provides an HTTP service is present (maybe hardcoded org.eclipse.equinox.http.servlet?)
::[[Image:Glass.gif]] make sure all bundle dependencies can be resolved (if not show error marker)
+
::[[Image:Ok_green.gif]] make sure that the needed equinox bundles are included (servletbridge and so on). Maybe they can be resolved from the target platform (show error marker if they can't be resolved)
:[[Image:Glass.gif]] library management
+
::[[Image:Ok_green.gif]] make sure all bundle dependencies can be resolved (if not show error marker)
::[[Image:Glass.gif]] provide a way to add external libraries which are placed in the lib folder within the WEB-INF
+
:[[Image:Ok_green.gif]] library management - [https://bugs.eclipse.org/bugs/show_bug.cgi?id=315473 bug 315473]
::[[Image:Glass.gif]] make sure the org.eclipse.equinox.servletbridge*.jar is included into the lib folder
+
::[[Image:Ok_green.gif]] provide a way to add external libraries which are placed in the lib folder within the WEB-INF
:[[Image:Glass.gif]] web.xml configuration - provide a way which make's web.xml configuring easy (maybe these things can be distributed over the whole editor e.g. meta info on the overview tab and so on)
+
::[[Image:Ok_green.gif]] make sure the org.eclipse.equinox.servletbridge*.jar is included into the lib folder
::[[Image:Glass.gif]] let the user choose which commandline arguments will be used (-console and so on). Only allow valid arguments.
+
:[[Image:Ok_green.gif]] web.xml configuration - provide a way which make's web.xml configuring easy (maybe these things can be distributed over the whole editor e.g. meta info on the overview tab and so on) - [https://bugs.eclipse.org/bugs/show_bug.cgi?id=315477 bug 315477]
::[[Image:Glass.gif]] let the user choose if the framework controls should be enabled
+
::[[Image:Ok_green.gif]] let the user choose which commandline arguments will be used (-console and so on). Only allow valid arguments.
::[[Image:Glass.gif]] make the framework launcher exchangeable (default should be org.eclipse.equinox.servletbridge.FrameworkLauncher)
+
::[[Image:Ok_green.gif]] let the user choose if the framework controls should be enabled
::[[Image:Glass.gif]] let the user define own init-params with key/value pairs
+
::[[Image:Ok_green.gif]] make the framework launcher exchangeable (default should be org.eclipse.equinox.servletbridge.FrameworkLauncher)
::[[Image:Glass.gif]] make meta data editable (display-name, servlet-class, servlet-name and so on)
+
::[[Image:Ok_green.gif]] let the user define own init-params with key/value pairs
::[[Image:Glass.gif]] let the user choose a servlet mapping (/* by default, what about the .jsp mapping?)
+
::[[Image:Ok_green.gif]] make meta data editable (display-name, servlet-class, servlet-name and so on)
:[[Image:Glass.gif]] config.ini configuration
+
::[[Image:Ok_green.gif]] let the user choose a servlet mapping (/* by default, what about the .jsp mapping?)
::[[Image:Glass.gif]] let the user choose the defaultStartLevel (default should be 4)
+
:[[Image:Ok_green.gif]] make it possible to start the export within the editor
:[[Image:Glass.gif]] make it possible to start the export within the editor
+
  
*[[Image:Glass.gif]] '''.warproduct export wizard'''
+
*[[Image:Ok_green.gif]] '''.warproduct export wizard''' - [https://bugs.eclipse.org/bugs/show_bug.cgi?id=315479 bug 315479]
:[[Image:Glass.gif]] let the user choose which .warproduct configuration should be used
+
:[[Image:Ok_green.gif]] let the user choose which .warproduct configuration should be used
:[[Image:Glass.gif]] validate the .warproduct file (there should be errors e.g. if the bundle dependencies could not be resolved)
+
:[[Image:Ok_green.gif]] validate the .warproduct file (there should be errors e.g. if the bundle dependencies could not be resolved)
:[[Image:Glass.gif]] provide a way to define a destination for the .war file
+
:[[Image:Ok_green.gif]] provide a way to define a destination for the .war file
:[[Image:Glass.gif]] make sure the exported file ends with .war
+
:[[Image:Ok_green.gif]] make sure the exported file ends with .war
 
:[[Image:Glass.gif]] make it optional if an ant script should be generated for the used configuration (nice to have if it's enough time left)
 
:[[Image:Glass.gif]] make it optional if an ant script should be generated for the used configuration (nice to have if it's enough time left)
:[[Image:Glass.gif]] create WEB-INF structure defined with the options within the .warproduct configuration
+
:[[Image:Ok_green.gif]] create WEB-INF structure defined with the options within the .warproduct configuration
:[[Image:Glass.gif]] create the config.ini on the fly
+
:[[Image:Ok_green.gif]] create the config.ini on the fly
:[[Image:Glass.gif]] add launch.ini with static content (the default content)
+
:[[Image:Ok_green.gif]] add launch.ini with static content (the default content)
:[[Image:Glass.gif]] add all libraries to the lib folder
+
:[[Image:Ok_green.gif]] add all libraries to the lib folder
:[[Image:Glass.gif]] put all plugins/features into the eclipse folder (plugins/feature folder)
+
:[[Image:Ok_green.gif]] put all plugins/features into the eclipse folder (plugins/feature folder)
:[[Image:Glass.gif]] create the configured web.xml and put it into the WEB-INF folder
+
:[[Image:Ok_green.gif]] add the web.xml to the WEB-INF folder
  
  
 
The described functionality may change during the coding period.
 
The described functionality may change during the coding period.
 +
 +
== UI Sketches ==
 +
* '''.warproduct new wizard'''
 +
:[[Image:NewWizard.png]]
 +
 +
* '''.warproduct editor'''
 +
:[[Image:Editor_overview.png]]
 +
:[[Image:Editor_features.png]]
 +
:[[Image:Editor_plugins.png]]
 +
:[[Image:Editor_xml.png]]
 +
 +
* '''.warproduct export wizard'''
 +
:[[Image:ExportWizard_war.png]]
 +
 +
== Community Involvement ==
 +
 +
=== Getting the source ===
 +
 +
The source files has moved to Eclipse Libra's git repository. See http://git.eclipse.org/c/libra/org.eclipse.libra.git/
 +
 +
=== Open issues ===
 +
To see all the open issues and feature requests of this project, take a look at [https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&short_desc=[warproducts]&short_desc_type=allwordssubstr this query].
 +
 +
=== New ideas ===
 +
Do you have a great idea for the warproducts? Just open a [https://bugs.eclipse.org/bugs/enter_bug.cgi?product=RAP new feature request].
  
 
==Weblinks/Literature==
 
==Weblinks/Literature==

Latest revision as of 08:21, 19 April 2011

Contents

[edit] Download/Install

The WAR Products Tooling requires Eclipse 3.7 (Indigo) which can be found here. To install the WAR Products Tooling, please use this software repository: http://download.eclipsesource.com/~hstaudacher/warproducts/3.7/

[edit] WAR deployment for Equinox based applications

Project Lead: Holger Staudacher

Mentor: Rüdiger Herrmann

This project is part of the Google Summer of Code 2010

[edit] Abstract

The purpose of the RAP project is to enable developers to build rich, Ajax-enabled Web applications using the Eclipse development model, plug-ins and a Java-only API. After completing a RAP application the next step is generally to publish the application on a web server, i.e. in a servlet container or application server. But this step, also known as deployment, sounds simpler than it is in the real world. When searching the RAP newsgroup for "WAR deployment" 210 threads appear. The reason for this is that many developers have problems deploying a RAP application. These problems exist because RAP products build on top of Server-Side Equinox. Equinox has special requirements for the deployable archive. To making things easier for beginners and to simplify the deployment process a good approach and tooling is needed. The goal of this GSoC 2010 project is to provide this approach and tooling.

[edit] How does this fit in the RAP context

RAP is probably the biggest consumer of the Server-Side Equinox technology. With this fact it's in the interest of the RAP community to have a good concept and tooling for users. This project will be mentored by the lead of the RAP team (Rüdiger Herrmann) and initially hosted at the RAP CVS. While doing this project as part of Eclipse RAP we can recognize user needs because there is a bunch of people at the RAP community which are interested in a good concept and tooling for deploying Equinox and RAP based applications. At a later stage, the results can hopefully be contributed to PDE (aka "Equinox Tooling"), though this is outside the scope of this project.

[edit] Why does Equinox have special deployment requirements?

While deploying a Server-Side Equinox Application, Equinox and all bundles required by the application need to be integrated in a servlet-container. The incoming requests must be forwarded from the Equinox instance to the participating resources. This creates certain requirements for successfully deploying an Equinox based application as a WAR. The requirements are:

  • All dependencies need to be resolved for the bundles that are being deployed.
  • The config.ini must be set up properly.
  • The javax.servlet bundle must be excluded from the deployment.
  • The servletbridge (both sides) must be present.
  • A bundle that provides the HttpService must be present.
  • The basic folder structure must be intact (WEB-INF folder, web.xml, etc.).

[edit] How can the deployment process be improved?

A good approach for building eclipse based applications is the RCP product approach. With this approach developers can create product configurations. These configurations are the basis for exporting RCP applications as executable products. To improve the server-side Equinox deployment process this approach can be adopted. A concept called the WAR product should be introduced. With this concept developers can create WAR product configurations which hold the necessary information for exporting an Equinox based application as a deployable WAR.

Having a good approach is one thing, but the right tooling is needed as well. Decent tooling exists for the RCP product. PDE comes with wizards for creating product configurations and for exporting a product. In addition, a configuration editor is available to help avoid syntax errors. Similar tooling for the WAR product will be needed. This tooling will make the deployment process much simpler and avoid errors during deployment. This tooling can act as the basis for the WAR product tooling and will make RCP developers feel at home.

[edit] Primary goals

Legend

Glass.gif Needs some investigation/research

Progress.gif Work in progress

Ok green.gif Bug fixed (CVS / Builds)

Ok green.gif let the user choose the name of the .warproduct configuration
Ok green.gif make the workspace bundles selectable (basic settings)
Ok green.gif provide a way to start from an osgi/rap launch configuration (take all bundles and so on)
Ok green.gif Investigate which parts can be reused from the PDE product editor and how to make it pluggable.
Ok green.gif Provide a way to add bundles and features - bug 315475, bug 315476
Ok green.gif bundle validation
Ok green.gif make sure all added bundles can be resolved (if not show error marker)
Ok green.gif make sure the javax.servlet bundle is not contained into the used bundles
Ok green.gif make sure a bundle which provides an HTTP service is present (maybe hardcoded org.eclipse.equinox.http.servlet?)
Ok green.gif make sure that the needed equinox bundles are included (servletbridge and so on). Maybe they can be resolved from the target platform (show error marker if they can't be resolved)
Ok green.gif make sure all bundle dependencies can be resolved (if not show error marker)
Ok green.gif library management - bug 315473
Ok green.gif provide a way to add external libraries which are placed in the lib folder within the WEB-INF
Ok green.gif make sure the org.eclipse.equinox.servletbridge*.jar is included into the lib folder
Ok green.gif web.xml configuration - provide a way which make's web.xml configuring easy (maybe these things can be distributed over the whole editor e.g. meta info on the overview tab and so on) - bug 315477
Ok green.gif let the user choose which commandline arguments will be used (-console and so on). Only allow valid arguments.
Ok green.gif let the user choose if the framework controls should be enabled
Ok green.gif make the framework launcher exchangeable (default should be org.eclipse.equinox.servletbridge.FrameworkLauncher)
Ok green.gif let the user define own init-params with key/value pairs
Ok green.gif make meta data editable (display-name, servlet-class, servlet-name and so on)
Ok green.gif let the user choose a servlet mapping (/* by default, what about the .jsp mapping?)
Ok green.gif make it possible to start the export within the editor
Ok green.gif let the user choose which .warproduct configuration should be used
Ok green.gif validate the .warproduct file (there should be errors e.g. if the bundle dependencies could not be resolved)
Ok green.gif provide a way to define a destination for the .war file
Ok green.gif make sure the exported file ends with .war
Glass.gif make it optional if an ant script should be generated for the used configuration (nice to have if it's enough time left)
Ok green.gif create WEB-INF structure defined with the options within the .warproduct configuration
Ok green.gif create the config.ini on the fly
Ok green.gif add launch.ini with static content (the default content)
Ok green.gif add all libraries to the lib folder
Ok green.gif put all plugins/features into the eclipse folder (plugins/feature folder)
Ok green.gif add the web.xml to the WEB-INF folder


The described functionality may change during the coding period.

[edit] UI Sketches

  • .warproduct new wizard
NewWizard.png
  • .warproduct editor
Editor overview.png
Editor features.png
Editor plugins.png
Editor xml.png
  • .warproduct export wizard
ExportWizard war.png

[edit] Community Involvement

[edit] Getting the source

The source files has moved to Eclipse Libra's git repository. See http://git.eclipse.org/c/libra/org.eclipse.libra.git/

[edit] Open issues

To see all the open issues and feature requests of this project, take a look at [warproducts&short_desc_type=allwordssubstr this query].

[edit] New ideas

Do you have a great idea for the warproducts? Just open a new feature request.

[edit] Weblinks/Literature