On Nov 17, 2011, at 9:57 AM, Vincent Massol wrote:

> Hi devs,
> 
> Since we're going to use Maven POM metadata to display extensions in the 
> Extension Manager UI it's important that we have all data filled and with 
> correct value.
> 
> Sergiu pointed to me that currently our website <url> are wrong.
> 
> This is because the top level POM has <url>http://xwiki.org</url> and Maven 
> automatically suffixes it with artifact Ids.
> 
> For example for Commons Component API this gives us:
> 
> <url>http://xwiki.org/xwiki-commons-pom/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-api</url>
> 
> which is not pointing to anything valid.
> 
> I see 2 ways of fixing this:
> 
> Solution 1
> ========
> 
> Do as I started this morning, i.e. set the <url> explicitly. For example I've 
> set PHP Macro module URL this morning to 
> <url>http://extensions.xwiki.org/xwiki/bin/view/Extension/PHP+Macro</url> and 
> Commons Observation API (the 3 modules: parent + api + local) to  
> <url>http://extensions.xwiki.org/xwiki/bin/view/Extension/Observation+Module</url>.
> 
> Pros:
> - Easy and we can point to wherever the documentation is located
> 
> Cons:
> - Tedious
> - Fragile. If we rename a page on the wiki then the link is broken
> 
> Solution 2
> ========
> 
> Set the top level URL to something like:
> 
> <url>http://xwiki.org/documentation?id=</url>
> 
> For example for Commons Component API this will generate:
> 
> <url>http://xwiki.org/documenation?id=/xwiki-commons-pom/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-api</url>
> 
> Then:
> * Have an apache redirection for /documentation to some wiki page such as 
> http://xwiki.org/xwiki/bin/view/Main/ModuleDocumentation
> * Have the logic inside that page to transform paths (such as 
> "/xwiki-commons-pom/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-api"
>  into proper URLs). Since I don't think we can have a generic logic, I'd 
> simply put a big hashtable to start with.
> 
> Pros:
> - Simple, no need to modify all poms. We only need to change the top level 
> pom <url> value
> - Much easier to keep up to date since when we rename pages all we need to do 
> is edit the ModuleDocumentation page. Actually when we support page renames 
> across wikis we could have the links in that page be automatically renamed ;) 
> With Solution 1, when you rename the URL you need to re-release the module 
> which is a big pain.
> 
> Cons:
> - I can't see any really :) We just need to be sure that 
> http://xwiki.org/documentation is available.

ah found one cons:

- When we change the maven directory structure, we'll need to update the 
ModuleDocumentation page to update the mappings.

-Vincent

> 
> So I'm definitely for 2, WDYT?
> 
> Thanks
> -Vincent
> 
> 
> 
> 
> 
> 
> 

_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to