Am 30.01.2012 09:33, schrieb Thomas Mortagne:
* Store XAR pages into 2 files:
> ** one file for the content itself saved without XML-encoding, as plain text
> ** another file containing the metadata
> * Modify our XAR plugin so that it combines the 2 files into one XML file in the
XWiki XML file format when it generates the XAR.
> * Adding a Mojo so that the user can upload a given page into a running instance
would be the icing on the cake.
> * We'll also need another mojo that takes an existing XAR and extracts it and
split pages into the 2 files mentioned above.
I have implemented a simliar approach in my private workspace. I have
* a mojo that parses wiki pages xml files for #include and #attach
directives (allows storing attachments in it's original form in SCM).
The result is written into target/resources.
* the normal xar packaging reads the xml files from target/resources,
creates the packaging.xml and creates the xar file.
* I have extended the rest interface by a xar import/export feature.
* I have an mojo that deploys the created xar via the rest interface.
It works quite well. I am working with eclipse. Via the external tool
configuration I can deploy the xar directly from the IDE.
If someone is interrested I can contribute the code.
For me an ideal solution would be an extended XAR file, that can contain
wiki pages (xml), java classes (with @Component annotations) and
frontend resources (javascript, GWT, ...). Such a XAR file should be
deployable via the rest interface. On the maven layer it should be an
normal jar packaging project with additional resources (wiki pages,
attachments).
Richard