Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
18.1.0-rc-1
-
None
-
Unknown
-
Description
XCOMMONS-3562 made Extension Manager respect the <releases> / <snapshots> enabled flags of the repositories declared in Maven poms, by storing them as maven.release / maven.snapshot properties on the ExtensionRepositoryDescriptor of the extension (and its dependencies), and skipping a repository when the searched version type is not allowed.
But these properties are only available when the extension metadata is read directly from the Maven pom (or from the local extension descriptor). When the extension comes from an XWiki extension repository (e.g. extensions.xwiki.org) the properties are lost:
- the REST model ExtensionRepository (xwiki.rest.extension.model.xsd) only contains id, uri and type
- XWikiExtension#toExtensionRepositoryDescriptor() always passes null properties
A repository without properties is considered as allowing both releases and snapshots, so, for an extension resolved through extensions.xwiki.org, a snapshot-only repository like jvnet-nexus-snapshots (declared with releases disabled by net.java:jvnet-parent) is still used to search for release dependencies, which produces useless requests and errors in the logs like:
Unexpected error when trying to find extension dependency [grizzly-http 2.3.25] in repository [jvnet-nexus-snapshots:maven:https://maven.java.net/content/repositories/snapshots]: CertificateExpiredException: NotAfter: Thu Apr 02 02:59:59 EEST 2026
(see XWIKI-24190)
Fixing it requires:
- adding the repository properties to the REST model ExtensionRepository
- reading them in XWikiExtension#toExtensionRepositoryDescriptor()
- filling them on the server side (xwiki-platform repository server)