How to detect a custom flavor offline with Distribution Wizard

Hello ! I have build my custom Flavor named for exemple org.company:my-flavor:0.1

I put the content of the .xip generated in <permanentDirectory>/extension/repository

But then, and don’t forget that I work offline. The only way I found to made my flavor detected by Distribution Wizard was to edit the content of this file META-INF/extension.xed line 1342

<xwiki.extension.knownInvalidFlavors></xwiki.extension.knownInvalidFlavors> <xwiki.extension.knownFlavors>org.xwiki.platform:xwiki-platform-distribution-flavor-mainwiki/10.5, org.xwiki.platform:xwiki-platform-distribution-flavor-wiki/10.5, org.company:my-flavor:0.1, </xwiki.extension.knownFlavors>

But it’s not very smooth and not really easy to create an automatic deployement pipeline to have to edit this extension.xed file. Is there an other way to detect my local flavor ? Maybe something during the building of the flavor ?

My flavor is mostly inspired from the main wiki flavor just with a different name and some dependencies added in the .pom of xwiki-platform-distribution-flavor-mainwik

Bonus question :

If there is no other way that change extension.xed, is it a way to detect all version of a given flavor dependency ? I tried a regex such as org.company:my-flavor:.* or just org.company:my-flavor but it’s not working, he want the full name with the full version number.

Thanks !

Maybe you forgot to indicate that your extension is a flavor. The criteria for an extension to be matched as flavor is to have the category flavor. In Maven it means xwiki-platform/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-mainwiki/pom.xml at master · xwiki/xwiki-platform · GitHub for example.

Actually we mostly build the same flavor than the “official” one

xwiki-platform/xwiki-platform-distribution/xwiki-platform-distribution-flavor/xwiki-platform-distribution-flavor-mainwiki/pom.xml at master · xwiki/xwiki-platform · GitHub

We just add some jar and xar for ours extensions and renamed the flavor but the category flavor is here. The distribution wizard see it and install it well.

So I come back to my question the problem is we have to add the exact groupid:artifacename:version in this extension.xed file and we look for a way to not edit this file everytime we bump the flavor version.

I debugged it myself and indeed there is an issue: the flavor picker actually find the custom extension well but then it only display extension which are valid (meaning that it can create an install plan for it) and unfortunately it seems the validation step only download dependencies remotely (and does not find anything in your case of course).

There is an optimization for known flavors to skip validation step (if they are know they must be valid) which is why it’s working when you add your extension in the known flavors in extension.xed.

Working on it, should be fixed quickly.

That being said if you always want to use this specific flavor maybe the best would be to build a custom WAR too which indicate it as default UI (meaning no search for flavors, only this one will be proposed when you install your war). See https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/DistributionWizard#HUserInterface for more about default UI mode. It’s also possible to set the default UI in xwiki.properties instead of extension.xed.

Created Loading....

Thanks for your reactivity !