Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » automatically determining the required plugins to be deployed in a WAR file/tested with dynamic web
automatically determining the required plugins to be deployed in a WAR file/tested with dynamic web [message #81018] Sat, 13 January 2007 09:48 Go to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
I have a requirement for either web service or servlet (essentially some
sort of HTTP) access to the server functionality provided by my RCP
application.

The new Equinox HTTP stuff seems to fit the bill nicely.

It's important for me to be able to easily test, make automated tests,
and do deployment. Thus, I'm using the WTP stuff to have a dynamic web
project that contains my servlet. In this project it has a way to
create all of the files that are deployed to Tomcat, and do testing with
Tomcat, etc.

Clearly I can modify something like the webAppBuilder.xml script that
comes in the ...servletbuilder plugin.

My problem is this: I want to be able to automatically determine the
plugins to copy into this directory based on the current configuration
of everything.

I currently use the PDE build scripts for a batch build of my product
(which is many features and maybe 30 plugins, not to mention the
required Eclipse plugins). The problem with these is they take about 10
minutes to run, so it's not practical for the development/testing cycle.

In the absence of any help, I'm thinking of sort of merging parts of the
PDE build scripts (at least the parts that determine the plugin
dependencies) into the webAppBuilder.xml script.

Is there an easier way?

Francis


Re: automatically determining the required plugins to be deployed in a WAR file/tested with dynamic [message #82048 is a reply to message #81018] Mon, 29 January 2007 15:11 Go to previous messageGo to next message
Simon Kaegi is currently offline Simon KaegiFriend
Messages: 22
Registered: July 2009
Junior Member
Hi Francis,

In reading your message, I'm trying to figure out one thing.
Are you trying to embed a servlet container in your RCP application or are
you just building a web application that your RCP app will communicate with.

Regardless, I've found at development time it is much easier to use the
embedded Jetty Http Service as you can just "run" or "debug" your
application directly in Eclipse. In addition, it's much easier to determine
your dependencies when launching directly with PDE.

-Simon

"Francis Upton" <francisu@ieee.org> wrote in message
news:eoa9tv$b71$1@utils.eclipse.org...
>I have a requirement for either web service or servlet (essentially some
>sort of HTTP) access to the server functionality provided by my RCP
>application.
>
> The new Equinox HTTP stuff seems to fit the bill nicely.
>
> It's important for me to be able to easily test, make automated tests, and
> do deployment. Thus, I'm using the WTP stuff to have a dynamic web
> project that contains my servlet. In this project it has a way to create
> all of the files that are deployed to Tomcat, and do testing with Tomcat,
> etc.
>
> Clearly I can modify something like the webAppBuilder.xml script that
> comes in the ...servletbuilder plugin.
>
> My problem is this: I want to be able to automatically determine the
> plugins to copy into this directory based on the current configuration of
> everything.
>
> I currently use the PDE build scripts for a batch build of my product
> (which is many features and maybe 30 plugins, not to mention the required
> Eclipse plugins). The problem with these is they take about 10 minutes to
> run, so it's not practical for the development/testing cycle.
>
> In the absence of any help, I'm thinking of sort of merging parts of the
> PDE build scripts (at least the parts that determine the plugin
> dependencies) into the webAppBuilder.xml script.
>
> Is there an easier way?
>
> Francis
Re: automatically determining the required plugins to be deployed in a WAR file/tested with dynamic [message #82061 is a reply to message #82048] Mon, 29 January 2007 16:33 Go to previous message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
Hi Simon,

Thanks for your reply.

I want to call into my RCP application with a servlet, so I was working
only with the new HTTP servlet stuff which allows the app to be served
in something like Tomcat. I don't want to have the RCP application
actually provide the web server so I did not even look into the embedded
servlet container stuff (clearly maybe I should have). The idea is to
deploy the entire application as a WAR file. I will create this WAR
file when I run my deployed build script, and it will contain the
eclipse directory along with all of the required plugins.

But I wanted to test the same configuration at development time. This
is the way I did it:

1) I created a servlet plugin for my app which is also a web application
(that the web tools stuff can serve)
2) This is my launch.ini:

#osgi.*=@null
#org.osgi.*=@null
#eclipse.*=@null

# hook to PDE environment (these lines are not in deployed config)
osgi.install.area=file:/usr/local/eclipse_deploy/eclipse
osgi.configuration.area=file:/home/francis/d/.metadata/.plug ins/org.eclipse.pde.core/transform.product
(0, 1devel repos)/
osgi.dev=file:/home/francis/d/.metadata/.plugins/org.eclipse .pde.core/transform.product
(0, 1devel repos)/dev.properties
osgi.framework=file:/usr/local/eclipse_deploy/eclipse/plugin s/org.eclipse.osgi_3.2.1.R32x_v20060919.jar

# makde sure BridgeServlet class is found in RCP
osgi.parentClassloader=fwk

3) I build the servletbridge.jar file using the script you provide and
made that a library for the servlet plugin.

This works very well as I'm able to use the WTP stuff to test the
application with complete debugging and have it actually init and start
in a Tomcat server. Of course the downside is it's wired into lauch
config stuff, so that if I want to use a different launch config, I need
to change launch.ini.

I think this case points out at least a documentation opportunity for
your web pages to indicate it's better to use the embedded webserver
stuff for testing this configuration, even though that is not the
desired deployment configuration. Also, it took me a lot of debugging
realizing that it was dealing with two instances of the BridgeServlet
class before I found the osgi.parentClassloader=fwk. Overall this all
took more than a week to figure out (hopefully this post will at least
help someone in the future).

Also, I think having the PDE be integrated with the WTP stuff for
testing a web-based RCP application under development would be helpful.

As you suggest, I will look into the embedded server stuff for
development time. So long as I can deploy the application as I need
with the automated build scripts, it will work for me.

Thanks for your work on this stuff.

Francis




Simon Kaegi wrote:
> Hi Francis,
>
> In reading your message, I'm trying to figure out one thing.
> Are you trying to embed a servlet container in your RCP application or are
> you just building a web application that your RCP app will communicate with.
>
> Regardless, I've found at development time it is much easier to use the
> embedded Jetty Http Service as you can just "run" or "debug" your
> application directly in Eclipse. In addition, it's much easier to determine
> your dependencies when launching directly with PDE.
>
> -Simon
>
> "Francis Upton" <francisu@ieee.org> wrote in message
> news:eoa9tv$b71$1@utils.eclipse.org...
>> I have a requirement for either web service or servlet (essentially some
>> sort of HTTP) access to the server functionality provided by my RCP
>> application.
>>
>> The new Equinox HTTP stuff seems to fit the bill nicely.
>>
>> It's important for me to be able to easily test, make automated tests, and
>> do deployment. Thus, I'm using the WTP stuff to have a dynamic web
>> project that contains my servlet. In this project it has a way to create
>> all of the files that are deployed to Tomcat, and do testing with Tomcat,
>> etc.
>>
>> Clearly I can modify something like the webAppBuilder.xml script that
>> comes in the ...servletbuilder plugin.
>>
>> My problem is this: I want to be able to automatically determine the
>> plugins to copy into this directory based on the current configuration of
>> everything.
>>
>> I currently use the PDE build scripts for a batch build of my product
>> (which is many features and maybe 30 plugins, not to mention the required
>> Eclipse plugins). The problem with these is they take about 10 minutes to
>> run, so it's not practical for the development/testing cycle.
>>
>> In the absence of any help, I'm thinking of sort of merging parts of the
>> PDE build scripts (at least the parts that determine the plugin
>> dependencies) into the webAppBuilder.xml script.
>>
>> Is there an easier way?
>>
>> Francis
>
>


Previous Topic:Duplication in Equinox Aspect branch
Next Topic:Equinox classpath requirements
Goto Forum:
  


Current Time: Sat Jul 27 16:30:17 GMT 2024

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

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

Back to the top