Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Building a RAP web-app with buckminster
Building a RAP web-app with buckminster [message #502137] Sun, 06 December 2009 14:42
Johannes Utzig is currently offline Johannes UtzigFriend
Messages: 329
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090409020701000107070904
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

on thursday I talked to Benjamin for a little while and he explained me
that users find it currently too hard to package rap based applications
as wars. We were talking about if the buckminster project could make
things easier.
So I had a look at at the org.eclipse.rap.demo.feature and how to build
a war out of it. I do understand now why people find this complicated :)

Anyway, I tried to 'buckminsterize' this build today and wanted to post
the results here so they can be discussed.
Since I could not modify the sources directly of course, I created a new
feature org.eclipse.rap.demo.releng.feature that encapsulates the war build.
This is still not great, because users would still have to adjust this
to their own project, but a wizard or a buckminster extension could
simplify things here. So I hope this is enough to give you an idea of
the buckminster approach.

Instructions:
-start with a new workspace
-Configure and activate the RAP Target Platform
-Install Buckminster into your IDE
-Import the attached eclipse project
-open buckminster/org.eclipse.rap.demo.feature.cquery
-Press Resolve and Materialize (this will bring all required build
materials into the workspace)
-right click on the org.eclipse.rap.demo.releng.feature project
-select buckminster -> invoke action
-select the buckminster/buckminster.properties file in the dialog
-select the create.webapp or create.webapp.war action

Now the build results should be available at
${user.home}/rap-build/org.eclipse.rap.demo.releng.feature_1 .0.0-eclipse.feature/

Now the interesting part is certainly how to do a headless build for
that on a build server.
With buckminster it's exactly the same as building it locally with UI
support:

First, resolve the query to populate the workspace with the build materials:
buckminster resolve http://url/to/query.cquery

Second, invoke the create.webapp.war action:
buckminster perform org.eclipse.rap.demo.releng.feature#create.webapp.war

That's all you need for a headless build.


A brief explanation on what's involved here (the resources and ant
scripts in the original org.eclipse.rap.demo.feature are not used):

-the cquery
The query describes the topmost component that you want to materialize
in the workspace. Buckminster will try to resolve this component, parse
its metadata and then resolve all direct and transitive dependencies of
this component

-the rmap
The resource map (rmap) contains search paths that describe where
components can be found. There are different kinds of component
providers, including cvs, svn, eclipse update sites, filesystem, maven,
archives, urls,...
In this example I used search paths for the eclipse platform itself
(things like org.eclipse.help), the rap update site, the cvs location
where the rap example resides and the cvs location for the equinox
servletbridge.

-buckminster.cspex
Buckminster derives information about a component automatically from the
component's metadata (like osgi manifest, maven pom,...).
The cspex file is a way to add additional metadata that cannot be
derived automatically. In this case I basically added 2 new actions to
the org.eclipse.rap.demo.releng.feature:
create.webapp and create.webapp.war
These two actions are responsible for building the webapp and packaging
it as a war file. They have an ant actor that does the actual work and
certain prerequisites that get injected into the actor (in case of ant
actors this is done by properties).

So for example the create.webapp action has 3 prerequisites:

feature.exports - this is an automatically derived action for all
eclipse.features. It produces the output you would expect if you export
the feature from within eclipse (bundles and features directory)

templates - this is the templates directory that contains the web.xml
and so on

library - this is what should go in /lib in the webapp. In the case of
the rap example it's the output of the bundle.jar action of the equinox
servletbridge.

-create.webapp.xml
This is a simple ant script that 'implements' the create.webapp and
create.webapp.war actions. All the input they need is automatically
delivered by buckminster so the script is just some simple copy statements.

I hope it works for you and gives you an idea...

Best regards,
Johannes

--------------090409020701000107070904
Content-Type: application/zip;
name="webapp-releng.zip"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="webapp-releng.zip"

UEsDBBQACAAIAE15hjsAAAAAAAAAAAAAAAAsAAAAb3JnLmVjbGlwc2UucmFw LmRlbW8ucmVs
ZW5nLmZlYXR1cmUvLnByb2plY3R1kM0OgjAQhM/yFIa7rd48FEjUcPSiPkBt V1LTv2zB+Pi2
gESM3mY2s/Nll1VPo5cPwKCcLfINWedLsMJJZZsiv5zr1Tavyox5dHcQ7QGC QOXbGC6zBbPc
QOmwISC08gEIck8kGEcQNNiG3IC3HQKjfTJuCGcM2LZk9K3icCwPSdNPc+2U licPIprR7eMa
tzINfvC9BFIPzF1KA07oGOfYdIkZBktnntGv/nEw4iMrtQ7RQf8jH6eb+1Rq mpan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8ucmVsZW5n LmZlYXR1cmUv
dGVtcGxhdGVzL1dFQi1JTkYvZWNsaXBzZS8uZWNsaXBzZXByb2R1Y3RQSwEC FAAUAAgACABN
eYY7qUHOJjUBAACUBAAAVgAAAAAAAAAAAAAAAAD2CwAAb3JnLmVjbGlwc2Uu cmFwLmRlbW8u
cmVsZW5nLmZlYXR1cmUvdGVtcGxhdGVzL1dFQi1JTkYvZWNsaXBzZS9jb25m aWd1cmF0aW9u
L2NvbmZpZy5pbmlQSwECFAAUAAgACABNeYY75sJQX/sAAADkAQAASAAAAAAA AAAAAAAAAACv
DQAAb3JnLmVjbGlwc2UucmFwLmRlbW8ucmVsZW5nLmZlYXR1cmUvdGVtcGxh dGVzL1dFQi1J
TkYvZWNsaXBzZS9sYXVuY2guaW5pUEsBAhQAFAAIAAgATXmGO94i2/ZtAwAA 0ggAAD0AAAAA
AAAAAAAAAAAAIA8AAG9yZy5lY2xpcHNlLnJhcC5kZW1vLnJlbGVuZy5mZWF0 dXJlL3RlbXBs
YXRlcy9XRUItSU5GL3dlYi54bWxQSwUGAAAAAAwADAAoBQAA+BIAAAAA
--------------090409020701000107070904--
Previous Topic:Accessing Java methods through JavaScript
Next Topic:D&D in TreeWiewer
Goto Forum:
  


Current Time: Wed Apr 01 12:13:26 GMT 2020

Powered by FUDForum. Page generated in 0.02139 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top