You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Ross Gardler (JIRA)" <ji...@apache.org> on 2005/07/27 16:58:19 UTC

[jira] Commented: (FOR-585) Provide full list of plugins via "Activate Plugins" list

    [ http://issues.apache.org/jira/browse/FOR-585?page=comments#action_12316919 ] 

Ross Gardler commented on FOR-585:
----------------------------------

I've applied patch ActivatePluginPatch270705.diff but I'm not closing this issue as the current solution causes a maintenance problem since all plugin names are hard coded into the java code. We need to extract those from the plugins.xml file.

There was one problem with the patch, it inserted spaces into the property value, this breaks the plugin installation. Please be sure to thoroughly test (I've fixed this)

Don't forget to update Documentation when things change (I did this for you too)

I note that the PDF plugin is always enabled. This is the case in a fresh-site from Forrest. We need to create a new seed-site that has minimal content for use by this code.



> Provide full list of plugins via "Activate Plugins" list
> --------------------------------------------------------
>
>          Key: FOR-585
>          URL: http://issues.apache.org/jira/browse/FOR-585
>      Project: Forrest
>         Type: Improvement
>   Components: Tool: Eclipse config
>     Reporter: Ross Gardler
>     Priority: Minor
>  Attachments: ActivatePluginPatch270705.diff
>
> When creating a new project using the wizard one of the pages allows the user to activate the views plugins. This page should provide a list of all available plugins, together with a description of each. From this page the user will be able to select the plugins they wish to activate in the new project.
> This wizard page should be designed in such a way that it can be reused by another wizard to enable/disable plugins in use.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (FOR-585) Provide full list of plugins via "Activate Plugins" list

Posted by Ross Gardler <rg...@apache.org>.
David Crossley wrote:
> Anil Ramnanan wrote:
> 
>>Ross Gardler wrote:
>>
>>
>>>The wizard will then use this method to get the URL for each of the
>>>plugin descriptors and processes them as you intended above.
>>>
>>>When we change the forrest configuration system we would just need to
>>>change the way the forrest.properties are read into the above class.
>>>
>>
>>I am currently working on getting the plugin descriptors from the
>>forrest.properties file. What happens if there are no plugin descriptors
>>defined ?
> 
> 
> It uses the default. See main/fresh-site/forrest.properties
> and main/webapp/default-forrest.properties
> 
> 
>>Is there somewhere that I can get a default list of
>>descriptors from ? I ask because when a new project is seeded
>>forrest.plugins.descriptors is not set as active.
>>
>>Also, I noticed the the default descirptors are all located online.When
>>user is offline,  where do you get the list of plugins then ?
> 
> 
> They are in the user's forrest distribution at
> plugins/plugins.xml
> whiteboard/plugins/whiteboard-plugins.xml

But these should not be used (see my other mail). They are there in 0.7 
so that fresh-site will always build even if the user is offline, but 
they may be out of date. I'll raise an issue on this now.

Ross

Re: [jira] Commented: (FOR-585) Provide full list of plugins via "Activate Plugins" list

Posted by David Crossley <cr...@apache.org>.
Anil Ramnanan wrote:
> Ross Gardler wrote:
> 
> > The wizard will then use this method to get the URL for each of the
> > plugin descriptors and processes them as you intended above.
> >
> > When we change the forrest configuration system we would just need to
> > change the way the forrest.properties are read into the above class.
> >
> I am currently working on getting the plugin descriptors from the
> forrest.properties file. What happens if there are no plugin descriptors
> defined ?

It uses the default. See main/fresh-site/forrest.properties
and main/webapp/default-forrest.properties

> Is there somewhere that I can get a default list of
> descriptors from ? I ask because when a new project is seeded
> forrest.plugins.descriptors is not set as active.
> 
> Also, I noticed the the default descirptors are all located online.When
> user is offline,  where do you get the list of plugins then ?

They are in the user's forrest distribution at
plugins/plugins.xml
whiteboard/plugins/whiteboard-plugins.xml

David

Re: [jira] Commented: (FOR-585) Provide full list of plugins via "Activate Plugins" list

Posted by Anil Ramnanan <li...@peppersauce.org>.
Ross Gardler wrote:

>
> In other words use the fetch-plugins-descriptors task in
> FORREST_HOME/main/targets/plugins.xml to retrieve the descriptors and
> then process the downloaded files that can be found in
> ${project.temp-dir}.
>
I have uploaded a patch that works by reading the forrest.properties
file to get the descriptors. I just have to modify
getPluginDescriptorURLs()  to use the Ant sscripts instead.

Anil.

Re: [jira] Commented: (FOR-585) Provide full list of plugins via "Activate Plugins" list

Posted by Ross Gardler <rg...@apache.org>.
Anil Ramnanan wrote:
> Ross Gardler wrote:
> 
> 
>>The wizard will then use this method to get the URL for each of the
>>plugin descriptors and processes them as you intended above.
>>
>>When we change the forrest configuration system we would just need to
>>change the way the forrest.properties are read into the above class.
>>
>>
> 
> I am currently working on getting the plugin descriptors from the
> forrest.properties file. What happens if there are no plugin descriptors
> defined ? Is there somewhere that I can get a default list of
> descriptors from ? I ask because when a new project is seeded
> forrest.plugins.descriptors is not set as active.

If a property does not exist in the project forrest.properties file it 
uses the settings in the users forrest.properties (in their home 
directory), if there is nothing in there then it uses the setting from 
FORREST_HOME/main/webapp/default-forrest.properties

> Also, I noticed the the default descirptors are all located online.When
> user is offline,  where do you get the list of plugins then ?

At this stage you don't. The reason for this is that plugins have a 
different release cycle than Forrest. Meaning that it is updated much 
more frequently than Forrest. Therefore we need to retrieve an up to 
date list.

However, the descriptor file need not be online, any protocol that the 
ANT get task is supported. So a user who finds themselves offline alot 
could change the forest.plugins.descriptors file to include a file:// 
protocol to a downloaded version.

We have, in the past, considered doing a separate download of all the 
plugins to facilitate offline use (probably do four actually, input, 
output, internal, whiteboard). We could also do special downloads for 
certain use cases (views, publishing etc.) But nobody has actually found 
the time to do this yet.

Ultimately, we want to modify the plugins system so that it will use 
local files in preference to remote files if they are present in 
FORREST_HOME/plugins. But again, nobody has actually done this yet. I 
have put most of the infrastructure in place when I did the versioned 
plugin stuff. It should be a relatively small job to finish, but as 
ever, someone needs to have a strong enough itch.

We do *not* want this kind of functionality being written into the 
Eclipse plugin. This should only be an interface to functionality in the 
core Forrest application, there should be no new functionality in it.

----

So what should you do in the Eclipse plugin?

Given that behaviour will change in Forrest you want to implement 
something that will not require modification when Forrest changes. I'd 
therefore suggest that you use Forrests ANT scripts to retrieve the 
relevant descriptor files.

In other words use the fetch-plugins-descriptors task in 
FORREST_HOME/main/targets/plugins.xml to retrieve the descriptors and 
then process the downloaded files that can be found in ${project.temp-dir}.

This way whenever we modify the method for retrieving the descriptors 
(i.e. allow the use of local descriptors if they are available) your 
Eclipse plugin will automatically use the new functionality.

Ross

Re: [jira] Commented: (FOR-585) Provide full list of plugins via "Activate Plugins" list

Posted by Anil Ramnanan <li...@peppersauce.org>.
Ross Gardler wrote:

> The wizard will then use this method to get the URL for each of the
> plugin descriptors and processes them as you intended above.
>
> When we change the forrest configuration system we would just need to
> change the way the forrest.properties are read into the above class.
>
>
I am currently working on getting the plugin descriptors from the
forrest.properties file. What happens if there are no plugin descriptors
defined ? Is there somewhere that I can get a default list of
descriptors from ? I ask because when a new project is seeded
forrest.plugins.descriptors is not set as active.

Also, I noticed the the default descirptors are all located online.When
user is offline,  where do you get the list of plugins then ?

Regards,
Anil



Re: [jira] Commented: (FOR-585) Provide full list of plugins via "Activate Plugins" list

Posted by Ross Gardler <rg...@apache.org>.
Anil Ramnanan wrote:
> Ross Gardler (JIRA) wrote:
> 
>> Ross Gardler commented on FOR-585:
>> ----------------------------------
>>
>> I've applied patch ActivatePluginPatch270705.diff but I'm not closing 
>> this issue as the current solution causes a maintenance problem since 
>> all plugin names are hard coded into the java code. We need to extract 
>> those from the plugins.xml file.
>>  
>>
> I am going to use the plugins.xml file located in _FORREST_HOME/plugins 
> to get the list of available plugins. Is this the right location ? I ask 
> because I see taht there is a plugin.descriptors properties in 
> forrest.properties which points to 
> http://forrest.apache.org/plugins/plugins.xml.

The current solution is fine for now. Don't get too bogged down in 
detail, you have much to do for GSoC and this goes beyond the scope of 
your original proposal. I have added it to the issue tracker as a 
reminder of potential improvements not as an "instruction" for any 
particular dev.

That said, please feel free to go ahead and implement it if you want to 
scratch the itch, as long as you understand this is not something that I 
(with my GSoC mentor hat on) consider a requirement for your GSoC 
proposal. If you choose not to implement this please add a comment to 
the issue linking to this thread in the archives as you have raised some 
important points that we should maintain.

Now, to answer your question...

The plugins.descriptors file can actually take multiple values, i.e. 
there can be more than one descriptor. So you should really take this 
property and interpret all the available plugins in the various descriptors.

The reason for multiple descriptors is that people may build custom 
plugins for their own site.

Furthermore, you should use the published version because plugins have a 
different release cycle to that of Forrest. Hence there may be more 
plugins available than are specified in the local 
FORREST_HOME/plugins/plugins.xml file.

Finally, that particular file is not a part of the binary distribution 
of Forrest, so your solution would only work with source distributions.

How does this sound as a solution:

We create a forrestProperties.java file which will read in the values 
from forrest.properties and make them available via appropriate methods, 
for example:

/**
  * Retrieve a list of plugin descriptor files used by this site.
  * @return an array of URLs pointing to plugin descriptor files
  */
public Array getPluginDescriptorURLs();

The wizard will then use this method to get the URL for each of the 
plugin descriptors and processes them as you intended above.

When we change the forrest configuration system we would just need to 
change the way the forrest.properties are read into the above class.

Ross


Re: [jira] Commented: (FOR-585) Provide full list of plugins via "Activate Plugins" list

Posted by Anil Ramnanan <li...@peppersauce.org>.
Ross Gardler (JIRA) wrote:

>Ross Gardler commented on FOR-585:
>----------------------------------
>
>I've applied patch ActivatePluginPatch270705.diff but I'm not closing this issue as the current solution causes a maintenance problem since all plugin names are hard coded into the java code. We need to extract those from the plugins.xml file.
>  
>
I am going to use the plugins.xml file located in _FORREST_HOME/plugins 
to get the list of available plugins. Is this the right location ? I ask 
because I see taht there is a plugin.descriptors properties in 
forrest.properties which points to 
http://forrest.apache.org/plugins/plugins.xml.

Anil.