Mailing List Archive

Using plugins in local dir
Hello

I have modified a plugin and I want to install it in my site project.

If I have understand it correctly, according to this [1] I should copy
the whole directory to MYSITE/plugins and modify my forrest.properties
file as

project.required.plugins.src=${forrest.home}/plugins,${forrest.home}/
whiteboard/plugins,/export/forrest_plugins

Maybe this is a type, so I tried:
project.required.plugins.src=${project.home}/plugins,${forrest.home}/
plugins,${forrest.home}/whiteboard/plugins

I though everything was working correctly (and I submitted a bug for
this), but it seems I had some kind of problem with the cache. Right
now, after deleting all build directories it's not working (with both
project.required.plugins.src). Forrest uses the old version of the
plugin instead of the new one, located on MYSITE/plugins. I know this
plugin should work, because when I move the folder into the forrest
code (the default location for the plugins) I obtain the desired
output. Am I missing something here?

Regards,

Pablo

[1] http://forrest.apache.org/pluginDocs/plugins_0_90/usingPlugins.html
--
Pablo Barrera
http://gsyc.es/~barrera/
Re: Using plugins in local dir [ In reply to ]
Pablo Barrera wrote:
> Hello
>
> I have modified a plugin and I want to install it in my site project.

Do you really want to fork this code? That gives you the maintenance
headache of managing it in the future. Much better would be to propose
your modification as a contribution to the Forrest project where any
future changes to the plugin will be done in a way that will not break
your own modifications.

Of course, if these changes are highly local to your site and not of
interest to the wider community then you may need to maintain your own
version.

> If I have understand it correctly, according to this [1] I should copy
> the whole directory to MYSITE/plugins and modify my forrest.properties
> file as
>
> project.required.plugins.src=${forrest.home}/plugins,${forrest.home}/whiteboard/plugins,/export/forrest_plugins

That is just an example, the full text of the paragraph says:

"If you have a collection of local plugins you would like Forrest to use
then you need to add the directory to this property. For example:
project.required.plugins.src=${forrest.home}/plugins,${forrest.home}/whiteboard/plugins,/export/forrest_plugins"

The important part being. This is not as clear as it could be, a better
phrasing is:

"If you have a collection of plugins in a local directory, such as
'export/forrest_plugins' then you need to add that directory to this
property. For example:
project.required.plugins.src=${forrest.home}/plugins,${forrest.home}/whiteboard/plugins,/export/forrest_plugins"

> Forrest uses the old version of the
> plugin instead of the new one, located on MYSITE/plugins. I know this
> plugin should work, because when I move the folder into the forrest code
> (the default location for the plugins) I obtain the desired output. Am I
> missing something here?

Are your plugins in /export/forrest_plugins, that is where you have told
Forrest to look for them.

If yes...

This is now a different plugin, have you changed the name of the plugin?
If not then Forrest will stop looking for it once it finds a copy, with
the property setting you have aboe this means it will find the one in
Forrest first.

I ask again though, are you sure you want to fork this plugin?

Ross
RE: Using plugins in local dir [ In reply to ]
Ah yes, Ross, is King of Forrest.

Aside from all that vainglorious nonsense, how are you, old thing?

Mike.

-----Original Message-----
From: Ross Gardler [mailto:rgardler@apache.org]
Sent: 19 September 2008 21:24
To: user@forrest.apache.org
Subject: Re: Using plugins in local dir

Pablo Barrera wrote:
> Hello
>
> I have modified a plugin and I want to install it in my site project.

Do you really want to fork this code? That gives you the maintenance
headache of managing it in the future. Much better would be to propose
your modification as a contribution to the Forrest project where any
future changes to the plugin will be done in a way that will not break
your own modifications.

Of course, if these changes are highly local to your site and not of
interest to the wider community then you may need to maintain your own
version.

> If I have understand it correctly, according to this [1] I should copy
> the whole directory to MYSITE/plugins and modify my forrest.properties
> file as
>
>
project.required.plugins.src=${forrest.home}/plugins,${forrest.home}/whitebo
ard/plugins,/export/forrest_plugins

That is just an example, the full text of the paragraph says:

"If you have a collection of local plugins you would like Forrest to use
then you need to add the directory to this property. For example:
project.required.plugins.src=${forrest.home}/plugins,${forrest.home}/whitebo
ard/plugins,/export/forrest_plugins"

The important part being. This is not as clear as it could be, a better
phrasing is:

"If you have a collection of plugins in a local directory, such as
'export/forrest_plugins' then you need to add that directory to this
property. For example:
project.required.plugins.src=${forrest.home}/plugins,${forrest.home}/whitebo
ard/plugins,/export/forrest_plugins"

> Forrest uses the old version of the
> plugin instead of the new one, located on MYSITE/plugins. I know this
> plugin should work, because when I move the folder into the forrest code
> (the default location for the plugins) I obtain the desired output. Am I
> missing something here?

Are your plugins in /export/forrest_plugins, that is where you have told
Forrest to look for them.

If yes...

This is now a different plugin, have you changed the name of the plugin?
If not then Forrest will stop looking for it once it finds a copy, with
the property setting you have aboe this means it will find the one in
Forrest first.

I ask again though, are you sure you want to fork this plugin?

Ross
RE: Using plugins in local dir [ In reply to ]
Ooops... don't send personal eMails when drunk!

-----Original Message-----
From: Ross Gardler [mailto:rgardler@apache.org]
Sent: 19 September 2008 21:24
To: user@forrest.apache.org
Subject: Re: Using plugins in local dir

Pablo Barrera wrote:
> Hello
>
> I have modified a plugin and I want to install it in my site project.

Do you really want to fork this code? That gives you the maintenance
headache of managing it in the future. Much better would be to propose
your modification as a contribution to the Forrest project where any
future changes to the plugin will be done in a way that will not break
your own modifications.

Of course, if these changes are highly local to your site and not of
interest to the wider community then you may need to maintain your own
version.

> If I have understand it correctly, according to this [1] I should copy
> the whole directory to MYSITE/plugins and modify my forrest.properties
> file as
>
>
project.required.plugins.src=${forrest.home}/plugins,${forrest.home}/whitebo
ard/plugins,/export/forrest_plugins

That is just an example, the full text of the paragraph says:

"If you have a collection of local plugins you would like Forrest to use
then you need to add the directory to this property. For example:
project.required.plugins.src=${forrest.home}/plugins,${forrest.home}/whitebo
ard/plugins,/export/forrest_plugins"

The important part being. This is not as clear as it could be, a better
phrasing is:

"If you have a collection of plugins in a local directory, such as
'export/forrest_plugins' then you need to add that directory to this
property. For example:
project.required.plugins.src=${forrest.home}/plugins,${forrest.home}/whitebo
ard/plugins,/export/forrest_plugins"

> Forrest uses the old version of the
> plugin instead of the new one, located on MYSITE/plugins. I know this
> plugin should work, because when I move the folder into the forrest code
> (the default location for the plugins) I obtain the desired output. Am I
> missing something here?

Are your plugins in /export/forrest_plugins, that is where you have told
Forrest to look for them.

If yes...

This is now a different plugin, have you changed the name of the plugin?
If not then Forrest will stop looking for it once it finds a copy, with
the property setting you have aboe this means it will find the one in
Forrest first.

I ask again though, are you sure you want to fork this plugin?

Ross
RE: Using plugins in local dir [ In reply to ]
> -----Original Message-----
> From: Pablo Barrera [mailto:barrera@gsyc.es]
> Sent: Saturday, 20 September 2008 12:32 AM
> To: user@forrest.apache.org
> Subject: Using plugins in local dir
>
> Hello
>
> I have modified a plugin and I want to install it in my site project.

Well, are the modifications specific to your own needs or will they help
everyone?

If the latter, please just send a patch and we'll get it committed.

If the former and you don't want to contribute these mods then ...

>
> If I have understand it correctly, according to this [1] I should copy
> the whole directory to MYSITE/plugins and modify my forrest.properties
> file as
>
> project.required.plugins.src=${forrest.home}/plugins,${forrest.home}/
> whiteboard/plugins,/export/forrest_plugins
>
> Maybe this is a type, so I tried:
> project.required.plugins.src=${project.home}/plugins,${forrest.home}/
> plugins,${forrest.home}/whiteboard/plugins
>
> I though everything was working correctly (and I submitted a bug for
> this), but it seems I had some kind of problem with the cache. Right
> now, after deleting all build directories it's not working (with both
> project.required.plugins.src). Forrest uses the old version of the
> plugin instead of the new one, located on MYSITE/plugins. I know this
> plugin should work, because when I move the folder into the forrest
> code (the default location for the plugins) I obtain the desired
> output. Am I missing something here?

Yeah, I think as Ross has mentioned, you should rename the plugin, make sure
it is positioned in a path that is mentioned in the
project.required.plugins.src.

When cleaning out plugins, sometimes it is necessary to to a 'build clean' ,
'build' in the $forrest_home/main directory, as well as a 'forrest clean'
from your $project_home dir.

Gav...

>
> Regards,
>
> Pablo
>
> [1] http://forrest.apache.org/pluginDocs/plugins_0_90/usingPlugins.html
> --
> Pablo Barrera
> http://gsyc.es/~barrera/
>
>
> --
> Internal Virus Database is out-of-date.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 270.6.21 - Release Date: 9/11/2008
> 12:00 AM
Re: Using plugins in local dir [ In reply to ]
On 19/09/2008, at 21:24:11, Ross Gardler wrote:

> Pablo Barrera wrote:
>> Hello
>> I have modified a plugin and I want to install it in my site project.
>
> Do you really want to fork this code? That gives you the maintenance
> headache of managing it in the future. Much better would be to
> propose your modification as a contribution to the Forrest project
> where any future changes to the plugin will be done in a way that
> will not break your own modifications.
>

I am totally agree. But right now the plugin is not finished and in
it's current state breaks the tei plugin for everybody else. When it
is ready I will be glad to send it to the list but right now I need to
have it working with a dirty hack (for example, no configuration
options).

> Of course, if these changes are highly local to your site and not of
> interest to the wider community then you may need to maintain your
> own version.

Right now, they are. But my plan is to work a little bit more on then
to make it more general.

>> If I have understand it correctly, according to this [1] I should
>> copy the whole directory to MYSITE/plugins and modify my
>> forrest.properties file as
>> project.required.plugins.src=${forrest.home}/plugins,$
>> {forrest.home}/whiteboard/plugins,/export/forrest_plugins
>
> That is just an example, the full text of the paragraph says:
>
> "If you have a collection of local plugins you would like Forrest to
> use then you need to add the directory to this property. For
> example: project.required.plugins.src=${forrest.home}/plugins,$
> {forrest.home}/whiteboard/plugins,/export/forrest_plugins"
>
> The important part being. This is not as clear as it could be, a
> better phrasing is:
>
> "If you have a collection of plugins in a local directory, such as
> 'export/forrest_plugins' then you need to add that directory to this
> property. For example: project.required.plugins.src=${forrest.home}/
> plugins,${forrest.home}/whiteboard/plugins,/export/forrest_plugins"
>
>> Forrest uses the old version of the plugin instead of the new one,
>> located on MYSITE/plugins. I know this plugin should work, because
>> when I move the folder into the forrest code (the default location
>> for the plugins) I obtain the desired output. Am I missing
>> something here?
>
> Are your plugins in /export/forrest_plugins, that is where you have
> told Forrest to look for them.
>

Is /export/ a global path or a relative path? I guess it's global.

The line I was using was:
project.required.plugins.src=${project.home}/plugins,${forrest.home}/
plugins,${forrest.home}/whiteboard/plugins

If I have understand it correctly, I should change it to:
project.required.plugins.src=/home/pablo/MYSITE/plugins,$
{forrest.home}/plugins,${forrest.home}/whiteboard/plugins

and forrest will look first to my directory, so I don't need to change
the name to the plugin.

> If yes...
>
> This is now a different plugin, have you changed the name of the
> plugin? If not then Forrest will stop looking for it once it finds a
> copy, with the property setting you have aboe this means it will
> find the one in Forrest first.
>
> I ask again though, are you sure you want to fork this plugin?

Right now, I am pretty sure. Next week will be a different thing.


--
Pablo Barrera
http://gsyc.es/~barrera/
Re: Using plugins in local dir [ In reply to ]
Den 22. sep. 2008 kl. 11.02 skrev Pablo Barrera:

> On 19/09/2008, at 21:24:11, Ross Gardler wrote:
>
>> Do you really want to fork this code? That gives you the
>> maintenance headache of managing it in the future. Much better
>> would be to propose your modification as a contribution to the
>> Forrest project where any future changes to the plugin will be done
>> in a way that will not break your own modifications.
>>
>
> I am totally agree. But right now the plugin is not finished and in
> it's current state breaks the tei plugin for everybody else. When it
> is ready I will be glad to send it to the list but right now I need
> to have it working with a dirty hack (for example, no configuration
> options).

Why don't you then just modify the TEI plugin in your local Forrest
copy, and use 'ant local-deploy' to make your changes available to
Forrest? That way there's no need to a separate plugin location, it is
easy to wrap up your changes when you are ready to submit your
updates, and in the meantime your hacks are only visislbe to you:)

Best regards,
Sjur
Re: Using plugins in local dir [ In reply to ]
On 22/09/2008, at 10:31:47, Sjur Moshagen wrote:

> Den 22. sep. 2008 kl. 11.02 skrev Pablo Barrera:
>
>> On 19/09/2008, at 21:24:11, Ross Gardler wrote:
>>
>>> Do you really want to fork this code? That gives you the
>>> maintenance headache of managing it in the future. Much better
>>> would be to propose your modification as a contribution to the
>>> Forrest project where any future changes to the plugin will be
>>> done in a way that will not break your own modifications.
>>>
>>
>> I am totally agree. But right now the plugin is not finished and in
>> it's current state breaks the tei plugin for everybody else. When
>> it is ready I will be glad to send it to the list but right now I
>> need to have it working with a dirty hack (for example, no
>> configuration options).
>
> Why don't you then just modify the TEI plugin in your local Forrest
> copy, and use 'ant local-deploy' to make your changes available to
> Forrest? That way there's no need to a separate plugin location, it
> is easy to wrap up your changes when you are ready to submit your
> updates, and in the meantime your hacks are only visislbe to you:)
>

I was thinking about that also, but I need to deploy the site in a
server that is synchronized with forrest trunk.

Thanks

Pablo

--
Pablo Barrera
http://gsyc.es/~barrera/