Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.0
-
None
Description
Seeing errors like the following during site generation:
[ERROR] Unresolveable build extension: Plugin org.example:custom-extension:1.0.0 or one of its dependencies could not be resolved: Failure to find org.example:custom-extension:1.0.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ [ERROR] Unknown packaging: custom-extension @ line 15, column 14 at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:194) at org.apache.maven.project.DefaultProjectBuilder.build (DefaultProjectBuilder.java:329) at org.apache.maven.report.projectinfo.dependencies.RepositoryUtils.getMavenProjectFromRepository (RepositoryUtils.java:125) at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.printDescriptionsAndURLs (DependenciesRenderer.java:890) at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.printDependencyListing (DependenciesRenderer.java:847) at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.printDependencyListing (DependenciesRenderer.java:867) at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.renderSectionDependencyTree (DependenciesRenderer.java:486) at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.renderSectionProjectDependencyGraph (DependenciesRenderer.java:449) at org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer.renderBody (DependenciesRenderer.java:222) at org.apache.maven.reporting.AbstractMavenReportRenderer.render (AbstractMavenReportRenderer.java:80) at org.apache.maven.report.projectinfo.DependenciesReport.executeReport (DependenciesReport.java:162) at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:251) at org.apache.maven.plugins.site.render.ReportDocumentRenderer.renderDocument (ReportDocumentRenderer.java:230) at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render (DefaultSiteRenderer.java:349) at org.apache.maven.plugins.site.render.SiteMojo.renderLocale (SiteMojo.java:198) at org.apache.maven.plugins.site.render.SiteMojo.execute (SiteMojo.java:147)
My projects are overriding the central repository (and pluginRepository) that come from the Super POM, but that appears not to be honored here.
From what I can tell, the problem here is that the pluginArtifactRepositories are not set on the building request:
When I add:
buildingRequest.setPluginArtifactRepositories( remoteRepositories );
The site generates without errors. However, I'm not sure that using remoteRepositories is appropriate here as I'm not sure exactly how those can be populated. Using project.getPluginArtifactRepositories() should also work.
I can create the PR, I just wanted to get feedback on the correct fix first. I also see this same code in the DependencyManagementReport and assume the same fix may need to be applied there.
Attachments
Issue Links
- links to