Hey, XWiki community,
A few days ago, I asked if there were a way to get a list of “wanted pages”—basically, a list of non-URL links on the wiki that point to nonexistent documents—on XWiki, sort of like MediaWiki’s “Special:WantedPages” page. I was reassured that, while the functionality obviously does not exist out of the box, it would not be difficult to implement.
So I got to work! After many hours of trial and error, I managed to code up something that gets the job done:
As of now, it does not support localisation, meaning that it is only available in English—all non-generated text in the document is currently hardcoded—but I may adapt it to be localisable in the future, especially if there is enough demand. I also doubt it properly supports a multi-wiki setup at the moment, as I expect that it would pull links from all wikis on the same server. Finally, the stylesheet attached to the page currently assigns a hardcoded color to a couple of classes instead of a theme variable because I am new to LESS and was just trying to get it to look good on my wiki for now. (My wiki uses the default Flamingo Iceberg skin.)
All of which is to say that I am calling this v0.1. Depending on demand, I can make improvements over time.
I am creating this topic because I would like some assistance with publishing this extension. I was trying to follow the official documentation, but having never used Maven before, I am still confused as to how to get it set up. I saw there is a “Maven XAR Plugin”, with some XML to paste into a POM, but it doesn’t specify which POM. Also, I am not sure if I need to publish this to an official XWiki repo and/or if I should have “org.xwiki…” in the groupId
field instead of my own domain. Oh, and I am not sure what the directory structure of the XAR should look like: since I only have the one wiki page, should it just be a top-level file, or does it need to be in a directory…and if it is the latter, what should the directory be named?
If someone could give me some step-by-step instructions on how to get this extension out to the public, as if I have never used Maven before (which is the case), I would be incredibly grateful. I have installed Maven and created a root directory for the Maven project, and I created a Git repo out of it, too.
Many thanks in advance!