Hello,
Context
While documenting Live Data, Eleni noticed that our e.x.o pages don’t mirror the repo structure: Like Application and XWiki Platform - Like - API are siblings, with no parent page listing the children (Matrix discussion).
The rule is one e.x.o page per extension id, organized like the repo. What we lack is an agreed way to represent the parent Maven module (the aggregator pom) on e.x.o.
The two mechanisms we have
1. Project page (e.g. Live Data) — a dedicated page type (ExtensionCode.ProjectClass), separate from extension pages. The concept, its xclass and its sheet came out of a hackathon and were never discussed publicly; Thomas added the auto-update of the metadata from Maven later. The page itself still has to be created by hand, there is no auto-create.
2. pom-packaging extension import — importing the parent pom as a regular extension, i.e. an extension with no associated file whose point is to list its dependencies. This is already supported by the e.x.o Maven import, and such an extension shows up with the “No file” type. What’s missing is a UI at import time listing the submodules, so that you can choose which children get imported along with the parent.
The question
To me these are the same concept: a container grouping children extensions. So why two different xclasses? A pom extension type could simply get its own sheet and display what a Project page displays today.
Thomas disagrees: “Projects and extensions are really different things even if they have some metadata in common”, they are two completely different xclasses.
My worry is that if we keep creating Project pages by hand now and later move to pom extensions, we’ll do the work twice.
One possible reason for the split is that the extra Project metadata doesn’t exist in pom.xml today. That looks fixable with custom Maven properties, and we need something like a notion of entry points in EM anyway.
Side note: before importing a parent pom we need to fix its EM metadata in the pom.xml (name, description), otherwise we get an ugly name on e.x.o.
Options
- Project pages only: keep the current concept and add auto-create from the Maven import.
pomextensions only: drop Project pages, add the submodule-picker UI plus a dedicated sheet for thepomtype, and move the missing metadata intopom.xml.- Both, as complementary things: the Project page stays the hand-curated, human-facing container while the
pomextension is the Maven-derived artifact page. This needs a clear rule saying which one to use when, and a way to keep them from diverging.
What I’d like us to decide
- What does a Project actually carry that a
pomextension cannot? Concretely: which fields, and which behaviour? - If the answer is “nothing we couldn’t put in the
pom.xml”, do we go for option 2 and stop creating Project pages? - If we keep both, what is the rule for contributors: when do I create a Project page, and when do I import the parent
pom? - And, if we go that way, is “No file” the right name for that type on e.x.o?
Independently of the outcome, none of our e.x.o rules (one page per extension id, mirror the repo, parent pages) are written down anywhere. I’d like them documented on dev.xwiki.org and linked from contrib.xwiki.org and from the Doc Guide.
Opinions welcome, especially from anyone who has had to document a multi-module extension recently. I’d like us to settle on a way forward rather than keep doing it by hand each time.
Thanks!