Affects Version/s: None
Fix Version/s: 8.1
The build fails with an error such as the following:
This failure comes from the fact that module sonar-docs defines dependencies on private plugins.
It is essential that SonarQube can be built from sources available from the public repository.
this problem affects tag 8.0 in public repository, which implies that 8.0 can't be built from source
Module sonar-docs has two purpose:
- it holds the markdown files (in sources) for embedded documentation
- it produces an artifact used for the static documentation available at docs.sonarqube.org (made from the same markdown)
Currently, both static documentation and the embedded one provide the documentation for all plugins, whatever the edition the documentation is embedded into.
The error above highlights the fact that this is problem for the Community edition and to fix it, we will simply end it:
- the static documentation should display the documentation of all plugins
- the embedded documentation should display only the documentation of the plugins available in the current edition (ie. the installed plugins)
Documentation contains a hard coded menu which lists the plugins.
Currently, when a plugin is not installed and/or does not provide its own documentation, the documentation for this plugin which is SQ repository is displayed. This fallback mechanism exists because not all plugin provide their own documentation yet.
This implies that even if plugin is not part of the current edition, some documentation for it will be displayed.
That would be convenient because it makes the hard coded menu a no-problem.
However, in the case a plugin does provide its own documentation but is not part of the current edition, displaying the one from the SQ repository would mean displaying an out-of-date documentation.
If this is not OK, instead, the doc menu should be updated to hide entries at runtime for plugins which are not installed (information available from api/plugins/installed) => plugins shipping with their own edition are rare which means the doc in SQ is up to date. Also, 8.0 is a short lived version. This problem exists but will be taken care of separately (see SONAR-12681)
Static doc contains the doc of all plugins and is all generated at build time.
Private plugins are not available in the public repository, which implies that static doc can't be generated with the embedded doc these plugins provide. Which means the artifact produced from the public repository sources may contain outdated data.
does it make sense to produce a public static doc artifact which is only intended to be used for https://docs.sonarqube.org? => it doesn't, artifact should not be produced if so, is it ok to produce one with outdated information? => see above if not, then we might just as well not produce this artifact at all in the public repository => yes
Module sonar-doc will not be included by settings.gradle at the root of the project, but by settings.gradle in the private directory.
This will both make static documentation artifacts not available from public sources and fix the bug above as gradle won't attempt to resolve private artifacts used by this module at all.
The list of bundled plugins is used by multiple modules and currently duplicated:
- each edition module
The solution to this ticket is to create Gradle configurations in the root build.gradle (for the community edition) and the build.gradle in the private directory (for commercial editions) with the list of plugins in each edition.
All the modules listed above will used these configuration, which will remove duplication.