Local Maven Extension automatically add to Navigation Panel

Hi All.

I’ve been playing around a lot with creating extensions with maven and have installed a couple of my basic extensions on the farm from my local maven repository.

I know that you can add a Top-Level Extension page to the Navigation Panel in administration. Is there an option when building the maven extension to have it added to the Navigation panel automatically when installed?

Also, is there a list of available properties for the pom.xml file for extensions?

If you mean some Maven plugin which would trigger the installation of an extension at the end of the build, no, there is no such thing right now. All you can do right now is add your local repository as an extensions repository in xwiki.properties so that you can install extension from there.

Do you mean https://extensions.xwiki.org/xwiki/bin/view/Extension/Extension%20Module/Repositories/Maven/#HCustomproperties ?

Do you man https://extensions.xwiki.org/xwiki/bin/view/Extension/Extension%20Module/Repositories/Maven/#HCustomproperties ?

Thanks @tmortagne that’ll definitely help.

I have the local maven repository setup and working. What I meant was, is there a way to add the top level page of the newly installed into the inclusions for PanelsCode.NavigationConfigurations instead of having to manually drag it from the list of excluded pages to the navigation panel in.

For more of an idea of what I’m trying to do, the extension I’m using is a simple class I’ve setup manually instead of AWM. I’ve installed it on the farm and that’s all working. Example installed “Servers”, and added it to the navigation panel so that users can access it easily. I’ve removed the application panel in the customer subwikis as it wasn’t useful in these subwikis.

We have ~50 subwikis for customers so far but in each of those I have to drag the extension into the navigation panel in administration. I’m planning to make a few more extension for IT things that are pretty structured and was just trying to avoid manually added them to the navigation panel with each new one.

Sorry if I went overboard or repeated myself. Watching shows while responding doesn’t work very well :smile:

I don’t think there is a way to do that out of the box. A possible workaround I can think of would be to implement a listener which make sure that the extension home page is included in the navigation panel configuration at install (if you want allow putting it back as excluded) or at init (if you want to make sure it’s always the case).

1 Like

Thanks again @tmortagne.

That sounds like it would do it. I’ll look into it.