You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Claus Bech Rasmussen - TELMORE <cb...@telmore.dk> on 2005/12/06 16:59:04 UTC

Using plugins with forrest as webapp

Hi folks,

I have built an input plugin that works nicely when I run forrest
locally (forrest run)

But when I build a webapp of that same forrest installation (0.7) and
deploy it elsewhere things look darker. My project/input.xmap points to
{forrest:plugins}/<myplugin>/input.xmap, but the content of my plugin is
nowhere to be found in the webapp and I'm not sure where
{forrest:plugins} points to now? 

I was thinking that maybe the webapp would grab the plugin if I provided
a plugins.xml and told it about it in forrest.properties but this
doesn't seem to be the case either.

After hours of drilling I took a fresh forrest 0.7 and built a webapp
with just the pdf output plugin enabled, slammed that webapp into a
tomcat and the result is the same - the pdf plugin does not load. No
pipeline matches *.pdf requests.

I guess I must be missing something here - could anyone provide a
pointer?

Best,
Claus

Re: Using plugins with forrest as webapp

Posted by Ross Gardler <rg...@apache.org>.
David Crossley wrote:
> David Crossley wrote:
> 
>>Ross Gardler wrote:
>>
>>>Claus Bech Rasmussen - TELMORE wrote:
>>>
>>>>I guess I must be missing something here - could anyone provide a
>>>>pointer?
>>>
>>>This is a known issue with no current workaround [1], it is scheduled to 
>>>be fixed in the next release.
>>>
>>>We'd welcome your help, it should be relatively easy to fix, but none of 
>>>the current devs are using Tomcat in webapp mode so this is waiting for 
>>>someone to fix it.
>>>
>>>We will, of course help point you in the right direction.
>>>
>>>With that in mind here is a starter...
>>>
>>>I've not examined the problem, but I would suggest that the "webapp" 
>>>target in our build.xml is failing to copy across the relevant plugin 
>>>files into a usable location. If you fancy tackling this I would sugest 
>>> becoming familiar with how the webapp is currently built.
>>
>>Well i use a local full Jetty server for testing webapps.
>>Doing the test that Claus tried, i.e. 'forrest seed war'
>>works fine for me in Jetty. So the plugins are being added
>>properly.
>>
>>Claus, try unpacking the WAR file to ensure that your
>>plugin is present. I did this ...
>>
>>cd /tmp/foo
>>jar tf my-project.war | grep plugins
>>...
>>build/plugins/org.apache.forrest.plugin.output.pdf/
>>...
> 
> 
> Ah sorry, i was talking about 'forrest war' whereas issue FOR-735
> and Claus are talking about 'forrest webapp'. I don't use the latter,
> so not much help.

Actually, "war" depends on "webapp". "war" copies across the plugin 
stuff ito the war file, webapp doesn't.

So, what is happening is users are assuming that the "webapp" target 
builds a complete webapp (reasonable assumption), but in fact it doesn't 
  you need to create the war file and have the servlet container unpack 
it (or unpack it manually).

I don't see any reason why the build file cannot include the plugin 
stuff for us, perhaps someon cane provide a patch for 
FORREST_HOME/main/targets/webapp.xml

Ross


Re: Using plugins with forrest as webapp

Posted by David Crossley <cr...@apache.org>.
David Crossley wrote:
> Ross Gardler wrote:
> > Claus Bech Rasmussen - TELMORE wrote:
> > >I guess I must be missing something here - could anyone provide a
> > >pointer?
> > 
> > This is a known issue with no current workaround [1], it is scheduled to 
> > be fixed in the next release.
> > 
> > We'd welcome your help, it should be relatively easy to fix, but none of 
> > the current devs are using Tomcat in webapp mode so this is waiting for 
> > someone to fix it.
> > 
> > We will, of course help point you in the right direction.
> > 
> > With that in mind here is a starter...
> > 
> > I've not examined the problem, but I would suggest that the "webapp" 
> > target in our build.xml is failing to copy across the relevant plugin 
> > files into a usable location. If you fancy tackling this I would sugest 
> >  becoming familiar with how the webapp is currently built.
> 
> Well i use a local full Jetty server for testing webapps.
> Doing the test that Claus tried, i.e. 'forrest seed war'
> works fine for me in Jetty. So the plugins are being added
> properly.
> 
> Claus, try unpacking the WAR file to ensure that your
> plugin is present. I did this ...
> 
> cd /tmp/foo
> jar tf my-project.war | grep plugins
> ...
> build/plugins/org.apache.forrest.plugin.output.pdf/
> ...

Ah sorry, i was talking about 'forrest war' whereas issue FOR-735
and Claus are talking about 'forrest webapp'. I don't use the latter,
so not much help.

-David

> > This may be a good issue to tackle on Forrest Friday [2] (this coming 
> > Friday) when a dev is online to help debug the problem (I'll be online 
> > on and off during the day, but almost certainly from about 3pm UTC for a 
> > good few hours.
> > 
> > Ross
> > 
> > [1] http://issues.apache.org/jira/browse/FOR-735
> > [2] http://forrest.apache.org/forrest-friday.html

Re: Using plugins with forrest as webapp

Posted by David Crossley <cr...@apache.org>.
Ross Gardler wrote:
> Claus Bech Rasmussen - TELMORE wrote:
> >I guess I must be missing something here - could anyone provide a
> >pointer?
> 
> This is a known issue with no current workaround [1], it is scheduled to 
> be fixed in the next release.
> 
> We'd welcome your help, it should be relatively easy to fix, but none of 
> the current devs are using Tomcat in webapp mode so this is waiting for 
> someone to fix it.
> 
> We will, of course help point you in the right direction.
> 
> With that in mind here is a starter...
> 
> I've not examined the problem, but I would suggest that the "webapp" 
> target in our build.xml is failing to copy across the relevant plugin 
> files into a usable location. If you fancy tackling this I would sugest 
>  becoming familiar with how the webapp is currently built.

Well i use a local full Jetty server for testing webapps.
Doing the test that Claus tried, i.e. 'forrest seed war'
works fine for me in Jetty. So the plugins are being added
properly.

Claus, try unpacking the WAR file to ensure that your
plugin is present. I did this ...

cd /tmp/foo
jar tf my-project.war | grep plugins
...
build/plugins/org.apache.forrest.plugin.output.pdf/
...

> This may be a good issue to tackle on Forrest Friday [2] (this coming 
> Friday) when a dev is online to help debug the problem (I'll be online 
> on and off during the day, but almost certainly from about 3pm UTC for a 
> good few hours.
> 
> Ross
> 
> 
> [1] http://issues.apache.org/jira/browse/FOR-735
> [2] http://forrest.apache.org/forrest-friday.html

Re: Using plugins with forrest as webapp

Posted by Ross Gardler <rg...@apache.org>.
Claus Bech Rasmussen - TELMORE wrote:
> I guess I must be missing something here - could anyone provide a
> pointer?

This is a known issue with no current workaround [1], it is scheduled to 
be fixed in the next release.

We'd welcome your help, it should be relatively easy to fix, but none of 
the current devs are using Tomcat in webapp mode so this is waiting for 
someone to fix it.

We will, of course help point you in the right direction.

With that in mind here is a starter...

I've not examined the problem, but I would suggest that the "webapp" 
target in our build.xml is failing to copy across the relevant plugin 
files into a usable location. If you fancy tackling this I would sugest 
  becoming familiar with how the webapp is currently built.

This may be a good issue to tackle on Forrest Friday [2] (this coming 
Friday) when a dev is online to help debug the problem (I'll be online 
on and off during the day, but almost certainly from about 3pm UTC for a 
good few hours.

Ross


[1] http://issues.apache.org/jira/browse/FOR-735
[2] http://forrest.apache.org/forrest-friday.html