On Tue, Aug 28, 2012 at 4:20 PM, Vincent Massol
<vincent(a)massol.net> wrote:
On Aug 28, 2012, at 3:44 PM, Thomas Mortagne <thomas.mortagne(a)xwiki.com> wrote:
> On Tue, Aug 28, 2012 at 3:35 PM, Vincent Massol <vincent(a)massol.net> wrote:
>>
>> On Aug 28, 2012, at 3:31 PM, Thomas Mortagne <thomas.mortagne(a)xwiki.com>
wrote:
>>
>>> On Tue, Aug 28, 2012 at 3:23 PM, Thomas Mortagne
>>> <thomas.mortagne(a)xwiki.com> wrote:
>>>> On Tue, Aug 28, 2012 at 3:18 PM, Vincent Massol
<vincent(a)massol.net> wrote:
>>>>>
>>>>> On Aug 28, 2012, at 2:50 PM, Thomas Mortagne
<thomas.mortagne(a)xwiki.com> wrote:
>>>>>
>>>>>> On Tue, Aug 28, 2012 at 1:37 PM, Vincent Massol
<vincent(a)massol.net> wrote:
>>>>>>>
>>>>>>> On Aug 28, 2012, at 1:15 PM, Thomas Mortagne
<thomas.mortagne(a)xwiki.com> wrote:
>>>>>>>
>>>>>>>> Hi guys,
>>>>>>>>
>>>>>>>> I would like to modify a bit the Maven XAR plugin to add
in the
>>>>>>>> package.xml some extension related informations like the
extension id
>>>>>>>> and version at the very least.
>>>>>>>
>>>>>>> Why not package the pom.xml instead in META-INF/maven/* as
it's done by the Maven JAR plugin?
>>>>>>
>>>>>> Because it's not supposed as part of XAR format by existing
XAR
>>>>>> parser, you will get an error because it will fail to parse it as
a
>>>>>> document. The proposal here is to use something that already
exists,
>>>>>> does not break anything and is very easy to do.
>>>>>
>>>>> I personally much prefer to add META-INF support over changing the
package.xml format because it's much better aligned with all other formats like JAR,
EAR, WAR, etc and with the way we handle JAR extensions.
>>>>
>>>> I think you don't understand what I mean here. The issue is not that
>>>> it's complex to support it, adding support in 4.2 for META-INF will
>>>> not change the fact that you will get an error in older version with
>>>> your XAR.
>>>>
>>>>>
>>>>> It doesn't look complex to add either, it's a matter of
excluding META-INF files from the parser and to use the Maven Archiver (see
http://maven.apache.org/shared/maven-archiver/).
>>>
>>> Making the XAR format depends on Maven is not exactly something
>>> generic or even very nice. Core extension scanner is looking at the
>>> pom located in jar file among other things in order to find as much as
>>> it can but lets not forget that this is a hack and nothing else.
>>
>> Whatever the solution we need consistency IMO. If your proposal is to create an
extension.xml file located in META-INF/xwiki and that we would put in all our extension
types then I'm all for it too.
>>
>> I don't like mixing extension information with packaging information. For me
package.xml shouldn't contain extension information.
>
> It's exactly the same thing. The package.xml file is the XAR way to
> provide informations about the file and is generated from the pom.xml.
> It already provide the a subset of extension informations (name,
> version, license, etc.) so the proposal here is about adding more
> things.
For me the package.xml should probably even be removed or at least a lot of information
should be removed. There's no point in listing the files explicitly for example. Same
for whether it's a backup pack or not.
And a lot of the information currently in package.xml should be moved to
META-INF/xwiki/extension.xml such as author, license, version, name, description.
So I'm definitely with you about creating a XWiki-specific descriptor (not tied to
maven) located in META-INF/xwiki/extension.xml for all our extensions, but beefing up
package.xml goes in the wrong direction IMO.
At the very least I'd like that we agree about where we'd like to go (I've
made a proposal with META-INF/xwiki/extension.xml) and then discuss how to get there and
what it takes. If it means going through intermediary steps, then fine, the important part
for me being to agree on where we want to go.
Maybe but that's a different subject and IMO it sounds like creating a
new packaging format for wiki pages.