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 https://github.com/xwiki/xwiki-jenkins-pipeline/commit/c40fb260c81a4f31671d324f5d6a83e32e82d0ea 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.