Keep same prefix for maven sub-directories

Hi devs,

Sometimes we drop the plural s for subdirectories. For example:

  • Parent: xwiki-platform-flamingo-themes
  • Subdir: xwiki-platform-flamingo-theme-test

This is causing problems in our docker test pipeline since we try to compute automatically the path of the module containing the docker tests and we get:

[ERROR] [ERROR] Could not find the selected project in the reactor: xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-themes/xwiki-platform-flamingo-themes-test/xwiki-platform-flamingo-themes-test-docker @ 

[INFO] [jenkins-event-spy] Generated /root/workspace/XWiki_xwiki-platform_master@tmp/withMaven83a3a0d6/maven-spy-20191003-002016-328516055416699799159.log

[ERROR] Could not find the selected project in the reactor: xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-themes/xwiki-platform-flamingo-themes-test/xwiki-platform-flamingo-themes-test-docker -> [Help 1]

org.apache.maven.MavenExecutionException: Could not find the selected project in the reactor: xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-themes/xwiki-platform-flamingo-themes-test/xwiki-platform-flamingo-themes-test-docker

We cannot just remove the s since we have some subdirectories keeping it. In any case and retrospectively it seems a bad idea to not keep the same prefix.

So I’m proposing to set a rule where submodules must have the same prefix as their parent dir. No exception. In the example above this means xwiki-platform-flamingo-themes-test.

WDYT?

Thanks

PS: I’ve tried to fix it with [Misc] Add support for maven submodules that have the plural 's' remo… · xwiki/xwiki-jenkins-pipeline@c40fb26 · GitHub but I believe it would be better to have some consistency.

+1 for having the same prefix

Now for those that currently need to be fixed I much prefer renaming the parent than the submodules because it means not breaking the id of artifacts that are used as dependencies which is always a pain.

+1

+1 Same as Thomas and Marius.

ok so we agreed, as a rule, to use the same prefix for a module and its submodules.

Note that in the [xwiki-devs] [Proposal] Use artifact id as directory names thread we had already decided that we should use the singular in artifactid and build directory names (3 +1 votes from Thomas, Sergiu and Vincent).

Thus I’ve documented both at https://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBuildBestPractices