Consider mapping source paths to antora expected structure
There are two early issues suggesting cases where it would be useful to accept non-standard component file trees and translate them to a standard structure:
#28[Module paths should be configurable]
#27 (closed)[Add support for a moduleless (single module) docs component]
I've wondered how friendly Antora could be to multi-project maven reactor builds storing documentation in the maven projects alongside the code. In this case most likely a maven project might correspond to a module. Since maven already has a rather deep directory structure adding more won't be very pleasant.
With the thought that deciding what one wants to do might be easier if one can do it, I implemented a simple general source tree mapping. The mapping is per-antora.yml, not per component-version. This means that a distributed component can have different mappings in each distributed part.
So, for a large maven project, you could have an antora.yml in each leaf project, that maps the source in a maven-standard location to a particular module in a distributed component.
At the moment the configuration looks like this:
source_map:
module1: modules/module1
module3: modules/module3
You can also eliminate modules/ROOT:
source_map:
'.': modules/ROOT
I think the mappings contemplated in the mentioned issues can easily be done with this, although the syntax may not be ideal.
The code is here: https://gitlab.com/djencks/antora/tree/issue-520-source-mappings
A sample project is here: https://gitlab.com/djencks/simple-examples/tree/issue-520-source-map-experiment