mavenmaven-3maven-site-pluginmaven-javadoc-plugin

Maven searches for missing english locale of site.xml


During building a project with maven, I run into an issue generating javadoc after updating the version of its parent project.

2016-08-18 16:06:44.559 [INFO] <<< maven-javadoc-plugin:2.10.3:aggregate < generate-sources @ org.eclipse.scout.rt <<<
2016-08-18 16:06:44.560 [DEBUG] building maven31 dependency graph for org.eclipse.scout.rt:org.eclipse.scout.rt:pom:6.0.0-SNAPSHOT with Maven31DependencyGraphBuilder
2016-08-18 16:06:44.560 [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=1, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=0, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=0, ConflictResolver.conflictItemCount=0, DefaultDependencyCollector.collectTime=0, DefaultDependencyCollector.transformTime=0}
2016-08-18 16:06:44.561 [DEBUG] org.eclipse.scout.rt:org.eclipse.scout.rt:pom:6.0.0-SNAPSHOT
2016-08-18 16:06:44.636 [DEBUG]  canGenerateReport = true for project MavenProject: org.eclipse.scout.rt:org.eclipse.scout.rt:6.0.0-SNAPSHOT @ /home/<REDACTED>/workspace/org.eclipse.scout.rt.branch-6.0_nightly-sitedocs/org.eclipse.scout.rt/pom.xml
2016-08-18 16:06:44.662 [DEBUG] Computing decoration model of org.eclipse.scout.rt:org.eclipse.scout.rt:pom:6.0.0-SNAPSHOT for locale en
2016-08-18 16:06:44.662 [DEBUG] No site descriptor found for org.eclipse.scout.rt:org.eclipse.scout.rt:pom:6.0.0-SNAPSHOT
2016-08-18 16:06:44.663 [DEBUG] Looking for site descriptor of level 1 parent project: org.eclipse.scout:maven_rt_plugin_config-master:pom:2.0.7
2016-08-18 16:06:44.665 [DEBUG] Using transporter WagonTransporter with priority -1.0 for <REDACTED>
2016-08-18 16:06:44.666 [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for <REDACTED>
2016-08-18 16:06:44.666 [INFO] Downloading: <REDACTED>/org/eclipse/scout/maven_rt_plugin_config-master/2.0.7/maven_rt_plugin_config-master-2.0.7-site_en.xml
2016-08-18 16:06:45.289 [DEBUG] Writing tracking file /home/<REDACTED>/workspace/org.eclipse.scout.rt.branch-6.0_nightly-sitedocs/.repository/org/eclipse/scout/maven_rt_plugin_config-master/2.0.7/maven_rt_plugin_config-master-2.0.7-site_en.xml.lastUpdated
2016-08-18 16:06:45.597 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.5.1:site (default-cli) on project org.eclipse.scout.rt: SiteToolException: The site descriptor cannot be resolved from the repository: ArtifactResolutionException: Unable to locate site descriptor: Could not transfer artifact org.eclipse.scout:maven_rt_plugin_config-master:xml:site_en:2.0.7 from/to AAA.libs.release (<REDACTED>): Access denied to: <REDACTED>/org/eclipse/scout/maven_rt_plugin_config-master/2.0.7/maven_rt_plugin_config-master-2.0.7-site_en.xml , ReasonPhrase:Forbidden.
2016-08-18 16:06:45.598 [ERROR] org.eclipse.scout:maven_rt_plugin_config-master:xml:2.0.7
2016-08-18 16:06:45.598 [ERROR] 
2016-08-18 16:06:45.598 [ERROR] from the specified remote repositories:
2016-08-18 16:06:45.598 [ERROR] AAA.libs.release (<REDACTED>, releases=true, snapshots=false),
2016-08-18 16:06:45.599 [ERROR] AAA.libs.snapshots (<REDACTED>, releases=false, snapshots=true),
2016-08-18 16:06:45.599 [ERROR] eclipse.release (https://repo.eclipse.org/content/groups/releases/, releases=true, snapshots=false),
2016-08-18 16:06:45.599 [ERROR] eclipse.snapshot (https://repo.eclipse.org/content/groups/snapshots/, releases=true, snapshots=true),
2016-08-18 16:06:45.599 [ERROR] remote-repos (<REDACTED>, releases=true, snapshots=false)

As you can see, it tries to download the maven_rt_plugin_config-master-2.0.7-site_en.xml, which in fact does not exist. There however does exist such an xml without the _en suffix...

I have specified no locales as far as I can see and there seem to be no changes in the parent project related to site or javadoc generation.

Why does Maven not fall back to the default locale?


Solution

  • The reason for this issue was the behaviour of our repository (JFrog Artifactory): The requested repository is a virtual repository, that aggregates several physical repositories.

    It replies with a 403 (Forbidden) if the requested artifact cannot be found in the repositories the user has access to - and there exist others that the user does not have access to. Maven then seems to stop looking for an alternative file in the same repository.

    There exists a feature request for the JFrog Artifactory to change the behaviour, but (at the time of writing) nobody is working on it.

    Our solution was to change the settings.xml to point directly to the repository. Then, Maven will receive a 404 (Not Found) for the English locale version (site_en.xml), and correctly fall back to the default site.xml. Several other Maven plugins also exhibit this issue when presented with a 403.