[
https://issues.apache.org/jira/browse/MSITE-827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Osipov reassigned MSITE-827:
------------------------------------
Assignee: Michael Osipov
> Site builds rely on HTTP 404
> ----------------------------
>
> Key: MSITE-827
> URL: https://issues.apache.org/jira/browse/MSITE-827
> Project: Maven Site Plugin
> Issue Type: Bug
> Components: multi module
> Affects Versions: 3.7.1
> Reporter: Stephen Colebourne
> Assignee: Michael Osipov
> Priority: Major
> Fix For: 4.0.0-M4
>
>
> If the _pom.xml_ that is being built has a parent that is stored in a remote
> repository, then the site plugin (or some other part of the site-building
> process) will try to find two files alongside the parent pom - _site_en.xml_
> and _site.xml_.
> Since these files are being fetched from a remote repository, there is the
> potential for network issues, and I've seen cases where builds fail
> semi-randomly as well as consistently. The key problem seems to be that the
> child build relies on getting *404 for both files* from the remote repository
> before it can continue. This can be a bigger problem if there are multiple
> remote repositories, as *all repositories must return 404 for both files*
> before the child build can continue.
> The Maven recommendation is to use _site:attach-descriptor_ in the parent
> build to publish _site.xml_ in cases like this. However, *this is
> insufficient*, as _site:attach-descriptor_ only publishes _site.xml_ and not
> _site_en.xml_, so the client build still relies on getting 404 on
> _site_en.xml_ in order to be able to continue.
> As per this [answer|https://stackoverflow.com/a/51912311/38896], there is a
> hacky workaround to allow both _site_en.xml_ and _site.xml_ to be published
> from the parent project by mis-using the locales configuration. Once *both*
> files are published, the client build no longer needs to rely on HTTP 404 as
> it finds both files it is looking for.
> Given how everything works today, I suspect that the client build is going to
> have to continue to use HTTP 404, as making it more tolerant could mask
> errors. Unless there is some way to provide a config flag in the site plugin
> of the child build.
> I suspect that the only way to tackle this issue will be to make
> _site:attach-descriptor_ publish both _site_en.xml_ and _site.xml_ by default
> (without the need for hacky locales config).
> See also MSITE-639 which provides more info.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)