Deprecate/legacify old XAR import classes

Hi devs,

Right now we have a config property named xwiki.action.import.xar.usefilter to decide whether to use the new filter stream-based XAR import or the old Packager-based one. It’s been there since XWiki 6.2. The original reason was to allow users to use the old system while we were stabilizing the new one.

It happens that there are some issues related to the Package-based code (security, etc) and in any case it’s almost dead code since the filter stream-based import is now stable enough and I don’t see any reason to want to use the old system.

This is a proposal to legacy the old XAR importer classes and remove the IF at xwiki-platform/ImportAction.java at f46d47d6c5fe2bfca32a1536163942e37e1d7054 · xwiki/xwiki-platform · GitHub

Impl detail note: I see in the code that we have xwiki-platform/ImportAction.java at f46d47d6c5fe2bfca32a1536163942e37e1d7054 · xwiki/xwiki-platform · GitHub I’m not sure why this is needed and what we can do to remove the Package and DocumentInfo classes there.

WDYT?

Thanks

As indicated in the comment, that’s retro compatibility (the import action is expected to expose a report of the import in the context).

Note that this is not the only place where the old packer plugin is still used, we would need to refactor the packager Maven plugin too (which is still used for many tests). Of course, we could also decide to use the legacy JAR in the Maven plugin, but it’s not very nice.

One first and easy step would be to remove the property and remove the IF at xwiki-platform/ImportAction.java at f46d47d6c5fe2bfca32a1536163942e37e1d7054 · xwiki/xwiki-platform · GitHub

As second step would the deprecation and removal of old XAR import classes.

WDYT?

Thanks

+1

Step 1 done in Loading...