You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Gavin (JIRA)" <ji...@apache.org> on 2008/11/30 11:21:44 UTC

[jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

    [ https://issues.apache.org/jira/browse/FOR-1108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12651805#action_12651805 ] 

Gavin commented on FOR-1108:
----------------------------

Well, I got the .Text and .POD plugins working fine on Windows too, and I expect if I make the same changes throughout the rest will too. I will test on a couple of whiteboard plugins next.

Previously - with a seed-sample and no dispatcher, only the PDF plugin worked, with the changes below then the above two also work now.

  <locator>
          <match pattern="text.transform.*.*">
                  <select>
                          <location src="resources/stylesheets/{1}-to-{2}.xsl" />
                          <location src="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/resources/stylesheets/{1}-to-{2}.xsl"/>
                  </select>
    </match>
  </locator>


> Dispatcher, Cocoon 2.1 and Windows
> ----------------------------------
>
>                 Key: FOR-1108
>                 URL: https://issues.apache.org/jira/browse/FOR-1108
>             Project: Forrest
>          Issue Type: Bug
>          Components: Core operations, Plugin: internal.dispatcher
>    Affects Versions: 0.9-dev
>            Reporter: Ross Gardler
>            Priority: Blocker
>             Fix For: 0.9-dev
>
>         Attachments: core.log, dispatcher.xmap.diff, test.log, test_dispatcher_site.zip, testRunWithDebug.log
>
>
> Since the update to Cocoon 2.1 Forrest and Dispatcher have broken on windows.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Ross Gardler <rg...@apache.org>.
On 30 Nov 2008, at 10:35, Gavin wrote:

>
>
>> -----Original Message-----
>> From: Gavin (JIRA) [mailto:jira@apache.org]
>> Sent: Sunday, 30 November 2008 8:22 PM
>> To: dev@forrest.apache.org
>> Subject: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and  
>> Windows
>>
>>
>>    [ https://issues.apache.org/jira/browse/FOR-
>> 1108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-
>> tabpanel&focusedCommentId=12651805#action_12651805 ]
>>
>> Gavin commented on FOR-1108:
>> ----------------------------
>>
>> Well, I got the .Text and .POD plugins working fine on Windows too,  
>> and I
>> expect if I make the same changes throughout the rest will too. I  
>> will
>> test on a couple of whiteboard plugins next.
>>
>> Previously - with a seed-sample and no dispatcher, only the PDF  
>> plugin
>> worked, with the changes below then the above two also work now.
>>
>>  <locator>
>>          <match pattern="text.transform.*.*">
>>                  <select>
>>                          <location src="resources/stylesheets/{1}-to-
>> {2}.xsl" />
>>                          <location
>> src="{forrest:forrest.plugins}/ 
>> org.apache.forrest.plugin.output.Text/resou
>> rces/stylesheets/{1}-to-{2}.xsl"/>
>>                  </select>
>>    </match>
>>  </locator>
>
> So, all I did there then was add in a second match using the more  
> full path
> to the plugins stylesheet(s) and so then it worked fine.
>
> This is a workaround, one that we could extend and test to all  
> plugins and
> if works fine can get Windows devs back to working on trunk.

Getting windows up and running is the primary goal - well done!

> Or, we need to find the real cause and fix it there, may only be a  
> few lines
> of one file rather than altering every single plugin.

We do need to figure out the real cause of the problem though. It used  
to work and now it doesn't - who knows what hidden surprises there are  
because of this.

However, since I wasn't finding the time to fix the windows problem  
myself I'm not about to start demanding you fix this. However, it's  
worth adding a fixme referring to the original issue when adding the  
workaround.

As a windows user, I'll help with what I can, but I doubt 'll be  
actively working on this (my main machines are all Linux).

Ross

Re: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Brian M Dube <bd...@apache.org>.
On Sun, Nov 30, 2008 at 09:37:11PM +1000, Gavin wrote:
> 
> Making a start here, it would be helpful if anyone on linux/mac could
> provide the contents of build/tmp/locationmap and build/tmp/output.xmap from
> a seed-sample forrest run , with maybe 1 output plugin and 1 whiteboard
> output plugin enabled. 

Attached linux.locationmap.xml and linux.output.xmap to the issue.

Brian

RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Gavin <ga...@16degrees.com.au>.

> -----Original Message-----
> From: Gavin [mailto:gavin@16degrees.com.au]
> Sent: Monday, 1 December 2008 12:05 PM
> To: dev@forrest.apache.org
> Subject: RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and
> Windows
> 
> 
> 
> > -----Original Message-----
> > From: Brian M Dube [mailto:bdube@apache.org]
> > Sent: Monday, 1 December 2008 6:06 AM
> > To: dev@forrest.apache.org
> > Subject: Re: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and
> > Windows
> >
> > On Sun, Nov 30, 2008 at 09:37:11PM +1000, Gavin wrote:
> > >
> > > Making a start here, it would be helpful if anyone on linux/mac could
> > > provide the contents of build/tmp/locationmap and
> build/tmp/output.xmap
> > from
> > > a seed-sample forrest run , with maybe 1 output plugin and 1
> whiteboard
> > > output plugin enabled.
> >
> > I think you found something. On Windows, these two files are not
> > updated to reflect the chosen plugins, contrary to Linux.
> >
> > Brian
> 
> False alarm there, I just tried it again and the entries are placed there
> correctly. They come from the /var/pluginMountSnippet.xml and
> pluginLmMountSnippet.xml files. So even an entry for an unaltered plugin
> does appear, but those matches are looking for entries containing the full
> path and so when we alter a plugin to suit, it works.
> 
> I checked the PDF plugin again as this was never broken on Windows and
> found
> that the exact same fix we recently found we needed to do to other plugins
> was already present in the PDF plugin.
> 
> Thorsten committed this change back in February 18th [1] with the log
> message of 'making resources usable from other plugins' .
> 
> I have yet to find out why this change makes things work again on Windows
> but is not needed for Linux/MAC.

The only things I can see so far is David changing from ServiceManager to
ComponentManager in various areas such as XPathTransformer.java,
LocationMap.java and things like like [2] , but I have no clue whether this
would affect Windows in any way. Just thought I'd throw that in, in case
anyone wants to discount those from our search.

[2] -
http://svn.apache.org/viewvc/forrest/trunk/main/java/org/apache/forrest/?pat
hrev=694101


> 
> Gav...
> 
> [1] -
> http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plug
> in
> .output.pdf/locationmap.xml?r1=628558&r2=628586&diff_format=h
> 
> 



Re: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Ross Gardler <rg...@apache.org>.
On 2 Dec 2008, at 11:52, Gavin wrote:

>
>
>> -----Original Message-----
>> From: Thorsten Scherler [mailto:thorsten.scherler.ext@juntadeandalucia.es 
>> ]
>> Sent: Tuesday, 2 December 2008 9:43 PM
>> To: dev@forrest.apache.org
>> Subject: RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and
>> Windows
>>
>> El lun, 01-12-2008 a las 12:04 +1000, Gavin escribió:
>> ...
>>> I checked the PDF plugin again as this was never broken on Windows  
>>> and
>> found
>>> that the exact same fix we recently found we needed to do to other
>> plugins
>>> was already present in the PDF plugin.
>>>
>>> Thorsten committed this change back in February 18th [1] with the  
>>> log
>>> message of 'making resources usable from other plugins' .
>> ...
>>>
>>> [1] -
>>>
>> http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plug
>> in
>>> .output.pdf/locationmap.xml?r1=628558&r2=628586&diff_format=h
>>
>> Yeah, actually if we want to reuse resources from other plugins the
>> relative path does not work in the lm for plugins.
>>
>> The solution to add as fallback the absolute location will work for  
>> all
>> plugin as I understand it and brings the benefit of usability of the
>> resources.
>>
>

...

> However, if the above fix is useful in general for making reusable  
> resources
> available by default then it doesn't feel so bad. Combine that with  
> talk of
> future and markably different direction(s) for Forrest as a whole  
> then it
> might just be acceptable.

+1

Thorsten and I talked about the solution for reusing resources some  
time ago. The result was his commit you refer to.

A side effect that fixes a weird bug on a single platform is a plus.  
It is well documented thanks to your work and the discussion here and  
on the JIRA issue. I'd just make the patch and be done with it.

If it bites us in the ass in the future we can revisit.

Ross

Re: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by David Crossley <cr...@apache.org>.
Gavin wrote:
> From: David Crossley
> > Gavin wrote:
> > > > > >
> > > > > > The above discussed is not a hack but a clear enhancement. Well
> > > > > > e.g.
> > > > > > {forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/
> > > > > > should
> > > > > > be replaced by something shorter. Awesome would be {this} but not
> > > > > > sure
> > > > > > whether that is easily to implement.
> > > > >
> > > > > Don't forget that this would need to be handled by the
> > > > > Ant target that creates a new plugin from the template:
> > > > > http://forrest.apache.org/docs/dev/howto/howto-buildPlugin.html#seed
> > > >
> > > > I was thinking if they are required lines we could just add them in to
> > > > the
> > > > template directly so that they are there already, does that sound ok?
> > >
> > > Hmm, I'll expand on that.
> > >
> > > In the pluginTemplate we can add commented out example code to
> > > locationmap.xml like :-
> > >
> > >   <locator>
> > > <!-- Uncomment the below matches once you have a stylesheet you wish to
> > > use.
> > > Note that these are needed for the plugin to work on windows. See FOR-1108
> > > -->
> > >   <!--
> > >   <match pattern="plugin.transform.*.*">
> > >      <select>
> > >        <location src="resources/stylesheets/{1}-to-{2}.xsl" />
> > >          <location
> > > src="{forrest:forrest.plugins}/@plugin-name@/resources/stylesheets/{1}-to-{2}.xsl"/>
> > >      </select>
> > >    </match>
> > >    -->
> > >  </locator>
> > >
> > > Currently the <locator /> is empty. Then once a stylesheet has been
> > > created
> > > the dev can uncomment out the example.
> > 
> > My comment referred to the ant target which creates the new
> > plugin. It already edits some files from the pluginTemplate
> > on the way to add the plugin name, so it should be trivial
> > to add this extra locationmap match.
> 
> Ok, back to this.
> 
> The file I need to edit here for the ant target is
> /var/initial_plugins_locationmap.xml so I can add that no problem.
> 
> Just wanted to confirm, does it still want to be added to
> pluginTemplate/locationmap.xml as well ?

Sorry, i don't know what you are talking about with
editing main/var/initial_plugins_locationmap.xml file.
That is used when plugins are initialised at runtime
with the "init-plugins" target.

I was referring to the "seedPlugin" target
in $FORREST_HOME/plugins/build.xml
This creates a new plugin ready for the developer
to commence work.
It runs through every file in the template and
replaces the tokens such as "@plugin-name@".

So yes, add the example above to pluginTemplate/locationmap.xml

-David

RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Thorsten Scherler <th...@apache.org>.
On Fri, 2008-12-05 at 02:47 +1000, Gavin wrote:
...
> > > In the pluginTemplate we can add commented out example code to
> > > locationmap.xml like :-
> > >
> > >   <locator>
> > > <!-- Uncomment the below matches once you have a stylesheet you wish to
> > use.
> > > Note that these are needed for the plugin to work on windows. See FOR-
> > 1108
> > > -->
> > >   <!--
> > >   <match pattern="plugin.transform.*.*">
> > >      <select>
> > >        <location src="resources/stylesheets/{1}-to-{2}.xsl" />
> > >          <location
> > > src="{forrest:forrest.plugins}/@plugin-name@/resources/stylesheets/{1}-
> > to-{2
> > > }.xsl"/>
> > >      </select>
> > >    </match>
> > >    -->
> > >  </locator>
> > >
> > > Currently the <locator /> is empty. Then once a stylesheet has been
> > created
> > > the dev can uncomment out the example.
> > 
> > My comment referred to the ant target which creates the new
> > plugin. It already edits some files from the pluginTemplate
> > on the way to add the plugin name, so it should be trivial
> > to add this extra locationmap match.
> 
> Ok, that's fine I can do that, it will still need to be in comments though
> as there wont be a stylesheet for it to refer to until the plugin dev
> creates one.
> 

Why not: 
<match pattern="output.Text.home">
  <location
src="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/"/>
</match>

or 

<match pattern="org.apache.forrest.plugin.output.Text.home">
  <location
src="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/"/>
</match>

This way we have a nice lm match to refer to.

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>


RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Gavin <ga...@16degrees.com.au>.

> -----Original Message-----
> From: David Crossley [mailto:crossley@apache.org]
> Sent: Friday, 5 December 2008 2:14 AM
> To: dev@forrest.apache.org
> Subject: Re: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and
> Windows
> 
> Gavin wrote:
> > > > >
> > > > > The above discussed is not a hack but a clear enhancement. Well
> e.g.
> > > > > {forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/
> > > should
> > > > > be replaced by something shorter. Awesome would be {this} but not
> sure
> > > > > whether that is easily to implement.
> > > >
> > > > Don't forget that this would need to be handled by the
> > > > Ant target that creates a new plugin from the template:
> > > > http://forrest.apache.org/docs/dev/howto/howto-buildPlugin.html#seed
> > >
> > > I was thinking if they are required lines we could just add them in to
> the
> > > template directly so that they are there already, does that sound ok?
> >
> > Hmm, I'll expand on that.
> >
> > In the pluginTemplate we can add commented out example code to
> > locationmap.xml like :-
> >
> >   <locator>
> > <!-- Uncomment the below matches once you have a stylesheet you wish to
> use.
> > Note that these are needed for the plugin to work on windows. See FOR-
> 1108
> > -->
> >   <!--
> >   <match pattern="plugin.transform.*.*">
> >      <select>
> >        <location src="resources/stylesheets/{1}-to-{2}.xsl" />
> >          <location
> > src="{forrest:forrest.plugins}/@plugin-name@/resources/stylesheets/{1}-
> to-{2
> > }.xsl"/>
> >      </select>
> >    </match>
> >    -->
> >  </locator>
> >
> > Currently the <locator /> is empty. Then once a stylesheet has been
> created
> > the dev can uncomment out the example.
> 
> My comment referred to the ant target which creates the new
> plugin. It already edits some files from the pluginTemplate
> on the way to add the plugin name, so it should be trivial
> to add this extra locationmap match.

Ok, that's fine I can do that, it will still need to be in comments though
as there wont be a stylesheet for it to refer to until the plugin dev
creates one.

Cheers

Gav...

> 
> -David
> 
> 
> --
> Internal Virus Database is out-of-date.
> Checked by AVG.
> Version: 7.5.549 / Virus Database: 270.9.3/1787 - Release Date: 11/14/2008
> 8:32 AM


RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Gavin <ga...@16degrees.com.au>.

> -----Original Message-----
> From: David Crossley [mailto:crossley@apache.org]
> Sent: Friday, 5 December 2008 2:14 AM
> To: dev@forrest.apache.org
> Subject: Re: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and
> Windows
> 
> Gavin wrote:
> > > > >
> > > > > The above discussed is not a hack but a clear enhancement. Well
> e.g.
> > > > > {forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/
> > > should
> > > > > be replaced by something shorter. Awesome would be {this} but not
> sure
> > > > > whether that is easily to implement.
> > > >
> > > > Don't forget that this would need to be handled by the
> > > > Ant target that creates a new plugin from the template:
> > > > http://forrest.apache.org/docs/dev/howto/howto-buildPlugin.html#seed
> > >
> > > I was thinking if they are required lines we could just add them in to
> the
> > > template directly so that they are there already, does that sound ok?
> >
> > Hmm, I'll expand on that.
> >
> > In the pluginTemplate we can add commented out example code to
> > locationmap.xml like :-
> >
> >   <locator>
> > <!-- Uncomment the below matches once you have a stylesheet you wish to
> use.
> > Note that these are needed for the plugin to work on windows. See FOR-
> 1108
> > -->
> >   <!--
> >   <match pattern="plugin.transform.*.*">
> >      <select>
> >        <location src="resources/stylesheets/{1}-to-{2}.xsl" />
> >          <location
> > src="{forrest:forrest.plugins}/@plugin-name@/resources/stylesheets/{1}-
> to-{2
> > }.xsl"/>
> >      </select>
> >    </match>
> >    -->
> >  </locator>
> >
> > Currently the <locator /> is empty. Then once a stylesheet has been
> created
> > the dev can uncomment out the example.
> 
> My comment referred to the ant target which creates the new
> plugin. It already edits some files from the pluginTemplate
> on the way to add the plugin name, so it should be trivial
> to add this extra locationmap match.

Ok, back to this.

The file I need to edit here for the ant target is
/var/initial_plugins_locationmap.xml so I can add that no problem.

Just wanted to confirm, does it still want to be added to
pluginTemplate/locationmap.xml as well ?

Thanks

Gav...

> 
> -David
> 
> 
> --
> Internal Virus Database is out-of-date.
> Checked by AVG.
> Version: 7.5.549 / Virus Database: 270.9.3/1787 - Release Date: 11/14/2008
> 8:32 AM


Re: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by David Crossley <cr...@apache.org>.
Gavin wrote:
> > > >
> > > > The above discussed is not a hack but a clear enhancement. Well e.g.
> > > > {forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/
> > should
> > > > be replaced by something shorter. Awesome would be {this} but not sure
> > > > whether that is easily to implement.
> > >
> > > Don't forget that this would need to be handled by the
> > > Ant target that creates a new plugin from the template:
> > > http://forrest.apache.org/docs/dev/howto/howto-buildPlugin.html#seed
> > 
> > I was thinking if they are required lines we could just add them in to the
> > template directly so that they are there already, does that sound ok?
> 
> Hmm, I'll expand on that.
> 
> In the pluginTemplate we can add commented out example code to
> locationmap.xml like :-
> 
>   <locator>
> <!-- Uncomment the below matches once you have a stylesheet you wish to use.
> Note that these are needed for the plugin to work on windows. See FOR-1108
> -->
>   <!-- 
>   <match pattern="plugin.transform.*.*">
>      <select>
>        <location src="resources/stylesheets/{1}-to-{2}.xsl" />
>          <location
> src="{forrest:forrest.plugins}/@plugin-name@/resources/stylesheets/{1}-to-{2
> }.xsl"/>
>      </select>
>    </match> 
>    -->
>  </locator>
> 
> Currently the <locator /> is empty. Then once a stylesheet has been created
> the dev can uncomment out the example.

My comment referred to the ant target which creates the new
plugin. It already edits some files from the pluginTemplate
on the way to add the plugin name, so it should be trivial
to add this extra locationmap match.

-David

Re: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
El mié, 03-12-2008 a las 12:02 +1100, David Crossley escribió:
> Thorsten Scherler wrote:
...
> > > I don't know why, I just have the niggling feeling that because it works
> > > without this fix for Linux/MAC then applying the above fix for Windows feels
> > > to me like a hack.
> > 
> > The above discussed is not a hack but a clear enhancement. Well e.g.
> > {forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/ should
> > be replaced by something shorter. Awesome would be {this} but not sure
> > whether that is easily to implement.
> 
> Don't forget that this would need to be handled by the
> Ant target that creates a new plugin from the template:
> http://forrest.apache.org/docs/dev/howto/howto-buildPlugin.html#seed
> 

Not sure I understand since the create target only will create one time
the matches and then the plugin dev has to implement all custom ones. 

However picking up this idea the following can be implemented very easy
with the target David just mentioned. 

<match pattern="output.Text.home">
  <location
src="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/"/>
</match>

and then we can use {lm:output.Text.home} later on.

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)





RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Gavin <ga...@16degrees.com.au>.

> -----Original Message-----
> From: Gavin [mailto:gavin@16degrees.com.au]
> Sent: Wednesday, 3 December 2008 9:31 PM
> To: dev@forrest.apache.org
> Subject: RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and
> Windows
> 
> 
> 
> > -----Original Message-----
> > From: David Crossley [mailto:crossley@apache.org]
> > Sent: Wednesday, 3 December 2008 11:03 AM
> > To: dev@forrest.apache.org
> > Subject: Re: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and
> > Windows
> >
> > Thorsten Scherler wrote:
> > > Gavin wrote:
> > > ...
> > > >
> > > > Thanks, it also happens to be a (not necessarily the) fix for
> getting
> > trunk
> > > > working again for Windows Devs. We need to look a bit higher up in
> the
> > chain
> > > > as to what makes this work and if we can find a solution without
> > having to
> > > > have this fallback permanently in all plugins, current and future.
> > >
> > > Actually it maybe our bug after all. Looking at my commit you pointed
> > > out it feels right to have a non relative match as fallback. I mean
> the
> > > relative match in the lm is for the rare case that one is requesting
> the
> > > plugin directly or one needs a custom implementation of the match.
> > > However relative path for plugins means: one cannot reuse the lm match
> > > from a project or plugin without implementing the match.
> > >
> > > ...and that does not feel right and more like a bug.
> > >
> > > > I don't know why, I just have the niggling feeling that because it
> > works
> > > > without this fix for Linux/MAC then applying the above fix for
> Windows
> > feels
> > > > to me like a hack.
> > >
> > > The above discussed is not a hack but a clear enhancement. Well e.g.
> > > {forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/
> should
> > > be replaced by something shorter. Awesome would be {this} but not sure
> > > whether that is easily to implement.
> >
> > Don't forget that this would need to be handled by the
> > Ant target that creates a new plugin from the template:
> > http://forrest.apache.org/docs/dev/howto/howto-buildPlugin.html#seed
> 
> I was thinking if they are required lines we could just add them in to the
> template directly so that they are there already, does that sound ok?

Hmm, I'll expand on that.

In the pluginTemplate we can add commented out example code to
locationmap.xml like :-

  <locator>
<!-- Uncomment the below matches once you have a stylesheet you wish to use.
Note that these are needed for the plugin to work on windows. See FOR-1108
-->
  <!-- 
  <match pattern="plugin.transform.*.*">
     <select>
       <location src="resources/stylesheets/{1}-to-{2}.xsl" />
         <location
src="{forrest:forrest.plugins}/@plugin-name@/resources/stylesheets/{1}-to-{2
}.xsl"/>
     </select>
   </match> 
   -->
 </locator>

Currently the <locator /> is empty. Then once a stylesheet has been created
the dev can uncomment out the example.

Gav...


> 
> If so I'll do all this tomorrow.
> 
> Gav...
> 
> >
> > -David
> >
> >
> > --
> > Internal Virus Database is out-of-date.
> > Checked by AVG.
> > Version: 7.5.549 / Virus Database: 270.9.3/1787 - Release Date:
> 11/14/2008
> > 8:32 AM
> 
> 
> 
> --
> Internal Virus Database is out-of-date.
> Checked by AVG.
> Version: 7.5.549 / Virus Database: 270.9.3/1787 - Release Date: 11/14/2008
> 8:32 AM


RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Gavin <ga...@16degrees.com.au>.

> -----Original Message-----
> From: David Crossley [mailto:crossley@apache.org]
> Sent: Wednesday, 3 December 2008 11:03 AM
> To: dev@forrest.apache.org
> Subject: Re: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and
> Windows
> 
> Thorsten Scherler wrote:
> > Gavin wrote:
> > ...
> > >
> > > Thanks, it also happens to be a (not necessarily the) fix for getting
> trunk
> > > working again for Windows Devs. We need to look a bit higher up in the
> chain
> > > as to what makes this work and if we can find a solution without
> having to
> > > have this fallback permanently in all plugins, current and future.
> >
> > Actually it maybe our bug after all. Looking at my commit you pointed
> > out it feels right to have a non relative match as fallback. I mean the
> > relative match in the lm is for the rare case that one is requesting the
> > plugin directly or one needs a custom implementation of the match.
> > However relative path for plugins means: one cannot reuse the lm match
> > from a project or plugin without implementing the match.
> >
> > ...and that does not feel right and more like a bug.
> >
> > > I don't know why, I just have the niggling feeling that because it
> works
> > > without this fix for Linux/MAC then applying the above fix for Windows
> feels
> > > to me like a hack.
> >
> > The above discussed is not a hack but a clear enhancement. Well e.g.
> > {forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/ should
> > be replaced by something shorter. Awesome would be {this} but not sure
> > whether that is easily to implement.
> 
> Don't forget that this would need to be handled by the
> Ant target that creates a new plugin from the template:
> http://forrest.apache.org/docs/dev/howto/howto-buildPlugin.html#seed

I was thinking if they are required lines we could just add them in to the
template directly so that they are there already, does that sound ok?

If so I'll do all this tomorrow.

Gav...

> 
> -David
> 
> 
> --
> Internal Virus Database is out-of-date.
> Checked by AVG.
> Version: 7.5.549 / Virus Database: 270.9.3/1787 - Release Date: 11/14/2008
> 8:32 AM


Re: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by David Crossley <cr...@apache.org>.
Thorsten Scherler wrote:
> Gavin wrote:
> ...
> > 
> > Thanks, it also happens to be a (not necessarily the) fix for getting trunk
> > working again for Windows Devs. We need to look a bit higher up in the chain
> > as to what makes this work and if we can find a solution without having to
> > have this fallback permanently in all plugins, current and future.
> 
> Actually it maybe our bug after all. Looking at my commit you pointed
> out it feels right to have a non relative match as fallback. I mean the
> relative match in the lm is for the rare case that one is requesting the
> plugin directly or one needs a custom implementation of the match.
> However relative path for plugins means: one cannot reuse the lm match
> from a project or plugin without implementing the match. 
> 
> ...and that does not feel right and more like a bug. 
> 
> > I don't know why, I just have the niggling feeling that because it works
> > without this fix for Linux/MAC then applying the above fix for Windows feels
> > to me like a hack.
> 
> The above discussed is not a hack but a clear enhancement. Well e.g.
> {forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/ should
> be replaced by something shorter. Awesome would be {this} but not sure
> whether that is easily to implement.

Don't forget that this would need to be handled by the
Ant target that creates a new plugin from the template:
http://forrest.apache.org/docs/dev/howto/howto-buildPlugin.html#seed

-David

RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Thorsten Scherler <th...@apache.org>.
On Tue, 2008-12-02 at 21:52 +1000, Gavin wrote:
...
> 
> Thanks, it also happens to be a (not necessarily the) fix for getting trunk
> working again for Windows Devs. We need to look a bit higher up in the chain
> as to what makes this work and if we can find a solution without having to
> have this fallback permanently in all plugins, current and future.

Actually it maybe our bug after all. Looking at my commit you pointed
out it feels right to have a non relative match as fallback. I mean the
relative match in the lm is for the rare case that one is requesting the
plugin directly or one needs a custom implementation of the match.
However relative path for plugins means: one cannot reuse the lm match
from a project or plugin without implementing the match. 

...and that does not feel right and more like a bug. 

> 
> I don't know why, I just have the niggling feeling that because it works
> without this fix for Linux/MAC then applying the above fix for Windows feels
> to me like a hack.

The above discussed is not a hack but a clear enhancement. Well e.g.
{forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/ should
be replaced by something shorter. Awesome would be {this} but not sure
whether that is easily to implement.

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>


RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Gavin <ga...@16degrees.com.au>.

> -----Original Message-----
> From: Thorsten Scherler [mailto:thorsten.scherler.ext@juntadeandalucia.es]
> Sent: Tuesday, 2 December 2008 9:43 PM
> To: dev@forrest.apache.org
> Subject: RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and
> Windows
> 
> El lun, 01-12-2008 a las 12:04 +1000, Gavin escribió:
> ...
> > I checked the PDF plugin again as this was never broken on Windows and
> found
> > that the exact same fix we recently found we needed to do to other
> plugins
> > was already present in the PDF plugin.
> >
> > Thorsten committed this change back in February 18th [1] with the log
> > message of 'making resources usable from other plugins' .
> ...
> >
> > [1] -
> >
> http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plug
> in
> > .output.pdf/locationmap.xml?r1=628558&r2=628586&diff_format=h
> 
> Yeah, actually if we want to reuse resources from other plugins the
> relative path does not work in the lm for plugins.
> 
> The solution to add as fallback the absolute location will work for all
> plugin as I understand it and brings the benefit of usability of the
> resources.
> 

Thanks, it also happens to be a (not necessarily the) fix for getting trunk
working again for Windows Devs. We need to look a bit higher up in the chain
as to what makes this work and if we can find a solution without having to
have this fallback permanently in all plugins, current and future.

I don't know why, I just have the niggling feeling that because it works
without this fix for Linux/MAC then applying the above fix for Windows feels
to me like a hack.

However, if the above fix is useful in general for making reusable resources
available by default then it doesn't feel so bad. Combine that with talk of
future and markably different direction(s) for Forrest as a whole then it
might just be acceptable.

I will spend some more time tomorrow delving a bit deeper and see what I can
find as a better solution if there is one, any hints as to where to look
would be great. If I or someone else doesn't come up with one soon, then as
I've mentioned before, I'll commit what I've got.

If any other Windows Devs are able to confirm trunk also works for them with
these fixes that would be good also, and if there are any objections ...

Gav...

> salu2
> --
> Thorsten Scherler <thorsten.at.apache.org>
> Open Source Java <consulting, training and solutions>
> 
> Sociedad Andaluza para el Desarrollo de la Sociedad
> de la Información, S.A.U. (SADESI)
> 
> 
> 
> 
> 
> 
> --
> Internal Virus Database is out-of-date.
> Checked by AVG.
> Version: 7.5.549 / Virus Database: 270.9.3/1787 - Release Date: 11/14/2008
> 8:32 AM


RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
El lun, 01-12-2008 a las 12:04 +1000, Gavin escribió:
...
> I checked the PDF plugin again as this was never broken on Windows and found
> that the exact same fix we recently found we needed to do to other plugins
> was already present in the PDF plugin.
> 
> Thorsten committed this change back in February 18th [1] with the log
> message of 'making resources usable from other plugins' .
...
> 
> [1] -
> http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin
> .output.pdf/locationmap.xml?r1=628558&r2=628586&diff_format=h

Yeah, actually if we want to reuse resources from other plugins the
relative path does not work in the lm for plugins. 

The solution to add as fallback the absolute location will work for all
plugin as I understand it and brings the benefit of usability of the
resources. 

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)





RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Gavin <ga...@16degrees.com.au>.

> -----Original Message-----
> From: Brian M Dube [mailto:bdube@apache.org]
> Sent: Monday, 1 December 2008 6:06 AM
> To: dev@forrest.apache.org
> Subject: Re: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and
> Windows
> 
> On Sun, Nov 30, 2008 at 09:37:11PM +1000, Gavin wrote:
> >
> > Making a start here, it would be helpful if anyone on linux/mac could
> > provide the contents of build/tmp/locationmap and build/tmp/output.xmap
> from
> > a seed-sample forrest run , with maybe 1 output plugin and 1 whiteboard
> > output plugin enabled.
> 
> I think you found something. On Windows, these two files are not
> updated to reflect the chosen plugins, contrary to Linux.
> 
> Brian

False alarm there, I just tried it again and the entries are placed there
correctly. They come from the /var/pluginMountSnippet.xml and
pluginLmMountSnippet.xml files. So even an entry for an unaltered plugin
does appear, but those matches are looking for entries containing the full
path and so when we alter a plugin to suit, it works.

I checked the PDF plugin again as this was never broken on Windows and found
that the exact same fix we recently found we needed to do to other plugins
was already present in the PDF plugin.

Thorsten committed this change back in February 18th [1] with the log
message of 'making resources usable from other plugins' .

I have yet to find out why this change makes things work again on Windows
but is not needed for Linux/MAC.

Gav...

[1] -
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin
.output.pdf/locationmap.xml?r1=628558&r2=628586&diff_format=h




Re: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Brian M Dube <bd...@apache.org>.
On Sun, Nov 30, 2008 at 09:37:11PM +1000, Gavin wrote:
> 
> Making a start here, it would be helpful if anyone on linux/mac could
> provide the contents of build/tmp/locationmap and build/tmp/output.xmap from
> a seed-sample forrest run , with maybe 1 output plugin and 1 whiteboard
> output plugin enabled. 

I think you found something. On Windows, these two files are not
updated to reflect the chosen plugins, contrary to Linux.

Brian

RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Gavin <ga...@16degrees.com.au>.

> -----Original Message-----
> From: Gavin [mailto:gavin@16degrees.com.au]
> Sent: Sunday, 30 November 2008 8:35 PM
> To: dev@forrest.apache.org
> Subject: RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and
> Windows
> 
> 
> 
> > -----Original Message-----
> > From: Gavin (JIRA) [mailto:jira@apache.org]
> > Sent: Sunday, 30 November 2008 8:22 PM
> > To: dev@forrest.apache.org
> > Subject: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows
> >
> >
> >     [ https://issues.apache.org/jira/browse/FOR-
> > 1108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-
> > tabpanel&focusedCommentId=12651805#action_12651805 ]
> >
> > Gavin commented on FOR-1108:
> > ----------------------------
> >
> > Well, I got the .Text and .POD plugins working fine on Windows too, and
> I
> > expect if I make the same changes throughout the rest will too. I will
> > test on a couple of whiteboard plugins next.
> >
> > Previously - with a seed-sample and no dispatcher, only the PDF plugin
> > worked, with the changes below then the above two also work now.
> >
> >   <locator>
> >           <match pattern="text.transform.*.*">
> >                   <select>
> >                           <location src="resources/stylesheets/{1}-to-
> > {2}.xsl" />
> >                           <location
> >
> src="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/resou
> > rces/stylesheets/{1}-to-{2}.xsl"/>
> >                   </select>
> >     </match>
> >   </locator>
> 
> So, all I did there then was add in a second match using the more full
> path
> to the plugins stylesheet(s) and so then it worked fine.
> 
> This is a workaround, one that we could extend and test to all plugins and
> if works fine can get Windows devs back to working on trunk.
> 
> Or, we need to find the real cause and fix it there, may only be a few
> lines
> of one file rather than altering every single plugin.
> 
> I like the latter of course, but we currently lack active windows devs who
> have the time to look into the problem.
> 
> So, I'm going to look into this week and if anyone can help either by
> looking into also, or by answering any questions I throw at the list, then
> we might get somewhere.
> 
> Otherwise as this is holding me up from helping out with Forrest in
> general,
> I'd have to either move to Linux so I can continue on, or focus my
> attention
> elsewhere.
> 
> Gav...

Making a start here, it would be helpful if anyone on linux/mac could
provide the contents of build/tmp/locationmap and build/tmp/output.xmap from
a seed-sample forrest run , with maybe 1 output plugin and 1 whiteboard
output plugin enabled. 

Thanks

Gav...

> 
> >
> >
> > > Dispatcher, Cocoon 2.1 and Windows
> > > ----------------------------------
> > >
> > >                 Key: FOR-1108
> > >                 URL: https://issues.apache.org/jira/browse/FOR-1108
> > >             Project: Forrest
> > >          Issue Type: Bug
> > >          Components: Core operations, Plugin: internal.dispatcher
> > >    Affects Versions: 0.9-dev
> > >            Reporter: Ross Gardler
> > >            Priority: Blocker
> > >             Fix For: 0.9-dev
> > >
> > >         Attachments: core.log, dispatcher.xmap.diff, test.log,
> > test_dispatcher_site.zip, testRunWithDebug.log
> > >
> > >
> > > Since the update to Cocoon 2.1 Forrest and Dispatcher have broken on
> > windows.
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
> >
> > --
> > Internal Virus Database is out-of-date.
> > Checked by AVG.
> > Version: 7.5.549 / Virus Database: 270.9.3/1787 - Release Date:
> 11/14/2008
> > 8:32 AM
> 
> 
> 
> --
> Internal Virus Database is out-of-date.
> Checked by AVG.
> Version: 7.5.549 / Virus Database: 270.9.3/1787 - Release Date: 11/14/2008
> 8:32 AM


RE: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows

Posted by Gavin <ga...@16degrees.com.au>.

> -----Original Message-----
> From: Gavin (JIRA) [mailto:jira@apache.org]
> Sent: Sunday, 30 November 2008 8:22 PM
> To: dev@forrest.apache.org
> Subject: [jira] Commented: (FOR-1108) Dispatcher, Cocoon 2.1 and Windows
> 
> 
>     [ https://issues.apache.org/jira/browse/FOR-
> 1108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-
> tabpanel&focusedCommentId=12651805#action_12651805 ]
> 
> Gavin commented on FOR-1108:
> ----------------------------
> 
> Well, I got the .Text and .POD plugins working fine on Windows too, and I
> expect if I make the same changes throughout the rest will too. I will
> test on a couple of whiteboard plugins next.
> 
> Previously - with a seed-sample and no dispatcher, only the PDF plugin
> worked, with the changes below then the above two also work now.
> 
>   <locator>
>           <match pattern="text.transform.*.*">
>                   <select>
>                           <location src="resources/stylesheets/{1}-to-
> {2}.xsl" />
>                           <location
> src="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.Text/resou
> rces/stylesheets/{1}-to-{2}.xsl"/>
>                   </select>
>     </match>
>   </locator>

So, all I did there then was add in a second match using the more full path
to the plugins stylesheet(s) and so then it worked fine.

This is a workaround, one that we could extend and test to all plugins and
if works fine can get Windows devs back to working on trunk.

Or, we need to find the real cause and fix it there, may only be a few lines
of one file rather than altering every single plugin.

I like the latter of course, but we currently lack active windows devs who
have the time to look into the problem.

So, I'm going to look into this week and if anyone can help either by
looking into also, or by answering any questions I throw at the list, then
we might get somewhere.

Otherwise as this is holding me up from helping out with Forrest in general,
I'd have to either move to Linux so I can continue on, or focus my attention
elsewhere.

Gav...

> 
> 
> > Dispatcher, Cocoon 2.1 and Windows
> > ----------------------------------
> >
> >                 Key: FOR-1108
> >                 URL: https://issues.apache.org/jira/browse/FOR-1108
> >             Project: Forrest
> >          Issue Type: Bug
> >          Components: Core operations, Plugin: internal.dispatcher
> >    Affects Versions: 0.9-dev
> >            Reporter: Ross Gardler
> >            Priority: Blocker
> >             Fix For: 0.9-dev
> >
> >         Attachments: core.log, dispatcher.xmap.diff, test.log,
> test_dispatcher_site.zip, testRunWithDebug.log
> >
> >
> > Since the update to Cocoon 2.1 Forrest and Dispatcher have broken on
> windows.
> 
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 
> 
> 
> --
> Internal Virus Database is out-of-date.
> Checked by AVG.
> Version: 7.5.549 / Virus Database: 270.9.3/1787 - Release Date: 11/14/2008
> 8:32 AM